@@ -96,27 +96,28 @@ func main() {
9696 )
9797
9898 var (
99- metricsAddr string
100- eventsAddr string
101- healthAddr string
102- concurrent int
103- requeueDependency time.Duration
104- helmIndexLimit int64
105- helmChartLimit int64
106- helmChartFileLimit int64
107- artifactOptions artcfg.Options
108- clientOptions client.Options
109- logOptions logger.Options
110- leaderElectionOptions leaderelection.Options
111- rateLimiterOptions helper.RateLimiterOptions
112- featureGates feathelper.FeatureGates
113- watchOptions helper.WatchOptions
114- intervalJitterOptions jitter.IntervalOptions
115- helmCacheMaxSize int
116- helmCacheTTL string
117- helmCachePurgeInterval string
118- tokenCacheOptions pkgcache.TokenFlags
119- defaultServiceAccount string
99+ metricsAddr string
100+ eventsAddr string
101+ healthAddr string
102+ concurrent int
103+ requeueDependency time.Duration
104+ helmIndexLimit int64
105+ helmChartLimit int64
106+ helmChartFileLimit int64
107+ artifactOptions artcfg.Options
108+ clientOptions client.Options
109+ logOptions logger.Options
110+ leaderElectionOptions leaderelection.Options
111+ rateLimiterOptions helper.RateLimiterOptions
112+ featureGates feathelper.FeatureGates
113+ watchOptions helper.WatchOptions
114+ intervalJitterOptions jitter.IntervalOptions
115+ helmCacheMaxSize int
116+ helmCacheTTL string
117+ helmCachePurgeInterval string
118+ tokenCacheOptions pkgcache.TokenFlags
119+ defaultServiceAccount string
120+ ociSkipRegistryValidation bool
120121 )
121122
122123 flag .StringVar (& metricsAddr , "metrics-addr" , envOrDefault ("METRICS_ADDR" , ":8080" ),
@@ -145,6 +146,9 @@ func main() {
145146 "The list of hostkey algorithms to use for ssh connections, arranged from most preferred to the least." )
146147 flag .StringVar (& defaultServiceAccount , auth .ControllerFlagDefaultServiceAccount ,
147148 "" , "Default service account to use for workload identity when not specified in resources." )
149+ flag .BoolVar (& ociSkipRegistryValidation , auth .ControllerFlagOCISkipRegistryValidation , false ,
150+ "Skip OCI registry domain validation for cloud provider authentication. " +
151+ "Enables using custom registry proxies/gateways with workload identity." )
148152
149153 artifactOptions .BindFlags (flag .CommandLine )
150154 clientOptions .BindFlags (flag .CommandLine )
@@ -164,6 +168,10 @@ func main() {
164168 auth .SetDefaultServiceAccount (defaultServiceAccount )
165169 }
166170
171+ if ociSkipRegistryValidation {
172+ auth .SetOCISkipRegistryValidation (true )
173+ }
174+
167175 if err := featureGates .WithLogger (setupLog ).SupportedFeatures (features .FeatureGates ()); err != nil {
168176 setupLog .Error (err , "unable to load feature gates" )
169177 os .Exit (1 )
0 commit comments