mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Split the Kubelet flag options and struct
Reduces the size of the app/server.go file and ensures that the flags and their defaults are clearly separated.
This commit is contained in:
@@ -17,13 +17,14 @@ limitations under the License.
|
||||
package main
|
||||
|
||||
import (
|
||||
kubeletapp "k8s.io/kubernetes/cmd/kubelet/app"
|
||||
"k8s.io/kubernetes/cmd/kubelet/app"
|
||||
"k8s.io/kubernetes/cmd/kubelet/app/options"
|
||||
)
|
||||
|
||||
// NewKubelet creates a new hyperkube Server object that includes the
|
||||
// description and flags.
|
||||
func NewKubelet() *Server {
|
||||
s := kubeletapp.NewKubeletServer()
|
||||
s := options.NewKubeletServer()
|
||||
hks := Server{
|
||||
SimpleUsage: "kubelet",
|
||||
Long: `The kubelet binary is responsible for maintaining a set of containers on a
|
||||
@@ -33,7 +34,7 @@ func NewKubelet() *Server {
|
||||
configuration data, with the running set of containers by starting or stopping
|
||||
Docker containers.`,
|
||||
Run: func(_ *Server, _ []string) error {
|
||||
return s.Run(nil)
|
||||
return app.Run(s, nil)
|
||||
},
|
||||
}
|
||||
s.AddFlags(hks.Flags())
|
||||
|
||||
Reference in New Issue
Block a user