Skip to content

Commit c4b8bbe

Browse files
committed
Fix kustomize replacements
1 parent 66fbc09 commit c4b8bbe

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

config/default/kustomization.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,16 @@ resources:
2020
# Only CR(s) which requires webhooks and are applied on namespaces labeled with 'webhooks: enabled' will
2121
# be able to communicate with the Webhook Server.
2222
#- ../network-policy
23+
24+
# Patch the SERVICE_NAME env var in the Operator Deployment
25+
# with the name of the Operator REST service.
26+
replacements:
27+
- source:
28+
kind: Service
29+
name: rest
30+
targets:
31+
- select:
32+
kind: Deployment
33+
name: controller-manager
34+
fieldPaths:
35+
- spec.template.spec.containers.0.env.[name=SERVICE_NAME].value

config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ spec:
6969
fieldRef:
7070
fieldPath: metadata.name
7171
- name: SERVICE_NAME
72-
value: $(REST_SERVICE_NAME)
72+
value: REST_SERVICE_NAME
7373
readinessProbe:
7474
httpGet:
7575
port: health

0 commit comments

Comments
 (0)