File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
cmd/dptp-controller-manager Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -256,9 +256,6 @@ func main() {
256
256
if err != nil {
257
257
logrus .WithError (err ).Fatal ("failed to load kubeconfigs" )
258
258
}
259
- if _ , hasRegistryCluster := kubeconfigs [opts .registryClusterName ]; ! hasRegistryCluster {
260
- logrus .Fatalf ("--kubeconfig must include a context named `%s`" , opts .registryClusterName )
261
- }
262
259
if _ , hasAppCi := kubeconfigs [appCIContextName ]; ! hasAppCi {
263
260
kubeconfigs [appCIContextName ], err = rest .InClusterConfig ()
264
261
if err != nil {
@@ -267,6 +264,10 @@ func main() {
267
264
logrus .Infof ("Loaded %q context from in-cluster config" , appCIContextName )
268
265
}
269
266
267
+ if _ , hasRegistryCluster := kubeconfigs [opts .registryClusterName ]; ! hasRegistryCluster {
268
+ logrus .Fatalf ("--kubeconfig must include a context named `%s`" , opts .registryClusterName )
269
+ }
270
+
270
271
ciOPConfigAgent , err := agents .NewConfigAgent (opts .ciOperatorconfigPath )
271
272
if err != nil {
272
273
logrus .WithError (err ).Fatal ("Failed to construct ci-operator config agent" )
You can’t perform that action at this time.
0 commit comments