Below is Helm code to install
helm install coreos/kube-prometheus --name kube-prometheum --namespace monitoring -f kube-prometheus.yml
by this way we can override the value.yml values with the values present in kube-prometheus.yml.
Is there any way by which we can first install and then update the value.yml from kube-prometheus.yml file.
I can use helm upgrade releasename kube-prometheum
after changing the value.yml file directly. I don't want that
Use case: Initially, I used an image with tag 1.0 in value.yml. Now I have below code in kube-prometheus.yml just to update the image tag
prometheusconfigReloader:
image:
tag: 2.0
Instead of deleting and creating again. I want to upgrade it. This is just for example, there could be multiple values. that is why I can't use -set.
So you first run helm install coreos/kube-prometheus --name kube-prometheum --namespace monitoring -f kube-prometheus.yml
with your values file set to point at 1.0 of the image:
prometheusconfigReloader:
image:
tag: 1.0
Then you change the values file or create a new values file or even create a new values file containing:
prometheusconfigReloader:
image:
tag: 2.0
Let's say this file is called kube-prometheus-v2.yml Then you can run:
helm upgrade -f kube-prometheus-v2.yml kube-prometheum coreos/kube-prometheus
Or even:
helm upgrade -f kube-prometheus.yml -f kube-prometheus-v2.yml kube-prometheum coreos/kube-prometheus
This is because both values file overrides will be overlaid and according to the helm upgrade
documentation "priority will be given to the last (right-most) value specified".
Or if you've already installed and want to find out what the values file that was used contained then you can use helm get values kube-prometheum