From 5a9b9b722ba574db42b98d45cb3c1b85b0949fb3 Mon Sep 17 00:00:00 2001 From: Randall Mason Date: Sun, 27 Aug 2023 08:49:38 +0000 Subject: [PATCH] Allow persistentStorage - opens up multinode fixes #42 for me Signed-off-by: Randall Mason --- tinkerbell/stack/templates/nginx.yaml | 23 +++++++++++++++++++++++ tinkerbell/stack/values.yaml | 2 ++ 2 files changed, 25 insertions(+) diff --git a/tinkerbell/stack/templates/nginx.yaml b/tinkerbell/stack/templates/nginx.yaml index 15d3f100..19cea542 100644 --- a/tinkerbell/stack/templates/nginx.yaml +++ b/tinkerbell/stack/templates/nginx.yaml @@ -84,17 +84,40 @@ spec: {{- end }} volumes: {{- if .Values.stack.hook.enabled }} + {{- if not .Values.stack.hook.persistentStorage }} - name: hook-artifacts hostPath: path: {{ .Values.stack.hook.downloadsDest }} type: DirectoryOrCreate {{- end }} + {{- if .Values.stack.hook.persistentStorage }} + - name: hook-artifacts + persistentVolumeClaim: + claimName: hook-artifacts + {{- end }} + {{- end }} - name: nginx-conf configMap: name: nginx-conf items: - key: nginx.conf path: nginx.conf.template +{{- if .Values.stack.hook.persistentStorage }} +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: hook-artifacts +spec: + {{- if .Values.stack.hook.storageClass }} + storageClassName: {{ .Values.stack.hook.storageClass }} + {{- end }} + accessModes: + - ReadWriteMany + resources: + requests: + storage: 50Gi +{{- end }} {{- if .Values.stack.service.enabled }} --- apiVersion: v1 diff --git a/tinkerbell/stack/values.yaml b/tinkerbell/stack/values.yaml index 15044f51..9ef6ff6f 100644 --- a/tinkerbell/stack/values.yaml +++ b/tinkerbell/stack/values.yaml @@ -18,6 +18,8 @@ stack: port: 8080 image: alpine downloadsDest: /opt/hook + persistentStorage: true + storageClass: ceph-filesystem downloads: - url: https://github.com/tinkerbell/hook/releases/download/v0.8.1/hook_x86_64.tar.gz sha512sum: 29d8cf6991272eea20499d757252b07deba824eb778368192f9ab88b215a0dafa584e83422dac08feeb43ddce65f485557ad66210f005a81ab95fb53b7d8d424