mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Add alternative names for the server binaries to hyperkube
This commit is contained in:
		@@ -55,7 +55,7 @@ func (hk *HyperKube) AddServer(s *Server) {
 | 
			
		||||
// FindServer will find a specific server named name.
 | 
			
		||||
func (hk *HyperKube) FindServer(name string) (*Server, error) {
 | 
			
		||||
	for _, s := range hk.servers {
 | 
			
		||||
		if s.Name() == name {
 | 
			
		||||
		if s.Name() == name || s.AlternativeName == name {
 | 
			
		||||
			return &s, nil
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -27,6 +27,8 @@ func NewKubeAPIServer() *Server {
 | 
			
		||||
	s := options.NewServerRunOptions()
 | 
			
		||||
 | 
			
		||||
	hks := Server{
 | 
			
		||||
		name:            "apiserver",
 | 
			
		||||
		AlternativeName: "kube-apiserver",
 | 
			
		||||
		SimpleUsage:     "apiserver",
 | 
			
		||||
		Long:            "The main API entrypoint and interface to the storage system.  The API server is also the focal point for all authorization decisions.",
 | 
			
		||||
		Run: func(_ *Server, args []string) error {
 | 
			
		||||
 
 | 
			
		||||
@@ -27,6 +27,8 @@ func NewKubeControllerManager() *Server {
 | 
			
		||||
	s := options.NewCMServer()
 | 
			
		||||
 | 
			
		||||
	hks := Server{
 | 
			
		||||
		name:            "controller-manager",
 | 
			
		||||
		AlternativeName: "kube-controller-manager",
 | 
			
		||||
		SimpleUsage:     "controller-manager",
 | 
			
		||||
		Long:            "A server that runs a set of active components. This includes replication controllers, service endpoints and nodes.",
 | 
			
		||||
		Run: func(_ *Server, args []string) error {
 | 
			
		||||
 
 | 
			
		||||
@@ -32,6 +32,8 @@ func NewKubeProxy() *Server {
 | 
			
		||||
	config := options.NewProxyConfig()
 | 
			
		||||
 | 
			
		||||
	hks := Server{
 | 
			
		||||
		name:            "proxy",
 | 
			
		||||
		AlternativeName: "kube-proxy",
 | 
			
		||||
		SimpleUsage:     "proxy",
 | 
			
		||||
		Long: `The Kubernetes proxy server is responsible for taking traffic directed at
 | 
			
		||||
		services and forwarding it to the appropriate pods. It generally runs on
 | 
			
		||||
 
 | 
			
		||||
@@ -27,6 +27,8 @@ func NewScheduler() *Server {
 | 
			
		||||
	s := options.NewSchedulerServer()
 | 
			
		||||
 | 
			
		||||
	hks := Server{
 | 
			
		||||
		name:            "scheduler",
 | 
			
		||||
		AlternativeName: "kube-scheduler",
 | 
			
		||||
		SimpleUsage:     "scheduler",
 | 
			
		||||
		Long:            "Implements a Kubernetes scheduler.  This will assign pods to kubelets based on capacity and constraints.",
 | 
			
		||||
		Run: func(_ *Server, _ []string) error {
 | 
			
		||||
 
 | 
			
		||||
@@ -26,6 +26,7 @@ import (
 | 
			
		||||
func NewKubelet() *Server {
 | 
			
		||||
	s := options.NewKubeletServer()
 | 
			
		||||
	hks := Server{
 | 
			
		||||
		name:        "kubelet",
 | 
			
		||||
		SimpleUsage: "kubelet",
 | 
			
		||||
		Long: `The kubelet binary is responsible for maintaining a set of containers on a
 | 
			
		||||
		particular node. It syncs data from a variety of sources including a
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@ type Server struct {
 | 
			
		||||
	SimpleUsage     string        // One line description of the server.
 | 
			
		||||
	Long            string        // Longer free form description of the server
 | 
			
		||||
	Run             serverRunFunc // Run the server.  This is not expected to return.
 | 
			
		||||
	AlternativeName string
 | 
			
		||||
 | 
			
		||||
	flags *pflag.FlagSet // Flags for the command (and all dependents)
 | 
			
		||||
	name  string
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user