Make kubeletConfiguration field on Kubelet struct a value type

This commit is contained in:
Michael Taufen 2016-08-29 18:03:34 -07:00
parent 79c7d4b36e
commit ceb00add97

View File

@ -179,7 +179,7 @@ type Option func(*Kubelet)
// bootstrapping interface for kubelet, targets the initialization protocol // bootstrapping interface for kubelet, targets the initialization protocol
type KubeletBootstrap interface { type KubeletBootstrap interface {
GetConfiguration() *componentconfig.KubeletConfiguration GetConfiguration() componentconfig.KubeletConfiguration
BirthCry() BirthCry()
StartGarbageCollection() StartGarbageCollection()
ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableDebuggingHandlers bool) ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableDebuggingHandlers bool)
@ -745,7 +745,7 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub
// Finally, put the most recent version of the config on the Kubelet, so // Finally, put the most recent version of the config on the Kubelet, so
// people can see how it was configured. // people can see how it was configured.
klet.kubeletConfiguration = kubeCfg klet.kubeletConfiguration = *kubeCfg
return klet, nil return klet, nil
} }
@ -759,7 +759,7 @@ type nodeLister interface {
// Kubelet is the main kubelet implementation. // Kubelet is the main kubelet implementation.
type Kubelet struct { type Kubelet struct {
kubeletConfiguration *componentconfig.KubeletConfiguration kubeletConfiguration componentconfig.KubeletConfiguration
hostname string hostname string
nodeName string nodeName string
@ -3043,7 +3043,7 @@ func (kl *Kubelet) PortForward(podFullName string, podUID types.UID, port uint16
} }
// GetConfiguration returns the KubeletConfiguration used to configure the kubelet. // GetConfiguration returns the KubeletConfiguration used to configure the kubelet.
func (kl *Kubelet) GetConfiguration() *componentconfig.KubeletConfiguration { func (kl *Kubelet) GetConfiguration() componentconfig.KubeletConfiguration {
return kl.kubeletConfiguration return kl.kubeletConfiguration
} }