Skip to content

Commit 70244a1

Browse files
committed
Use metadata to determine namespace in args
Use an env to get the metadata.namespace, and then use a variable in the arguments to get the value. Avoids putting the namespace into the manifest. Signed-off-by: Todd Short <[email protected]>
1 parent 5665a32 commit 70244a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

config/base/catalogd/manager/manager.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ spec:
4646
args:
4747
- --leader-elect
4848
- --metrics-bind-address=:7443
49-
- --external-address=catalogd-service.olmv1-system.svc
49+
- --external-address=catalogd-service.$(POD_NAMESPACE).svc
50+
env:
51+
- name: POD_NAMESPACE
52+
valueFrom:
53+
fieldRef:
54+
fieldPath: metadata.namespace
5055
image: controller:latest
5156
name: manager
5257
volumeMounts:

0 commit comments

Comments
 (0)