Skip to content

Restart pods via git-commit

Source

Project Structure

.
├── helmwave.yml
└── values.yml

helmwave.yml

version: 0.16.2

repositories:
  - name: bitnami
    url: https://charts.bitnami.com/bitnami


releases:
  - name: my-app
    chart:
      name: bitnami/nginx
    values:
      - values.yml
    namespace: my-namespace
    createnamespace: true

nginx/template/deployment.yaml looks like that:

    ...
    metadata:  
      {{- with .Values.podAnnotations }}  
      annotations:  
        {{- toYaml . | nindent 8 }}  
      {{- end }}
    ...

We will pass pod annotations with values

values.yml

podAnnotations:
  gitCommit: {{ requiredEnv "CI_COMMIT_SHORT_SHA" | quote }}

Run

helmwave build
helmwave up

or helmwave up --build