mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 21:50:05 +00:00
Merge pull request #23953 from nikhiljindal/u8sServer
Automatic merge from submit-queue moving genericapiserver command line flags to genericapiserver cc @kubernetes/sig-api-machinery
This commit is contained in:
@@ -55,7 +55,14 @@ func newStorageDestinations(groupName string, groupMeta *apimachinery.GroupMeta)
|
||||
return &storageDestinations, nil
|
||||
}
|
||||
|
||||
func Run() error {
|
||||
func NewServerRunOptions() *genericapiserver.ServerRunOptions {
|
||||
serverOptions := genericapiserver.NewServerRunOptions()
|
||||
serverOptions.InsecurePort = InsecurePort
|
||||
serverOptions.SecurePort = SecurePort
|
||||
return serverOptions
|
||||
}
|
||||
|
||||
func Run(serverOptions *genericapiserver.ServerRunOptions) error {
|
||||
config := genericapiserver.Config{
|
||||
EnableIndex: true,
|
||||
EnableSwaggerSupport: true,
|
||||
@@ -93,9 +100,6 @@ func Run() error {
|
||||
if err := s.InstallAPIGroups([]genericapiserver.APIGroupInfo{apiGroupInfo}); err != nil {
|
||||
return fmt.Errorf("Error in installing API: %v", err)
|
||||
}
|
||||
serverOptions := genericapiserver.NewServerRunOptions()
|
||||
serverOptions.InsecurePort = InsecurePort
|
||||
serverOptions.SecurePort = SecurePort
|
||||
s.Run(serverOptions)
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user