Replies: 1 comment 1 reply
-
I think you should use kustomize VARS feature to accomplish this use case. See: https://kubectl.docs.kubernetes.io/references/kustomize/vars/ Rollout spec: spec:
template:
spec:
containers:
- image: myimage
command: ["start", "--host", "$(MY_ENV_VAR)"]
env:
- name: MY_ENV_VAR
value: $(SERVICE_B_NAME) In kustomization.yaml: vars:
- name: SERVICE_B_NAME
objref:
kind: Service
name: service-b
apiVersion: v1
fieldref:
fieldpath: metadata.name |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following situation. Service A talks to service B. In service A’s configmap I have a variable pointing to B’s service name.
Is there any way that when I rollout a new revision of A, that the environment variable is changed to now point to B’s preview service? For example using kustomize?
I think the promotion phase might be a bit tricky. Any ideas how to solve this issue in rollouts?
Beta Was this translation helpful? Give feedback.
All reactions