Answer a question

I would like to use HELM to force a deployment to redeploy on Openshift.

I am using "image@latest" for the deployment as I want to have the latest image whenever I deploy, but I don't want to have a image change trigger because I don't have control on how often the image changes and I may need to change some things in the chart (config-maps, for instance) prior to deploying for a new version of the image. Hence why I don't want for to have an image trigger for the deployment.

Basically, I want it to redeploy when I want it to and not automatically, and I would prefer to do it with helm, and I tried with helm upgrade.

Currently I have a Config Change Trigger so in the case I change the chart (which contains the configs), the deployment redeploys. But if nothing changes in the chart, I am not finding any way to force a redeploy through Helm.

Is there any way it is possible to do?

Answers

I managed to find a solution. I added on spec-template-metadata-annotations the following:

timestamp: {{ now | quote }}

This basically makes the chart always change which will trigger a redeploy every time I run helm upgrade.

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐