-
Notifications
You must be signed in to change notification settings - Fork 171
OCPBUGS-58422: Handle disabled Ingress capability in HyperShift #1182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,8 @@ type oauthClientsController struct { | |
| consoleOperatorLister operatorv1listers.ConsoleLister | ||
| routesLister routev1listers.RouteLister | ||
| ingressConfigLister configv1lister.IngressLister | ||
| infrastructureConfigLister configv1lister.InfrastructureLister | ||
| clusterVersionLister configv1lister.ClusterVersionLister | ||
|
stefanonardo marked this conversation as resolved.
|
||
| targetNSSecretsLister corev1listers.SecretLister | ||
| } | ||
|
|
||
|
|
@@ -67,6 +69,8 @@ func NewOAuthClientsController( | |
| consoleOperatorInformer operatorv1informers.ConsoleInformer, | ||
| routeInformer routev1informers.RouteInformer, | ||
| ingressConfigInformer configv1informers.IngressInformer, | ||
| infrastructureConfigInformer configv1informers.InfrastructureInformer, | ||
| clusterVersionInformer configv1informers.ClusterVersionInformer, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both of these informares we need to add to the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These informers are intentionally not in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, so we will stick to to 1minut resync |
||
| targetNSsecretsInformer corev1informers.SecretInformer, | ||
| oauthClientSwitchedInformer *util.InformerWithSwitch, | ||
| recorder events.Recorder, | ||
|
|
@@ -81,6 +85,8 @@ func NewOAuthClientsController( | |
| consoleOperatorLister: consoleOperatorInformer.Lister(), | ||
| routesLister: routeInformer.Lister(), | ||
| ingressConfigLister: ingressConfigInformer.Lister(), | ||
| infrastructureConfigLister: infrastructureConfigInformer.Lister(), | ||
| clusterVersionLister: clusterVersionInformer.Lister(), | ||
| targetNSSecretsLister: targetNSsecretsInformer.Lister(), | ||
| } | ||
|
|
||
|
|
@@ -138,6 +144,19 @@ func (c *oauthClientsController) sync(ctx context.Context, controllerContext fac | |
| var consoleURL *url.URL | ||
|
|
||
| if len(operatorConfig.Spec.Ingress.ConsoleURL) == 0 { | ||
| infrastructureConfig, err := c.infrastructureConfigLister.Get(api.ConfigResourceName) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| clusterVersionConfig, err := c.clusterVersionLister.Get(api.VersionResourceName) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| if util.IsExternalControlPlaneWithIngressDisabled(infrastructureConfig, clusterVersionConfig) { | ||
| statusHandler.AddConditions(status.HandleProgressingOrDegraded("OAuthClientSync", "", nil)) | ||
| return statusHandler.FlushAndReturn(nil) | ||
| } | ||
|
|
||
| routeName := api.OpenShiftConsoleRouteName | ||
| routeConfig := routesub.NewRouteConfig(operatorConfig, ingressConfig, routeName) | ||
| if routeConfig.IsCustomHostnameSet() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,6 +70,15 @@ func (co *consoleOperator) sync_v400(ctx context.Context, controllerContext fact | |
| ) | ||
|
|
||
| if len(set.Operator.Spec.Ingress.ConsoleURL) == 0 { | ||
| clusterVersionConfig, err := co.clusterVersionLister.Get(api.VersionResourceName) | ||
| if err != nil { | ||
| return statusHandler.FlushAndReturn(err) | ||
| } | ||
| if controllersutil.IsExternalControlPlaneWithIngressDisabled(set.Infrastructure, clusterVersionConfig) { | ||
| statusHandler.AddConditions(status.HandleProgressingOrDegraded("WaitingForConsoleURL", "", nil)) | ||
| return statusHandler.FlushAndReturn(nil) | ||
| } | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll add it to make it consistent, however it's not a real bug as you explained |
||
| routeName := api.OpenShiftConsoleRouteName | ||
| routeConfig := routesub.NewRouteConfig(updatedOperatorConfig, set.Ingress, routeName) | ||
| if routeConfig.IsCustomHostnameSet() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,7 @@ import ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "context" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "fmt" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "os" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "syscall" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "time" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // kube | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -14,6 +15,7 @@ import ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "k8s.io/apimachinery/pkg/runtime" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "k8s.io/apimachinery/pkg/util/wait" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "k8s.io/client-go/dynamic" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "k8s.io/client-go/informers" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "k8s.io/client-go/kubernetes" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -237,6 +239,23 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return err | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| infrastructureConfig, err := configClient.ConfigV1().Infrastructures().Get(ctx, api.ConfigResourceName, metav1.GetOptions{}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if err != nil { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return err | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| clusterVersionConfig, err := configClient.ConfigV1().ClusterVersions().Get(ctx, api.VersionResourceName, metav1.GetOptions{}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if err != nil { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return err | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ingressDisabled := util.IsExternalControlPlaneWithIngressDisabled(infrastructureConfig, clusterVersionConfig) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ingressDisabled { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The PR description mentions "manifests: Gate openshift-ingress-operator namespace Role and RoleBinding with Console+Ingress capability annotation" but I don't see any manifest changes in this PR. I also couldn't find any console-operator manifests that target the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh yeah, I need to update the description. That role was deleted in the meanwhile in another commit.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| klog.Info("Ingress capability is disabled in external control plane topology, skipping route and health check controllers") | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pollAndCallOnIngressEnabled(ctx, configClient, time.Minute*5, func() { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| klog.Info("Ingress capability has been enabled, restarting to start route and health check controllers") | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| syscall.Kill(syscall.Getpid(), syscall.SIGINT) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
coderabbitai[bot] marked this conversation as resolved.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // TODO: rearrange these into informer,client pairs, NOT separated. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleOperator := consoleoperator.NewConsoleOperator( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ctx, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -288,6 +307,8 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().Consoles(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesInformersNamespaced.Route().V1().Routes(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configInformers.Config().V1().Ingresses(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configInformers.Config().V1().Infrastructures(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configInformers.Config().V1().ClusterVersions(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubeInformersNamespaced.Core().V1().Secrets(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| oauthClientsSwitchedInformer, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| recorder, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -416,55 +437,63 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| recorder, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleRouteController := route.NewRouteSyncController( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| api.OpenShiftConsoleRouteName, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // enable health check for console route | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| true, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // top level config | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configInformers, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // clients | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorClient, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesClient.RouteV1(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // route | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().Consoles(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().IngressControllers(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubeInformersConfigNamespaced.Core().V1().Secrets(), // `openshift-config` namespace informers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesInformersNamespaced.Route().V1().Routes(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // events | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| recorder, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| downloadsRouteController := route.NewRouteSyncController( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| api.OpenShiftConsoleDownloadsRouteName, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // disable health check for console route | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| false, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // top level config | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configInformers, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // clients | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorClient, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesClient.RouteV1(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // route | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().Consoles(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().IngressControllers(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubeInformersConfigNamespaced.Core().V1().Secrets(), // `openshift-config` namespace informers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesInformersNamespaced.Route().V1().Routes(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // events | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| recorder, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleRouteHealthCheckController := healthcheck.NewHealthCheckController( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // top level config | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configClient.ConfigV1(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // clients | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorClient, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // route | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().Consoles(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configInformers, // Config | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubeInformersNamespaced.Core().V1(), // `openshift-console` namespace informers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesInformersNamespaced.Route().V1().Routes(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // events | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| recorder, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| var consoleRouteController, downloadsRouteController interface { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Run(ctx context.Context, workers int) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| var consoleRouteHealthCheckController interface { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Run(ctx context.Context, workers int) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if !ingressDisabled { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleRouteController = route.NewRouteSyncController( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| api.OpenShiftConsoleRouteName, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // enable health check for console route | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| true, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // top level config | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configInformers, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // clients | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorClient, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesClient.RouteV1(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // route | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().Consoles(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().IngressControllers(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubeInformersConfigNamespaced.Core().V1().Secrets(), // `openshift-config` namespace informers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesInformersNamespaced.Route().V1().Routes(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // events | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| recorder, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| downloadsRouteController = route.NewRouteSyncController( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| api.OpenShiftConsoleDownloadsRouteName, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // disable health check for console route | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| false, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // top level config | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configInformers, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // clients | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorClient, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesClient.RouteV1(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // route | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().Consoles(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().IngressControllers(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubeInformersConfigNamespaced.Core().V1().Secrets(), // `openshift-config` namespace informers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesInformersNamespaced.Route().V1().Routes(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // events | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| recorder, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleRouteHealthCheckController = healthcheck.NewHealthCheckController( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // top level config | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configClient.ConfigV1(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // clients | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorClient, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // route | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| operatorConfigInformers.Operator().V1().Consoles(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configInformers, // Config | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubeInformersNamespaced.Core().V1(), // `openshift-console` namespace informers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| routesInformersNamespaced.Route().V1().Routes(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // events | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| recorder, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| upgradeNotificationController := upgradenotification.NewUpgradeNotificationController( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // top level config | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -664,7 +693,7 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| informer.Start(ctx.Done()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for _, controller := range []interface { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| controllers := []interface { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Run(ctx context.Context, workers int) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }{ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| migrationCleanupController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -677,13 +706,10 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleServiceAccountController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| downloadsServiceAccountController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleServiceController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleRouteController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| downloadsServiceController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| downloadsRouteController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleOperator, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cliDownloadsController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| downloadsDeploymentController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleRouteHealthCheckController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consolePDBController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| downloadsPDBController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| oauthClientController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -693,7 +719,15 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| upgradeNotificationController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| staleConditionsController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storageversionmigrationController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if !ingressDisabled { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| controllers = append(controllers, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleRouteController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| downloadsRouteController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| consoleRouteHealthCheckController, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you check my AI slop and verify that those controllers don't need to be in the list Slop report# console-operator: Network & Ingress Dependency SummaryDirect Network CallsOnly one controller makes real outbound network connections:
All others interact exclusively through the kube-apiserver (informers, listers, typed clients). Several import Controllers That Break If Ingress Is Disabled"Ingress disabled" means the cluster router is gone (Routes never reach
Controllers Not Affected by Ingress
Designed Escape Hatches1. Explicit URL overrides (bypasses
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field | Bypasses IngressURI in |
|---|---|
operatorConfig.Spec.Ingress.ConsoleURL |
consoleOperator, oauthClientController, consoleRouteHealthCheckController |
operatorConfig.Spec.Ingress.ClientDownloadsURL |
cliDownloadsController |
2. IsExternalControlPlaneWithIngressDisabled() (HyperShift)
When the cluster is HyperShift (ExternalTopologyMode) and the Ingress capability is disabled in ClusterVersion.Status.Capabilities:
consoleRouteController/downloadsRouteController— short-circuit withnil(no route created, no error set)consoleServiceController/downloadsServiceController— switch service type fromClusterIP→NodePortso pods are reachable without a router
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything looks in place
Uh oh!
There was an error while loading. Please reload this page.