Reputation:
I have taken over a code base with a set of yaml files for provisioning kubernetes resources.
In the files I keep finding ${VARIABLE}'s but I just cannot seem to figure out what these are a replacement for ? The only thing I can think of is Azure DevOps pipeline variables or as such. But the Microsoft documentaion clearly says it uses the $(VARIABLE) for variables. Not curly braces.
And at the same time it's for kubernetes, so I am not sure I am looking at this the correct way. It might not even be a Azure DevOps feature but perhaps I need to look somewhere else ?
Am I missing a step somehow or would it merely work to add release pipeline variables?
Thank you for any advice and pointers.
Just a snippet of a file here:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: rss-client-${RELEASE_ENV}
spec:
Upvotes: 1
Views: 404
Reputation: 1611
It's common practice to use these variables in kubernetes manifest yaml and substitute them in the CI pipeline with sed or envsubst or other text manipulator programs, this is probably what you see here. Check the CI config, pipelines and you will find these variable substitutions.
Actually these are not even variables, in k8s manifest yaml you can not use env vars, so these are just text in a given format so when the text manipulator program sees this pattern it will act and replace these strings with whatever it is supposed to replace it with so the output will be a valid k8s manifest yaml
Upvotes: 1