Skip to content

Commit

Permalink
Merge pull request #20183 from openshift-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-20146-to-release-3.10

[release-3.10] Honor --kubelet-preferred-address-types
  • Loading branch information
openshift-merge-robot authored Jul 4, 2018
2 parents c4cecc7 + cb90ffe commit 83bd74f
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 @@ -77,7 +77,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 @@ -173,6 +172,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 @@ -505,7 +510,7 @@ func buildKubeApiserverConfig(

EventTTL: apiserverOptions.EventTTL,

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

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

This file was deleted.

0 comments on commit 83bd74f

Please sign in to comment.