Skip to content

Commit

Permalink
Merge pull request #150 from jontze/chore/fix-helm-empty-env-vars
Browse files Browse the repository at this point in the history
chore(helm): Fix crash due to empty env vars
  • Loading branch information
jontze authored Apr 6, 2024
2 parents a061da8 + d75f6c8 commit 6515376
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion helm/cadency/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: cadency
description: Helm chart to deploy the cadency discord bot.
version: 0.2.0
version: 0.2.1
appVersion: "0.5.1"
type: application
maintainers:
Expand Down
13 changes: 10 additions & 3 deletions helm/cadency/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,31 @@ spec:
image: "{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- $configMapName := include "cadency.fullname" . -}}
{{- with .Values.cadency.config }}
- name: "RUST_LOG"
valueFrom:
configMapKeyRef:
name: {{ include "cadency.fullname" . }}
name: {{ $configMapName }}
key: logLevel
optional: true
{{- if .playlistSongLimit }}
- name: "CADENCY_PLAYLIST_SONG_LIMIT"
valueFrom:
configMapKeyRef:
name: {{ include "cadency.fullname" . }}
name: {{ $configMapName }}
key: playlistSongLimit
optional: true
{{- end }}
{{- if .songLengthLimit }}
- name: "CADENCY_SONG_LENGTH_LIMIT"
valueFrom:
configMapKeyRef:
name: {{ include "cadency.fullname" . }}
name: {{ $configMapName }}
key: songLengthLimit
optional: true
{{- end }}
{{- end }}
{{- $createdSecretName := include "cadency.fullname" . -}}
{{- with .Values.cadency.discordToken }}
- name: DISCORD_TOKEN
Expand Down

0 comments on commit 6515376

Please sign in to comment.