// NewAPIServer creates a new APIServer object with default parameters func NewAPIServer() *APIServer { s := APIServer{ InsecurePort: 8080, InsecureBindAddress: net.ParseIP("127.0.0.1"), BindAddress: net.ParseIP("0.0.0.0"), SecurePort: 6443, APIPrefix: "/api", APIGroupPrefix: "/apis", EventTTL: 1 * time.Hour, AuthorizationMode: "AlwaysAllow", AdmissionControl: "AlwaysAdmit", EtcdPathPrefix: master.DefaultEtcdPathPrefix, EnableLogsSupport: true, MasterServiceNamespace: api.NamespaceDefault, ClusterName: "kubernetes", CertDirectory: "/var/run/kubernetes", StorageVersions: latest.AllPreferredGroupVersions(), RuntimeConfig: make(util.ConfigurationMap), KubeletConfig: client.KubeletConfig{ Port: ports.KubeletPort, EnableHttps: true, HTTPTimeout: time.Duration(5) * time.Second, }, } return &s }
// NewAPIServer creates a new APIServer object with default parameters func NewAPIServer() *APIServer { s := APIServer{ ServerRunOptions: genericapiserver.NewServerRunOptions(), APIGroupPrefix: "/apis", APIPrefix: "/api", AdmissionControl: "AlwaysAdmit", AuthorizationMode: "AlwaysAllow", EnableLogsSupport: true, EtcdPathPrefix: genericapiserver.DefaultEtcdPathPrefix, EventTTL: 1 * time.Hour, MasterCount: 1, MasterServiceNamespace: api.NamespaceDefault, RuntimeConfig: make(util.ConfigurationMap), StorageVersions: latest.AllPreferredGroupVersions(), KubeletConfig: kubeletclient.KubeletClientConfig{ Port: ports.KubeletPort, EnableHttps: true, HTTPTimeout: time.Duration(5) * time.Second, }, } return &s }