Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow persistentStorage - opens up multinode #63

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions tinkerbell/stack/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be customizable and can probably be a much smaller default given HookOS isn't more than a <1Gi.

{{- end }}
{{- if .Values.stack.service.enabled }}
---
apiVersion: v1
Expand Down
2 changes: 2 additions & 0 deletions tinkerbell/stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ stack:
port: 8080
image: alpine
downloadsDest: /opt/hook
persistentStorage: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mind if we make this opt-in and default to false here?

storageClass: ceph-filesystem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want this to be specified by the user and not default. We can add a check to one of the templates that verifies if persistentStorage == true then require storageClass.

downloads:
- url: https://github.com/tinkerbell/hook/releases/download/v0.8.1/hook_x86_64.tar.gz
sha512sum: 29d8cf6991272eea20499d757252b07deba824eb778368192f9ab88b215a0dafa584e83422dac08feeb43ddce65f485557ad66210f005a81ab95fb53b7d8d424
Expand Down