From 967be63706490368b6253a2550de9cfa649e8f5f Mon Sep 17 00:00:00 2001 From: Tom Martensen Date: Thu, 19 Nov 2026 13:21:30 +0100 Subject: [PATCH 1/4] fix(ocp-ipi): replace hardcoded OCP 4 with OCP IPI --- chart/infra-server/static/flavors.yaml | 40 ++++++++++--------- ...yaml => janitor-delete-openshift-ipi.yaml} | 8 ++-- ....yaml => workflow-openshift-ipi-demo.yaml} | 17 ++++---- ...ift-4.yaml => workflow-openshift-ipi.yaml} | 12 +++--- .../templates/openshift-4/secrets.yaml | 22 +--------- chart/infra-server/templates/secrets.yaml | 12 +++--- cmd/infractl/janitor/find/command.go | 6 +-- scripts/cost-estimation/render_costs.py | 6 +-- 8 files changed, 53 insertions(+), 70 deletions(-) rename chart/infra-server/static/{janitor-delete-openshift-4.yaml => janitor-delete-openshift-ipi.yaml} (82%) rename chart/infra-server/static/{workflow-openshift-4-demo.yaml => workflow-openshift-ipi-demo.yaml} (95%) rename chart/infra-server/static/{workflow-openshift-4.yaml => workflow-openshift-ipi.yaml} (95%) diff --git a/chart/infra-server/static/flavors.yaml b/chart/infra-server/static/flavors.yaml index e759687bc..9e7ad7508 100644 --- a/chart/infra-server/static/flavors.yaml +++ b/chart/infra-server/static/flavors.yaml @@ -196,15 +196,17 @@ description: Instructions for obtaining SSH access to instances in your cluster #################### -# openshift-4 # +# openshift-ipi # #################### -- id: openshift-4 - name: OpenShift 4.x - description: OpenShift 4.x OCP or OKD cluster +- id: openshift-ipi + name: OpenShift IPI + description: OpenShift OCP or OKD cluster availability: stable - workflow: configuration/workflow-openshift-4.yaml + workflow: configuration/workflow-openshift-ipi.yaml aliases: - ocp-4 + - openshift-4 + - ocp parameters: - name: name description: cluster name @@ -379,15 +381,16 @@ description: SSH credentials for optional VMs (present when vm-os is non-empty) ###################### -# openshift-4-demo # +# openshift-ipi-demo # ###################### -- id: openshift-4-demo - name: OpenShift 4.x Demo - description: OpenShift 4.x Demo +- id: openshift-ipi-demo + name: OpenShift IPI Demo + description: OpenShift IPI Demo availability: stable - workflow: configuration/workflow-openshift-4-demo.yaml + workflow: configuration/workflow-openshift-ipi-demo.yaml aliases: - ocp-4-demo + - openshift-4-demo parameters: - name: name description: cluster name @@ -593,15 +596,16 @@ description: The password to login at the openshift console ############################ -# openshift-4-perf-scale # +# openshift-ipi-perf-scale # ############################ -- id: openshift-4-perf-scale - name: OpenShift 4.x Perf&Scale - description: OpenShift 4.x Perf&Scale +- id: openshift-ipi-perf-scale + name: OpenShift IPI Perf&Scale + description: OpenShift IPI Perf&Scale availability: stable - workflow: configuration/workflow-openshift-4.yaml + workflow: configuration/workflow-openshift-ipi.yaml aliases: - ocp-4-perf-scale + - openshift-4-perf-scale parameters: - name: name description: cluster name @@ -1269,11 +1273,11 @@ description: Google Cloud zone to delete infrastructure from. value: us-central1-a -- id: janitor-delete-openshift-4 +- id: janitor-delete-openshift-ipi name: Janitor delete Openshift - description: Flavor to delete Openshift 4 clusters + description: Flavor to delete Openshift IPI clusters availability: janitorDelete - workflow: configuration/janitor-delete-openshift-4.yaml + workflow: configuration/janitor-delete-openshift-ipi.yaml parameters: - name: name description: cluster name diff --git a/chart/infra-server/static/janitor-delete-openshift-4.yaml b/chart/infra-server/static/janitor-delete-openshift-ipi.yaml similarity index 82% rename from chart/infra-server/static/janitor-delete-openshift-4.yaml rename to chart/infra-server/static/janitor-delete-openshift-ipi.yaml index c0cc3370d..b8a66fee1 100644 --- a/chart/infra-server/static/janitor-delete-openshift-4.yaml +++ b/chart/infra-server/static/janitor-delete-openshift-ipi.yaml @@ -1,7 +1,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Workflow metadata: - generateName: janitor-delete-openshift-4- + generateName: janitor-delete-openshift-ipi- spec: entrypoint: delete arguments: @@ -18,7 +18,7 @@ spec: volumes: - name: credentials secret: - secretName: openshift-4-gcp-service-account + secretName: openshift-ipi-gcp-service-account templates: - name: delete @@ -29,7 +29,7 @@ spec: - name: destroy container: - image: quay.io/stackrox-io/ci:automation-flavors-openshift-4-{{ .Chart.Annotations.automationFlavorsVersion }} + image: quay.io/stackrox-io/ci:automation-flavors-openshift-ipi-{{ .Chart.Annotations.automationFlavorsVersion }} imagePullPolicy: Always command: - entrypoint.sh @@ -40,7 +40,7 @@ spec: - name: GOOGLE_CREDENTIALS valueFrom: secretKeyRef: - name: openshift-4-gcp-service-account + name: openshift-ipi-gcp-service-account key: google-credentials.json - name: GCP_PROJECT value : "acs-team-temp-dev" diff --git a/chart/infra-server/static/workflow-openshift-4-demo.yaml b/chart/infra-server/static/workflow-openshift-ipi-demo.yaml similarity index 95% rename from chart/infra-server/static/workflow-openshift-4-demo.yaml rename to chart/infra-server/static/workflow-openshift-ipi-demo.yaml index 1a658809a..2371f6148 100644 --- a/chart/infra-server/static/workflow-openshift-4-demo.yaml +++ b/chart/infra-server/static/workflow-openshift-ipi-demo.yaml @@ -1,7 +1,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Workflow metadata: - generateName: openshift-4-demo- + generateName: openshift-ipi-demo- spec: entrypoint: start onExit: stop @@ -44,7 +44,7 @@ spec: volumes: - name: credentials secret: - secretName: openshift-4-gcp-service-account + secretName: openshift-ipi-gcp-service-account - name: demo-secrets secret: secretName: demo-secrets @@ -80,7 +80,7 @@ spec: - name: create container: - image: quay.io/stackrox-io/ci:automation-flavors-openshift-4-{{ .Chart.Annotations.automationFlavorsVersion }} + image: quay.io/stackrox-io/ci:automation-flavors-openshift-ipi-{{ .Chart.Annotations.automationFlavorsVersion }} imagePullPolicy: Always volumeMounts: - name: data @@ -95,7 +95,7 @@ spec: - name: GOOGLE_CREDENTIALS valueFrom: secretKeyRef: - name: openshift-4-gcp-service-account + name: openshift-ipi-gcp-service-account key: google-credentials.json - name: GCP_PROJECT value : "acs-team-temp-dev" @@ -154,7 +154,7 @@ spec: parameters: - name: kubeconfig-base64 container: - image: quay.io/stackrox-io/ci:automation-flavors-openshift-4-demo-{{ .Chart.Annotations.automationFlavorsVersion }} + image: quay.io/stackrox-io/ci:automation-flavors-openshift-ipi-demo-{{ .Chart.Annotations.automationFlavorsVersion }} imagePullPolicy: Always command: - ansible-playbook @@ -173,7 +173,7 @@ spec: - name: GOOGLE_CREDENTIALS valueFrom: secretKeyRef: - name: openshift-4-gcp-service-account + name: openshift-ipi-gcp-service-account key: google-credentials.json - name: CENTRAL_PORT value: "443" @@ -273,7 +273,7 @@ spec: - name: destroy container: - image: quay.io/stackrox-io/ci:automation-flavors-openshift-4-{{ .Chart.Annotations.automationFlavorsVersion }} + image: quay.io/stackrox-io/ci:automation-flavors-openshift-ipi-{{ .Chart.Annotations.automationFlavorsVersion }} imagePullPolicy: Always command: - entrypoint.sh @@ -284,11 +284,10 @@ spec: - name: GOOGLE_CREDENTIALS valueFrom: secretKeyRef: - name: openshift-4-gcp-service-account + name: openshift-ipi-gcp-service-account key: google-credentials.json - name: GCP_PROJECT value : "acs-team-temp-dev" volumeMounts: - name: data mountPath: /data - diff --git a/chart/infra-server/static/workflow-openshift-4.yaml b/chart/infra-server/static/workflow-openshift-ipi.yaml similarity index 95% rename from chart/infra-server/static/workflow-openshift-4.yaml rename to chart/infra-server/static/workflow-openshift-ipi.yaml index 74866f881..abbdb970f 100644 --- a/chart/infra-server/static/workflow-openshift-4.yaml +++ b/chart/infra-server/static/workflow-openshift-ipi.yaml @@ -1,7 +1,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Workflow metadata: - generateName: openshift-4- + generateName: openshift-ipi- spec: entrypoint: start onExit: stop @@ -47,7 +47,7 @@ spec: volumes: - name: credentials secret: - secretName: openshift-4-gcp-service-account + secretName: openshift-ipi-gcp-service-account - name: registry-pull-secret secret: secretName: infra-image-registry-pull-secret @@ -102,7 +102,7 @@ spec: archive: none: {} container: - image: quay.io/stackrox-io/ci:automation-flavors-openshift-4-{{ .Chart.Annotations.automationFlavorsVersion }} + image: quay.io/stackrox-io/ci:automation-flavors-openshift-ipi-{{ .Chart.Annotations.automationFlavorsVersion }} imagePullPolicy: Always command: - entrypoint.sh @@ -114,7 +114,7 @@ spec: - name: GOOGLE_CREDENTIALS valueFrom: secretKeyRef: - name: openshift-4-gcp-service-account + name: openshift-ipi-gcp-service-account key: google-credentials.json - name: GCP_PROJECT value : "acs-team-temp-dev" @@ -209,7 +209,7 @@ spec: - name: destroy container: - image: quay.io/stackrox-io/ci:automation-flavors-openshift-4-{{ .Chart.Annotations.automationFlavorsVersion }} + image: quay.io/stackrox-io/ci:automation-flavors-openshift-ipi-{{ .Chart.Annotations.automationFlavorsVersion }} imagePullPolicy: Always command: - entrypoint.sh @@ -220,7 +220,7 @@ spec: - name: GOOGLE_CREDENTIALS valueFrom: secretKeyRef: - name: openshift-4-gcp-service-account + name: openshift-ipi-gcp-service-account key: google-credentials.json - name: GCP_PROJECT value : "acs-team-temp-dev" diff --git a/chart/infra-server/templates/openshift-4/secrets.yaml b/chart/infra-server/templates/openshift-4/secrets.yaml index 1f9aa6987..5fdc40784 100644 --- a/chart/infra-server/templates/openshift-4/secrets.yaml +++ b/chart/infra-server/templates/openshift-4/secrets.yaml @@ -3,33 +3,13 @@ kind: Secret type: Opaque metadata: - name: openshift-4-gcp-service-account + name: openshift-ipi-gcp-service-account namespace: default data: google-credentials.json: |- {{ required ".Values.openshift_4__gcp_service_account_key_json is undefined" .Values.openshift_4__gcp_service_account_key_json }} - ---- - -# (deprecated) this secret is used for openshift-4 provisioning with -# stackrox.com GCP and can be removed once the migration away from that account -# and its projects are complete. In the meantime this must remain to facilitate -# drain and rollback if required. -apiVersion: v1 -kind: Secret -type: Opaque - -metadata: - name: google-credentials-openshift-4 - namespace: default - -data: - google-credentials.json: |- - {{ required ".Values.openshift_4__google_credentials_json is undefined" .Values.openshift_4__google_credentials_json }} - - --- apiVersion: v1 diff --git a/chart/infra-server/templates/secrets.yaml b/chart/infra-server/templates/secrets.yaml index ddf06699f..5acf01568 100644 --- a/chart/infra-server/templates/secrets.yaml +++ b/chart/infra-server/templates/secrets.yaml @@ -40,11 +40,11 @@ data: workflow-qa-demo.yaml: |- {{- tpl (.Files.Get "static/workflow-qa-demo.yaml" ) . | b64enc | nindent 4 }} - workflow-openshift-4.yaml: |- - {{- tpl (.Files.Get "static/workflow-openshift-4.yaml" ) . | b64enc | nindent 4 }} + workflow-openshift-ipi.yaml: |- + {{- tpl (.Files.Get "static/workflow-openshift-ipi.yaml" ) . | b64enc | nindent 4 }} - workflow-openshift-4-demo.yaml: |- - {{- tpl (.Files.Get "static/workflow-openshift-4-demo.yaml" ) . | b64enc | nindent 4 }} + workflow-openshift-ipi-demo.yaml: |- + {{- tpl (.Files.Get "static/workflow-openshift-ipi-demo.yaml" ) . | b64enc | nindent 4 }} workflow-eks.yaml: |- {{- tpl (.Files.Get "static/workflow-eks.yaml" ) . | b64enc | nindent 4 }} @@ -74,8 +74,8 @@ data: janitor-delete-gke-default.yaml: |- {{- tpl (.Files.Get "static/janitor-delete-gke-default.yaml" ) . | b64enc | nindent 4 }} - janitor-delete-openshift-4.yaml: |- - {{- tpl (.Files.Get "static/janitor-delete-openshift-4.yaml" ) . | b64enc | nindent 4 }} + janitor-delete-openshift-ipi.yaml: |- + {{- tpl (.Files.Get "static/janitor-delete-openshift-ipi.yaml" ) . | b64enc | nindent 4 }} janitor-delete-openshift-rosa.yaml: |- {{- tpl (.Files.Get "static/janitor-delete-openshift-rosa.yaml" ) . | b64enc | nindent 4 }} diff --git a/cmd/infractl/janitor/find/command.go b/cmd/infractl/janitor/find/command.go index cc9d96b9c..e07bfee24 100644 --- a/cmd/infractl/janitor/find/command.go +++ b/cmd/infractl/janitor/find/command.go @@ -23,11 +23,11 @@ var ( "test-simulate", // for e2e tests "gke-default", "demo", - "openshift-4", - "openshift-4-demo", + "openshift-ipi", + "openshift-ipi-demo", "osd-on-gcp", "qa-demo", - "openshift-4-perf-scale", + "openshift-ipi-perf-scale", "openshift-multi", } relevantStatusesForJanitor = []v1.Status{ diff --git a/scripts/cost-estimation/render_costs.py b/scripts/cost-estimation/render_costs.py index b3c95f7ff..55a0393eb 100644 --- a/scripts/cost-estimation/render_costs.py +++ b/scripts/cost-estimation/render_costs.py @@ -8,9 +8,9 @@ "demo": 33, "gke-default": 10, "ibmroks": 56, - "openshift-4": 29, - "openshift-4-demo": 53, - "openshift-4-perf-scale": 70, + "openshift-ipi": 29, + "openshift-ipi-demo": 53, + "openshift-ipi-perf-scale": 70, "openshift-multi": 10, "osd-on-gcp": 35, "qa-demo": 33, From 745255724754dd07b6380a6fb6e47c671d68a3b6 Mon Sep 17 00:00:00 2001 From: Tom Martensen Date: Thu, 19 Nov 2026 13:35:08 +0100 Subject: [PATCH 2/4] fix(ocp-ipi): keep legacy openshift-4 references for in-flight resources Address CodeRabbit findings on the openshift-4 -> openshift-ipi rename: - Keep the openshift-4-gcp-service-account Secret alongside its renamed counterpart. Workflows created before the rename reference the old Secret name in their stored specs and can be suspended at their wait step across the upgrade; without it their destroy step cannot run. - Keep the legacy openshift-4* flavor IDs in the janitor find-gcp filter. Clusters created before the rename keep these as their flavor, and the list request matches flavors exactly, so they would otherwise be excluded and their instances reported as orphaned. Both are transitional and can be removed once no pre-rename workflows or clusters remain. Co-Authored-By: Claude Code --- .../templates/openshift-4/secrets.yaml | 18 ++++++++++++++++++ cmd/infractl/janitor/find/command.go | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/chart/infra-server/templates/openshift-4/secrets.yaml b/chart/infra-server/templates/openshift-4/secrets.yaml index 5fdc40784..992f73c20 100644 --- a/chart/infra-server/templates/openshift-4/secrets.yaml +++ b/chart/infra-server/templates/openshift-4/secrets.yaml @@ -10,6 +10,24 @@ data: google-credentials.json: |- {{ required ".Values.openshift_4__gcp_service_account_key_json is undefined" .Values.openshift_4__gcp_service_account_key_json }} +--- +# (deprecated) this secret was renamed to openshift-ipi-gcp-service-account. +# Workflows created before the rename reference the old name in their stored +# specs and can remain suspended at their wait step across the upgrade; without +# this secret their destroy step cannot run. It can be removed once no +# workflows created before the rename are left. +apiVersion: v1 +kind: Secret +type: Opaque + +metadata: + name: openshift-4-gcp-service-account + namespace: default + +data: + google-credentials.json: |- + {{ required ".Values.openshift_4__gcp_service_account_key_json is undefined" .Values.openshift_4__gcp_service_account_key_json }} + --- apiVersion: v1 diff --git a/cmd/infractl/janitor/find/command.go b/cmd/infractl/janitor/find/command.go index e07bfee24..25e325d93 100644 --- a/cmd/infractl/janitor/find/command.go +++ b/cmd/infractl/janitor/find/command.go @@ -28,6 +28,12 @@ var ( "osd-on-gcp", "qa-demo", "openshift-ipi-perf-scale", + // Legacy IDs from before the rename to openshift-ipi; clusters created + // before the rename keep these as their flavor. Remove once no + // pre-rename clusters are left. + "openshift-4", + "openshift-4-demo", + "openshift-4-perf-scale", "openshift-multi", } relevantStatusesForJanitor = []v1.Status{ From 67f81ba46c927596b9206febb3950f1d353f8575 Mon Sep 17 00:00:00 2001 From: Tom Martensen Date: Fri, 20 Nov 2026 10:38:09 +0100 Subject: [PATCH 3/4] bump the automation-flavors version --- chart/infra-server/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/infra-server/Chart.yaml b/chart/infra-server/Chart.yaml index ee8630f95..07d81aafa 100644 --- a/chart/infra-server/Chart.yaml +++ b/chart/infra-server/Chart.yaml @@ -8,7 +8,7 @@ sources: - https://github.com/stackrox/infra annotations: acsDemoVersion: 5.0.0 - automationFlavorsVersion: 0.17.3 + automationFlavorsVersion: 0.17.6 ocpCredentialsMode: Passthrough dependencies: - name: argo-workflows From d1bdc196a5ed452821bde61be4e20c65d7ac7be0 Mon Sep 17 00:00:00 2001 From: Tom Martensen Date: Fri, 20 Nov 2026 11:53:38 +0100 Subject: [PATCH 4/4] fix naming of secrets and remove openshift-multi one (no running clusters with this flavor for long time) --- .../{openshift-4 => openshift-ipi}/secrets.yaml | 0 chart/infra-server/templates/openshift/secrets.yaml | 11 ----------- 2 files changed, 11 deletions(-) rename chart/infra-server/templates/{openshift-4 => openshift-ipi}/secrets.yaml (100%) delete mode 100644 chart/infra-server/templates/openshift/secrets.yaml diff --git a/chart/infra-server/templates/openshift-4/secrets.yaml b/chart/infra-server/templates/openshift-ipi/secrets.yaml similarity index 100% rename from chart/infra-server/templates/openshift-4/secrets.yaml rename to chart/infra-server/templates/openshift-ipi/secrets.yaml diff --git a/chart/infra-server/templates/openshift/secrets.yaml b/chart/infra-server/templates/openshift/secrets.yaml deleted file mode 100644 index 42ef2129b..000000000 --- a/chart/infra-server/templates/openshift/secrets.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Secret -type: Opaque - -metadata: - name: google-credentials-openshift - namespace: default - -data: - google-credentials.json: |- - {{ required ".Values.openshift__google_credentials_json is undefined" .Values.openshift__google_credentials_json }}