Skip to content

Commit

Permalink
Merge pull request #20146 from liggitt/kubelet-client-plumbing
Browse files Browse the repository at this point in the history
Honor --kubelet-preferred-address-types
  • Loading branch information
openshift-merge-robot authored Jul 3, 2018
2 parents 8fa6a66 + 427bdf9 commit 873e7ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 33 deletions.
9 changes: 7 additions & 2 deletions pkg/cmd/server/kubernetes/master/master_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ import (
"github.com/openshift/origin/pkg/cmd/flagtypes"
configapi "github.com/openshift/origin/pkg/cmd/server/apis/config"
"github.com/openshift/origin/pkg/cmd/server/election"
nodeclient "github.com/openshift/origin/pkg/cmd/server/kubernetes/node/client"
cmdutil "github.com/openshift/origin/pkg/cmd/util"
cmdflags "github.com/openshift/origin/pkg/cmd/util/flags"
oauthutil "github.com/openshift/origin/pkg/oauth/util"
Expand Down Expand Up @@ -175,6 +174,12 @@ func BuildKubeAPIserverOptions(masterConfig configapi.MasterConfig) (*kapiserver
}

server.KubeletConfig.ReadOnlyPort = 0
server.KubeletConfig.Port = masterConfig.KubeletClientInfo.Port
server.KubeletConfig.PreferredAddressTypes = []string{"Hostname", "InternalIP", "ExternalIP"}
server.KubeletConfig.EnableHttps = true
server.KubeletConfig.CAFile = masterConfig.KubeletClientInfo.CA
server.KubeletConfig.CertFile = masterConfig.KubeletClientInfo.ClientCert.CertFile
server.KubeletConfig.KeyFile = masterConfig.KubeletClientInfo.ClientCert.KeyFile

server.ProxyClientCertFile = masterConfig.AggregatorConfig.ProxyClientInfo.CertFile
server.ProxyClientKeyFile = masterConfig.AggregatorConfig.ProxyClientInfo.KeyFile
Expand Down Expand Up @@ -507,7 +512,7 @@ func buildKubeApiserverConfig(

EventTTL: apiserverOptions.EventTTL,

KubeletClientConfig: *nodeclient.GetKubeletClientConfig(masterConfig),
KubeletClientConfig: apiserverOptions.KubeletConfig,

EnableLogsSupport: false, // don't expose server logs
},
Expand Down
31 changes: 0 additions & 31 deletions pkg/cmd/server/kubernetes/node/client/client.go

This file was deleted.

0 comments on commit 873e7ac

Please sign in to comment.