Split kubelet server initialization into two parts

First is initializing a KubeletConfig that starts no background
processes. Second is running the config. Provide a legacy path
that won't impact older callers while making it easier to customize
the interfaces passed to the Kubelet.

Used by OpenShift to inject some custom interfaces to the Kubelet
for config management.
This commit is contained in:
Clayton Coleman
2015-07-01 15:02:30 -04:00
parent 5b216d8a51
commit bb79365e2a
3 changed files with 85 additions and 66 deletions

View File

@@ -32,8 +32,8 @@ func NewKubelet() *Server {
queries Docker to see what is currently running. It synchronizes the
configuration data, with the running set of containers by starting or stopping
Docker containers.`,
Run: func(_ *Server, args []string) error {
return s.Run(args)
Run: func(_ *Server, _ []string) error {
return s.Run(nil)
},
}
s.AddFlags(hks.Flags())