https://rancher.com/ logo
Title
m

many-area-51777

01/22/2023, 3:47 PM
How do you prevent a change in a helm template to be deployed to one cluster (say, production) but make sure it will be deployed to another (say, stage)?
n

nutritious-orange-38459

01/22/2023, 3:55 PM
See the multi-cluster example “helm” on here: https://github.com/rancher/fleet-examples/
m

many-area-51777

01/22/2023, 3:56 PM
So basically using conditional values within the templates?
n

nutritious-orange-38459

01/22/2023, 6:32 PM
Yes, in
fleet.yaml
you can see the values for dev, test, prod: https://github.com/rancher/fleet-examples/blob/master/multi-cluster/helm/fleet.yaml
m

many-area-51777

01/22/2023, 6:33 PM
Yes that's how I do it already, but it feels so sketchy. One mistake and everything breaks
n

nutritious-orange-38459

01/22/2023, 8:56 PM
I get that. If you feel it’s too risky, you can instead just duplicate your code and deploy separately to the envs to be on the safe side. Or have another test environment for fleet deployments itself.
m

many-area-51777

01/22/2023, 9:25 PM
Thanks @nutritious-orange-38459