Skip to content

Commit

Permalink
[helm chart] make image tag configurable
Browse files Browse the repository at this point in the history
- Add appVersion field to Chart.yaml. Thanks to @rimusz for the
  suggestions about this
- If image.tag is set in values.yaml then that tag is used, otherwise
  falls back to appVersion from Chart.yaml
- This makes easy to deploy images tagged with different names which
  are not according to sem ver 2 i.e. 'latest' or other valid
  container image tags

Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
  • Loading branch information
bhavin192 committed May 10, 2019
1 parent dd7598f commit d9a10d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions helm/botkube/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
name: botkube
home: https://www.botkube.io
version: 0.7.0
appVersion: 0.7.0
icon: https://www.botkube.io/images/botkube.ico
description: Controller for the BotKube Slack app which helps you monitor your Kubernetes cluster,
debug deployments and run specific checks on resources in the cluster.
Expand Down
2 changes: 1 addition & 1 deletion helm/botkube/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
serviceAccountName: {{ include "botkube.fullname" . }}-sa
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Chart.Version }}"
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config-volume
Expand Down
3 changes: 3 additions & 0 deletions helm/botkube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ replicaCount: 1
image:
repository: infracloud/botkube
pullPolicy: Always
## default tag is appVersion from Chart.yaml. If you want to use
## some other tag then it can be specified here
# tag: latest

nameOverride: ""
fullnameOverride: ""
Expand Down

0 comments on commit d9a10d6

Please sign in to comment.