Skip to content

Commit 987045d

Browse files
jsell-rhclaude
andauthored
fix(manifests): fix port name length and env patch conflict in deploy (#1613)
## Summary - **`ambient-ui-proxy` port name** (16 chars) exceeds Kubernetes' 15-char limit, causing the Service and Deployment to fail validation. Renamed to `oauthproxy` across `ambient-ui-oauth-patch.yaml`, `ambient-ui-service-patch.yaml`, and `ambient-ui-route.yaml`. - **`GITHUB_CALLBACK_URL` env conflict** — `frontend-github-callback-patch.yaml` used JSON Patch `op: add` which unconditionally appends to the env array. On re-apply against a live cluster that already had the env var set, Kubernetes ended up with `env[7]` containing both `value` and `valueFrom`, which it rejects. Fixed by moving `GITHUB_CALLBACK_URL` into the base `frontend-deployment.yaml` (strategic merge patch deduplication handles updates cleanly) and removing the patch file entirely. Fixes the failing `deploy-to-openshift` job run [#26603107854](https://github.com/ambient-code/platform/actions/runs/26603107854). ## Test plan - [ ] `kustomize build components/manifests/overlays/production` produces no errors - [ ] All port references to `ambient-ui-proxy` renamed to `oauthproxy` (≤15 chars) - [ ] `GITHUB_CALLBACK_URL` appears in frontend env with only `valueFrom` (no `value` field) - [ ] `deploy-to-openshift` job passes on merge to main 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4b1a0cf commit 987045d

6 files changed

Lines changed: 12 additions & 27 deletions

File tree

components/manifests/base/core/frontend-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ spec:
4444
name: unleash-credentials
4545
key: client-api-token
4646
optional: true
47+
- name: GITHUB_CALLBACK_URL
48+
valueFrom:
49+
configMapKeyRef:
50+
name: frontend-config
51+
key: github-callback-url
52+
optional: true
4753
resources:
4854
requests:
4955
cpu: 100m

components/manifests/overlays/production/ambient-ui-oauth-patch.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ spec:
3939
- --skip-auth-regex=^/metrics
4040
ports:
4141
- containerPort: 8443
42-
name: ambient-ui-proxy
42+
name: oauthproxy
4343
livenessProbe:
4444
httpGet:
4545
path: /oauth/healthz
46-
port: ambient-ui-proxy
46+
port: oauthproxy
4747
scheme: HTTP
4848
initialDelaySeconds: 30
4949
periodSeconds: 5
5050
readinessProbe:
5151
httpGet:
5252
path: /oauth/healthz
53-
port: ambient-ui-proxy
53+
port: oauthproxy
5454
scheme: HTTP
5555
initialDelaySeconds: 5
5656
periodSeconds: 5

components/manifests/overlays/production/ambient-ui-route.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
name: ambient-ui-service
1111
weight: 100
1212
port:
13-
targetPort: ambient-ui-proxy
13+
targetPort: oauthproxy
1414
tls:
1515
termination: edge
1616
insecureEdgeTerminationPolicy: Redirect

components/manifests/overlays/production/ambient-ui-service-patch.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ metadata:
77
spec:
88
ports:
99
- port: 8443
10-
targetPort: ambient-ui-proxy
10+
targetPort: oauthproxy
1111
protocol: TCP
12-
name: ambient-ui-proxy
12+
name: oauthproxy

components/manifests/overlays/production/frontend-github-callback-patch.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

components/manifests/overlays/production/kustomization.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ patches:
6868
kind: Service
6969
name: ambient-ui-service
7070
version: v1
71-
- path: frontend-github-callback-patch.yaml
72-
target:
73-
group: apps
74-
kind: Deployment
75-
name: frontend
76-
version: v1
77-
7871
# Production images
7972
images:
8073
- name: quay.io/ambient_code/vteam_api_server:latest

0 commit comments

Comments
 (0)