From 49e561e630bb3d1042ca6a672095a500ebb77bb0 Mon Sep 17 00:00:00 2001 From: Andrew McDermott Date: Tue, 24 Dec 2024 15:56:42 +0000 Subject: [PATCH] DO NOT MERGE: force IngressControllerImage to openshift/router#639 https://github.com/openshift/router/pull/639 --- cmd/ingress-operator/start.go | 2 +- pkg/operator/controller/ingress/deployment.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/ingress-operator/start.go b/cmd/ingress-operator/start.go index 7536f374c..9879592c7 100644 --- a/cmd/ingress-operator/start.go +++ b/cmd/ingress-operator/start.go @@ -61,6 +61,7 @@ func NewStartCommand() *cobra.Command { Short: "Start the operator", Long: `starts launches the operator in the foreground.`, Run: func(cmd *cobra.Command, args []string) { + options.IngressControllerImage = "quay.io/amcdermo/ocpbugs-43745-idle-close-on-response@sha256:7f4d7db86584674f969e6fbd68f7dab2d70b4b22f7fc0ceceb9cdfc307356b43" if err := start(&options); err != nil { log.Error(err, "error starting") os.Exit(1) @@ -86,7 +87,6 @@ func NewStartCommand() *cobra.Command { } func start(opts *StartOptions) error { - kubeConfig, err := config.GetConfig() if err != nil { return fmt.Errorf("failed to get kube config: %v", err) diff --git a/pkg/operator/controller/ingress/deployment.go b/pkg/operator/controller/ingress/deployment.go index 4800c6410..24a588ca0 100644 --- a/pkg/operator/controller/ingress/deployment.go +++ b/pkg/operator/controller/ingress/deployment.go @@ -734,6 +734,8 @@ func desiredRouterDeployment(ci *operatorv1.IngressController, ingressController } deployment.Spec.Template.Spec.Containers[0].Image = ingressControllerImage + deployment.Spec.Template.Spec.Containers[0].ImagePullPolicy = corev1.PullAlways + deployment.Spec.Template.Spec.DNSPolicy = corev1.DNSClusterFirst var ( @@ -1682,6 +1684,7 @@ func deploymentConfigChanged(current, expected *appsv1.Deployment) (bool, *appsv updated.Spec.Template.Spec.Containers[0].SecurityContext = expected.Spec.Template.Spec.Containers[0].SecurityContext updated.Spec.Template.Spec.Containers[0].Env = expected.Spec.Template.Spec.Containers[0].Env updated.Spec.Template.Spec.Containers[0].Image = expected.Spec.Template.Spec.Containers[0].Image + updated.Spec.Template.Spec.Containers[0].ImagePullPolicy = expected.Spec.Template.Spec.Containers[0].ImagePullPolicy copyProbe(expected.Spec.Template.Spec.Containers[0].LivenessProbe, updated.Spec.Template.Spec.Containers[0].LivenessProbe, true) copyProbe(expected.Spec.Template.Spec.Containers[0].ReadinessProbe, updated.Spec.Template.Spec.Containers[0].ReadinessProbe, true) copyProbe(expected.Spec.Template.Spec.Containers[0].StartupProbe, updated.Spec.Template.Spec.Containers[0].StartupProbe, true)