Skip to content

Conversation

@sallyom
Copy link
Collaborator

@sallyom sallyom commented Nov 11, 2025

Problem:
The workflow uses oc patch with "op": "replace" to update env vars, which completely overwrites the env array. Any env vars added to the backend-deployment.yaml manifest but not in the workflow patch get deleted.

Missing env vars:

  • CLAUDE_CODE_USE_VERTEX (from ConfigMap operator-config)
  • OOTB_WORKFLOWS_REPO
  • OOTB_WORKFLOWS_BRANCH
  • OOTB_WORKFLOWS_PATH

These were defined in components/manifests/base/backend-deployment.yaml but missing from the hardcoded patch list, causing them to be removed after deployment.

Why this pattern exists:
The workflow needs to inject dynamic values like image tags from the build. However, using "replace" instead of "add" or selective patching creates drift between manifests (source of truth) and actual deployments.

Better long-term solution:
Use kustomize to handle dynamic env vars (like VTEAM_VERSION) instead of post-deployment patching. This would eliminate the need to maintain two copies of env var lists.

Changes:

  • Added missing env vars to both deploy jobs (deploy-to-openshift and deploy-with-dispatch)
  • Backend deployments will now include all env vars from the manifest

**Problem:**
The workflow uses `oc patch` with "op": "replace" to update env vars,
which completely overwrites the env array. Any env vars added to the
backend-deployment.yaml manifest but not in the workflow patch get deleted.

**Missing env vars:**
- CLAUDE_CODE_USE_VERTEX (from ConfigMap operator-config)
- OOTB_WORKFLOWS_REPO
- OOTB_WORKFLOWS_BRANCH
- OOTB_WORKFLOWS_PATH

These were defined in components/manifests/base/backend-deployment.yaml
but missing from the hardcoded patch list, causing them to be removed
after deployment.

**Why this pattern exists:**
The workflow needs to inject dynamic values like image tags from the build.
However, using "replace" instead of "add" or selective patching creates
drift between manifests (source of truth) and actual deployments.

**Better long-term solution:**
Use kustomize to handle dynamic env vars (like VTEAM_VERSION) instead of
post-deployment patching. This would eliminate the need to maintain two
copies of env var lists.

**Changes:**
- Added missing env vars to both deploy jobs (deploy-to-openshift and deploy-with-dispatch)
- Backend deployments will now include all env vars from the manifest

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: sallyom <somalley@redhat.com>
@sallyom sallyom merged commit 33d1575 into ambient-code:main Nov 11, 2025
10 checks passed
jeremyeder pushed a commit to jeremyeder/platform that referenced this pull request Nov 12, 2025
…ient-code#284)

**Problem:**
The workflow uses `oc patch` with "op": "replace" to update env vars,
which completely overwrites the env array. Any env vars added to the
backend-deployment.yaml manifest but not in the workflow patch get
deleted.

**Missing env vars:**
- CLAUDE_CODE_USE_VERTEX (from ConfigMap operator-config)
- OOTB_WORKFLOWS_REPO
- OOTB_WORKFLOWS_BRANCH
- OOTB_WORKFLOWS_PATH

These were defined in components/manifests/base/backend-deployment.yaml
but missing from the hardcoded patch list, causing them to be removed
after deployment.

**Why this pattern exists:**
The workflow needs to inject dynamic values like image tags from the
build. However, using "replace" instead of "add" or selective patching
creates drift between manifests (source of truth) and actual
deployments.

**Better long-term solution:**
Use kustomize to handle dynamic env vars (like VTEAM_VERSION) instead of
post-deployment patching. This would eliminate the need to maintain two
copies of env var lists.

**Changes:**
- Added missing env vars to both deploy jobs (deploy-to-openshift and
deploy-with-dispatch)
- Backend deployments will now include all env vars from the manifest

Signed-off-by: sallyom <somalley@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant