From 89610eca3365e9c6215b0b9f042ebe8ef949255e Mon Sep 17 00:00:00 2001 From: Ryan Connell <7585908+RyanConnell@users.noreply.github.com> Date: Sun, 31 Dec 2023 02:49:40 +0000 Subject: [PATCH] Add PVC for --diff mode to helm chart --- helm/templates/cron.yaml | 7 ++++++- helm/templates/pvc.yaml | 13 +++++++++++++ helm/values.yaml | 4 ++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 helm/templates/pvc.yaml diff --git a/helm/templates/cron.yaml b/helm/templates/cron.yaml index 2e2c09a..53204b0 100644 --- a/helm/templates/cron.yaml +++ b/helm/templates/cron.yaml @@ -14,7 +14,7 @@ spec: command: - /bin/sh - -c - - /bin/concert-watcher -apiKey $TICKETMASTER_API_KEY -artistFile /config/artists -discordWebhookURL $DISCORD_WEBHOOK_URL -ticketmasterConfig /config/ticketmaster.yaml + - /bin/concert-watcher -apiKey $TICKETMASTER_API_KEY -artistFile /config/artists -discordWebhookURL $DISCORD_WEBHOOK_URL -ticketmasterConfig /config/ticketmaster.yaml --diff --diffFile /data/previous-ids env: - name: "TICKETMASTER_API_KEY" value: "{{ .Values.ticketmaster.apiKey }}" @@ -23,8 +23,13 @@ spec: volumeMounts: - name: config-map mountPath: /config + - name: data + mountPath: /data volumes: - name: config-map configMap: name: {{ .Values.name }}-config + - name: data + persistentVolumeClaim: + claimName: {{ .Values.name }}-pvc restartPolicy: Never diff --git a/helm/templates/pvc.yaml b/helm/templates/pvc.yaml new file mode 100644 index 0000000..8d2cd5f --- /dev/null +++ b/helm/templates/pvc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Values.name }}-pvc + labels: + app: {{ .Values.name }} +spec: + storageClassName: {{ .Values.storage.className }} + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.storage.size }} diff --git a/helm/values.yaml b/helm/values.yaml index 93f362c..378a4a2 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -9,3 +9,7 @@ discord: ticketmaster: apiKey: "{TICKETMASTER_API_KEY_GOES_HERE}" + +storage: + className: nfs-client + size: 64Mi