1 /* 2 Copyright 2018 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package options 18 19 import ( 20 "github.com/spf13/pflag" 21 22 kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" 23 ) 24 25 // DeprecatedControllerOptions holds the DeprecatedController options, those option are deprecated. 26 // TODO remove these fields once the deprecated flags are removed. 27 type DeprecatedControllerOptions struct { 28 *kubectrlmgrconfig.DeprecatedControllerConfiguration 29 } 30 31 // AddFlags adds flags related to DeprecatedController for controller manager to the specified FlagSet. 32 func (o *DeprecatedControllerOptions) AddFlags(fs *pflag.FlagSet) { 33 if o == nil { 34 return 35 } 36 } 37 38 // ApplyTo fills up DeprecatedController config with options. 39 func (o *DeprecatedControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.DeprecatedControllerConfiguration) error { 40 if o == nil { 41 return nil 42 } 43 44 return nil 45 } 46 47 // Validate checks validation of DeprecatedControllerOptions. 48 func (o *DeprecatedControllerOptions) Validate() []error { 49 if o == nil { 50 return nil 51 } 52 53 errs := []error{} 54 return errs 55 } 56