@@ -17,7 +17,6 @@ import (
1717 cligolistersv1 "github.com/openshift/client-go/config/listers/config/v1"
1818 operatorinformersv1alpha1 "github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1"
1919 operatorlistersv1alpha1 "github.com/openshift/client-go/operator/listers/operator/v1alpha1"
20- "github.com/openshift/library-go/pkg/operator/configobserver/featuregates"
2120 corev1 "k8s.io/api/core/v1"
2221 "k8s.io/apimachinery/pkg/api/equality"
2322 "k8s.io/apimachinery/pkg/api/errors"
@@ -104,8 +103,6 @@ type Controller struct {
104103 clusterVersionLister cligolistersv1.ClusterVersionLister
105104 clusterVersionListerSynced cache.InformerSynced
106105
107- featureGateAccess featuregates.FeatureGateAccess
108-
109106 queue workqueue.RateLimitingInterface
110107 imgQueue workqueue.RateLimitingInterface
111108}
@@ -124,7 +121,6 @@ func New(
124121 kubeClient clientset.Interface ,
125122 mcfgClient mcfgclientset.Interface ,
126123 configClient configclientset.Interface ,
127- featureGateAccess featuregates.FeatureGateAccess ,
128124) * Controller {
129125 eventBroadcaster := record .NewBroadcaster ()
130126 eventBroadcaster .StartLogging (klog .Infof )
@@ -197,8 +193,6 @@ func New(
197193 ctrl .clusterVersionLister = clusterVersionInformer .Lister ()
198194 ctrl .clusterVersionListerSynced = clusterVersionInformer .Informer ().HasSynced
199195
200- ctrl .featureGateAccess = featureGateAccess
201-
202196 return ctrl
203197}
204198
@@ -426,11 +420,10 @@ func (ctrl *Controller) handleImgErr(err error, key interface{}) {
426420}
427421
428422// generateOriginalContainerRuntimeConfigs returns rendered default storage, registries and policy config files
429- func generateOriginalContainerRuntimeConfigs (templateDir string , cc * mcfgv1.ControllerConfig , role string , featureGateAccess featuregates. FeatureGateAccess ) (* ign3types.File , * ign3types.File , * ign3types.File , error ) {
423+ func generateOriginalContainerRuntimeConfigs (templateDir string , cc * mcfgv1.ControllerConfig , role string ) (* ign3types.File , * ign3types.File , * ign3types.File , error ) {
430424 // Render the default templates
431425 rc := & mtmpl.RenderConfig {
432426 ControllerConfigSpec : & cc .Spec ,
433- FeatureGateAccess : featureGateAccess ,
434427 }
435428 generatedConfigs , err := mtmpl .GenerateMachineConfigsForRole (rc , role , templateDir )
436429 if err != nil {
@@ -603,7 +596,7 @@ func (ctrl *Controller) syncContainerRuntimeConfig(key string) error {
603596 }
604597 }
605598 // Generate the original ContainerRuntimeConfig
606- originalStorageIgn , _ , _ , err := generateOriginalContainerRuntimeConfigs (ctrl .templatesDir , controllerConfig , role , ctrl . featureGateAccess )
599+ originalStorageIgn , _ , _ , err := generateOriginalContainerRuntimeConfigs (ctrl .templatesDir , controllerConfig , role )
607600 if err != nil {
608601 return ctrl .syncStatusOnly (cfg , err , "could not generate origin ContainerRuntime Configs: %v" , err )
609602 }
@@ -833,7 +826,7 @@ func (ctrl *Controller) syncImageConfig(key string) error {
833826 if err := retry .RetryOnConflict (updateBackoff , func () error {
834827 registriesIgn , err := registriesConfigIgnition (ctrl .templatesDir , controllerConfig , role , releaseImage ,
835828 imgcfg .Spec .RegistrySources .InsecureRegistries , registriesBlocked , policyBlocked , allowedRegs ,
836- imgcfg .Spec .RegistrySources .ContainerRuntimeSearchRegistries , icspRules , idmsRules , itmsRules , ctrl . featureGateAccess )
829+ imgcfg .Spec .RegistrySources .ContainerRuntimeSearchRegistries , icspRules , idmsRules , itmsRules )
837830 if err != nil {
838831 return err
839832 }
@@ -895,15 +888,15 @@ func (ctrl *Controller) syncImageConfig(key string) error {
895888
896889func registriesConfigIgnition (templateDir string , controllerConfig * mcfgv1.ControllerConfig , role , releaseImage string ,
897890 insecureRegs , registriesBlocked , policyBlocked , allowedRegs , searchRegs []string ,
898- icspRules []* apioperatorsv1alpha1.ImageContentSourcePolicy , idmsRules []* apicfgv1.ImageDigestMirrorSet , itmsRules []* apicfgv1.ImageTagMirrorSet , featureGateAccess featuregates. FeatureGateAccess ) (* ign3types.Config , error ) {
891+ icspRules []* apioperatorsv1alpha1.ImageContentSourcePolicy , idmsRules []* apicfgv1.ImageDigestMirrorSet , itmsRules []* apicfgv1.ImageTagMirrorSet ) (* ign3types.Config , error ) {
899892
900893 var (
901894 registriesTOML []byte
902895 policyJSON []byte
903896 )
904897
905898 // Generate the original registries config
906- _ , originalRegistriesIgn , originalPolicyIgn , err := generateOriginalContainerRuntimeConfigs (templateDir , controllerConfig , role , featureGateAccess )
899+ _ , originalRegistriesIgn , originalPolicyIgn , err := generateOriginalContainerRuntimeConfigs (templateDir , controllerConfig , role )
907900 if err != nil {
908901 return nil , fmt .Errorf ("could not generate original ContainerRuntime Configs: %w" , err )
909902 }
@@ -949,7 +942,7 @@ func registriesConfigIgnition(templateDir string, controllerConfig *mcfgv1.Contr
949942// RunImageBootstrap generates MachineConfig objects for mcpPools that would have been generated by syncImageConfig,
950943// except that mcfgv1.Image is not available.
951944func RunImageBootstrap (templateDir string , controllerConfig * mcfgv1.ControllerConfig , mcpPools []* mcfgv1.MachineConfigPool , icspRules []* apioperatorsv1alpha1.ImageContentSourcePolicy ,
952- idmsRules []* apicfgv1.ImageDigestMirrorSet , itmsRules []* apicfgv1.ImageTagMirrorSet , imgCfg * apicfgv1.Image , featureGateAccess featuregates. FeatureGateAccess ) ([]* mcfgv1.MachineConfig , error ) {
945+ idmsRules []* apicfgv1.ImageDigestMirrorSet , itmsRules []* apicfgv1.ImageTagMirrorSet , imgCfg * apicfgv1.Image ) ([]* mcfgv1.MachineConfig , error ) {
953946
954947 var (
955948 insecureRegs , registriesBlocked , policyBlocked , allowedRegs , searchRegs []string
@@ -977,7 +970,7 @@ func RunImageBootstrap(templateDir string, controllerConfig *mcfgv1.ControllerCo
977970 return nil , err
978971 }
979972 registriesIgn , err := registriesConfigIgnition (templateDir , controllerConfig , role , controllerConfig .Spec .ReleaseImage ,
980- insecureRegs , registriesBlocked , policyBlocked , allowedRegs , searchRegs , icspRules , idmsRules , itmsRules , featureGateAccess )
973+ insecureRegs , registriesBlocked , policyBlocked , allowedRegs , searchRegs , icspRules , idmsRules , itmsRules )
981974 if err != nil {
982975 return nil , err
983976 }
0 commit comments