mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
apiserver command line options lead to config
This commit is contained in:
@@ -106,15 +106,19 @@ func Run(s *options.ServerRunOptions) error {
|
||||
|
||||
// create config from options
|
||||
genericConfig := genericapiserver.NewConfig().
|
||||
WithSerializer(api.Codecs).
|
||||
ApplyOptions(s.GenericServerRunOptions).
|
||||
ApplyInsecureServingOptions(s.InsecureServing)
|
||||
WithSerializer(api.Codecs)
|
||||
|
||||
if _, err := genericConfig.ApplySecureServingOptions(s.SecureServing); err != nil {
|
||||
return fmt.Errorf("failed to configure https: %s", err)
|
||||
if err := s.GenericServerRunOptions.ApplyTo(genericConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = s.Authentication.Apply(genericConfig); err != nil {
|
||||
return fmt.Errorf("failed to configure authentication: %s", err)
|
||||
if err := s.InsecureServing.ApplyTo(genericConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.SecureServing.ApplyTo(genericConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Authentication.ApplyTo(genericConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
capabilities.Initialize(capabilities.Capabilities{
|
||||
|
||||
Reference in New Issue
Block a user