Skip to content

fix(ci): fix operator deployments on K8s — inherit rendering, rollout wait, and orchestrator config [release-1.9] - #4423

Merged
openshift-merge-bot[bot] merged 10 commits into
redhat-developer:release-1.9from
gustavolira:fix/ci-operator-inherit-template
Mar 26, 2026
Merged

fix(ci): fix operator deployments on K8s — inherit rendering, rollout wait, and orchestrator config [release-1.9]#4423
openshift-merge-bot[bot] merged 10 commits into
redhat-developer:release-1.9from
gustavolira:fix/ci-operator-inherit-template

Conversation

@gustavolira

@gustavolira gustavolira commented Mar 18, 2026

Copy link
Copy Markdown
Member

Summary

Fixes multiple CI issues affecting K8s operator deployments (AKS, EKS, GKE, OSD-GCP) on the release-1.9 branch.

1. Render Helm template escapes in operator ConfigMap

Value files use {{ "{{" }}inherit{{ "}}" }} which Helm renders automatically, but operator deployments use these files directly via yq without Helm rendering. Added sed post-processing in config::create_dynamic_plugins_config to convert the escapes to {{inherit}}.

Related: #4414 (merged to main)

2. Wait for operator rollout to stabilize

Added wait_for_operator_rollout() to AKS, EKS, and GKE operator deployment scripts. The RHDH operator may update the Deployment spec multiple times after the Backstage CR is applied, causing race conditions with subsequent steps (e.g., ingress patching, spot instance configuration).

3. Orchestrator config in diff-values files

Moved orchestrator-related plugin configuration to the appropriate diff-values files and disabled orchestrator plugins on K8s RBAC deployments where they are not needed.

Changed files

  • .ci/pipelines/utils.sh{{inherit}} sed fix + wait_for_operator_rollout() function
  • .ci/pipelines/cluster/{aks,eks,gke}/*-operator-deployment.sh — call wait_for_operator_rollout
  • .ci/pipelines/value_files/diff-values_showcase*.yaml — orchestrator config adjustments

Test plan

  • Verify AKS operator nightly passes
  • Verify EKS operator nightly passes
  • Verify GKE operator nightly passes
  • Verify OSD-GCP nightly passes
  • Verify {{inherit}} is correctly rendered in operator dynamic-plugins ConfigMap

🤖 Generated with Claude Code

@openshift-ci
openshift-ci Bot requested review from kadel and rostalan March 18, 2026 14:39
@gustavolira

Copy link
Copy Markdown
Member Author

/test ?

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-gke-operator-nightly

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@gustavolira
gustavolira force-pushed the fix/ci-operator-inherit-template branch from e84fb70 to c451bc3 Compare March 18, 2026 17:06
@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@gustavolira

Copy link
Copy Markdown
Member Author

/test ?

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-ocp-operator-nightly

@gustavolira

Copy link
Copy Markdown
Member Author

The operator wasn’t running Backstage, it failed during the dynamic plugins container installation, so Backstage never started. Now Backstage is up and the tests are running as expected.

Comment thread .ci/pipelines/cluster/aks/aks-operator-deployment.sh Outdated
gustavolira added a commit to gustavolira/rhdh that referenced this pull request Mar 19, 2026
The operator creates orchestrator resources asynchronously after the
Backstage CR is applied. The cleanup now polls for up to 60s for the
sonataflow jobs to appear before attempting deletion, instead of running
immediately when the resources may not exist yet.

Addresses review feedback: redhat-developer#4423 (comment)

[skip-build]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@zdrapela

Copy link
Copy Markdown
Member

/test e2e-eks-operator-nightly
/test e2e-aks-helm-nightly

@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-eks-operator-nightly
/test e2e-aks-helm-nightly

@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-eks-operator-nightly
/test e2e-aks-helm-nightly

@gustavolira

Copy link
Copy Markdown
Member Author

@zdrapela now the issues were resolved!

@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-eks-operator-nightly
/test e2e-aks-helm-nightly

Comment thread .ci/pipelines/cluster/aks/aks-helm-deployment.sh Outdated
Comment thread .ci/pipelines/utils.sh Outdated
@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-ocp-helm

gustavolira added a commit to gustavolira/rhdh that referenced this pull request Mar 23, 2026
The operator creates orchestrator resources asynchronously after the
Backstage CR is applied. The cleanup now polls for up to 60s for the
sonataflow jobs to appear before attempting deletion, instead of running
immediately when the resources may not exist yet.

Addresses review feedback: redhat-developer#4423 (comment)

[skip-build]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gustavolira
gustavolira force-pushed the fix/ci-operator-inherit-template branch from f955465 to 851cb28 Compare March 23, 2026 23:40
@openshift-ci openshift-ci Bot removed the lgtm label Mar 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@gustavolira gustavolira changed the title fix(ci): render Helm template escapes in operator dynamic plugins ConfigMap fix(ci): fix operator deployments on K8s — inherit rendering, rollout wait, and orchestrator config [release-1.9] Mar 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@zdrapela zdrapela left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't wait_for_operator_rollout be used in ocp-operator.sh after deploy_rhdh_operator too? Or is this K8s specific?

gustavolira added a commit to gustavolira/rhdh that referenced this pull request Mar 24, 2026
…deploy

Address review comment from zdrapela on PR redhat-developer#4423: ocp-operator.sh was
missing wait_for_operator_rollout calls after deploy_rhdh_operator,
inconsistent with AKS/EKS/GKE scripts. Added the wait in all 5 call
sites across initiate_operator_deployments,
initiate_operator_deployments_osd_gcp, and
run_operator_runtime_config_change_tests to prevent the same race
condition on OCP deployments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@gustavolira

Copy link
Copy Markdown
Member Author

Shouldn't wait_for_operator_rollout be used in ocp-operator.sh after deploy_rhdh_operator too? Or is this K8s specific?

Thanks, you are right. I just fixed it

@openshift-ci

openshift-ci Bot commented Mar 24, 2026

Copy link
Copy Markdown

@gustavolira: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gke-operator-nightly 2fc0eee link false /test e2e-gke-operator-nightly
ci/prow/e2e-ocp-operator-nightly c451bc3 link false /test e2e-ocp-operator-nightly
ci/prow/e2e-eks-operator-nightly e0ac2e9 link false /test e2e-eks-operator-nightly

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

gustavolira and others added 10 commits March 25, 2026 11:22
…figMap

The value files use Helm escaping for {{inherit}} tags:
{{ "{{" }}inherit{{ "}}" }}. Helm renders this automatically, but operator
deployments use create_dynamic_plugins_config() which extracts the YAML
directly without Helm rendering. The install-dynamic-plugins.py init
container then fails because it receives the raw Helm escape syntax
instead of {{inherit}}.

Add sed substitutions to strip the Helm escaping when generating the
dynamic plugins ConfigMap for operator deployments.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The RHDH operator's internal Helm chart creates orchestrator/SonataFlow
infrastructure (database jobs, platform resources) even on non-OpenShift
environments where it's not supported. This causes
CreateContainerConfigError on GKE/AKS/EKS because required secrets and
operators are not available.

Add cleanup_orchestrator_resources() that removes SonataFlow jobs and
resources after operator deployment on K8s. Called in all GKE, AKS, and
EKS operator deployment scripts for both showcase and showcase-rbac.

[skip-build]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The operator creates orchestrator resources asynchronously after the
Backstage CR is applied. The cleanup now polls for up to 60s for the
sonataflow jobs to appear before attempting deletion, instead of running
immediately when the resources may not exist yet.

Addresses review feedback: redhat-developer#4423 (comment)

[skip-build]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The RBAC diff files for AKS/EKS/GKE had `plugins: []` which left
orchestrator plugins from the base file enabled after merge. This
caused init containers to download unnecessary OCI plugins and the
operator to create sonataflow-database jobs that fail (missing
PostgreSQL secrets on K8s).

Add explicit orchestrator plugin disable entries to all K8s RBAC
diff files and fix cleanup_orchestrator_resources to match job names
by prefix instead of exact field-selector (jobs have random suffixes).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…unction

Fix prettier code style in utils.sh and add explicit return statement
at the end of cleanup_orchestrator_resources (Sonar S7682).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…oyments

The cleanup function deletes resources managed by the RHDH operator,
triggering reconciliation that creates a second ReplicaSet (double
rollout). On EKS this causes PostgreSQL EBS Multi-Attach errors
because the volume can't be reattached to a different node during
the rollout.

Since orchestrator plugins are now disabled in all K8s RBAC diff
files, the failing sonataflow-database jobs are harmless background
noise that don't block Backstage from starting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add --set orchestrator.enabled=false to all K8s helm upgrade commands
(AKS, EKS, GKE) to prevent the chart from creating sonataflow-database
jobs and other orchestrator infrastructure that is not supported on K8s.

The orchestrator: null in diff files gets removed by yq merge's
del(.. | select(. == null)), so the chart falls back to its default
(enabled: true). The --set flag takes highest precedence in Helm.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The RHDH operator updates the Deployment spec multiple times after
the Backstage CR is applied, creating multiple ReplicaSets (double
rollout). Two competing pods cause 503 errors as they conflict on
the database.

Add wait_for_operator_rollout() that waits for the deployment to
exist and for kubectl rollout status to complete before proceeding,
ensuring only one ReplicaSet is active.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d code

Move `orchestrator.enabled: false` from `--set` flags in helm commands
to the diff-values YAML files for all K8s platforms (EKS, AKS, GKE,
OSD-GCP, upgrade). This follows the existing pattern and makes the
configuration more readable and declarative.

Also removes the unused `cleanup_orchestrator_resources()` function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…deploy

Address review comment from zdrapela on PR redhat-developer#4423: ocp-operator.sh was
missing wait_for_operator_rollout calls after deploy_rhdh_operator,
inconsistent with AKS/EKS/GKE scripts. Added the wait in all 5 call
sites across initiate_operator_deployments,
initiate_operator_deployments_osd_gcp, and
run_operator_runtime_config_change_tests to prevent the same race
condition on OCP deployments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gustavolira
gustavolira force-pushed the fix/ci-operator-inherit-template branch from 7268891 to 4cd1983 Compare March 25, 2026 14:24
@github-actions

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@sonarqubecloud

Copy link
Copy Markdown

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-aks-helm-nightly

@openshift-ci openshift-ci Bot added the lgtm label Mar 26, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 5cc4db2 into redhat-developer:release-1.9 Mar 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants