From 662bc37f0caad9f117d97b46a05f00ae8f1aab50 Mon Sep 17 00:00:00 2001 From: Ryan Connell <7585908+RyanConnell@users.noreply.github.com> Date: Thu, 21 Mar 2024 00:46:12 +0000 Subject: [PATCH] helm: Separate artist configMap from barebones deployment --- helm/templates/configMap.yaml | 3 ++- helm/templates/cron.yaml | 8 +++++++- helm/values.yaml | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/helm/templates/configMap.yaml b/helm/templates/configMap.yaml index e93826d..d5321bd 100644 --- a/helm/templates/configMap.yaml +++ b/helm/templates/configMap.yaml @@ -4,4 +4,5 @@ kind: ConfigMap metadata: name: {{ .Values.name }}-config data: -{{ ( .Files.Glob "files/*" ).AsConfig | indent 2 }} + ticketmaster.yaml: |- +{{ .Files.Get "files/ticketmaster.yaml" | indent 4 }} diff --git a/helm/templates/cron.yaml b/helm/templates/cron.yaml index a51ff6f..228455b 100644 --- a/helm/templates/cron.yaml +++ b/helm/templates/cron.yaml @@ -14,7 +14,7 @@ spec: command: - /bin/sh - -c - - /bin/concert-watcher scan --api-key $TICKETMASTER_API_KEY --artist-file /config/artists --discord-webhook-url $DISCORD_WEBHOOK_URL --ticketmaster-config /config/ticketmaster.yaml --diff --diff-file /data/previous-ids --include-partial-match + - /bin/concert-watcher scan --api-key $TICKETMASTER_API_KEY --artist-file /artists --discord-webhook-url $DISCORD_WEBHOOK_URL --ticketmaster-config /config/ticketmaster.yaml --diff --diff-file /data/previous-ids --include-partial-match env: - name: "TICKETMASTER_API_KEY" {{- if .Values.ticketmaster.apiKey.secret }} @@ -35,6 +35,9 @@ spec: value: "{{ .Values.discord.webhookURL.value }}" {{- end }} volumeMounts: + - name: artists + mountPath: /artists + subPath: artists - name: config-map mountPath: /config - name: data @@ -43,6 +46,9 @@ spec: - name: config-map configMap: name: {{ .Values.name }}-config + - name: artists + configMap: + name: {{ .Values.artists.configMap }} - name: data persistentVolumeClaim: claimName: {{ .Values.name }}-pvc diff --git a/helm/values.yaml b/helm/values.yaml index 56e718a..c55648f 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -5,6 +5,10 @@ image: name: ryanconnell/concert-watcher tag: latest +artists: + # Name of the configMap containing all of our artists. + configMap: concert-watcher-artists + discord: # Add a webhook URL to enable discord notifications. webhookURL: