forked from tinkerbell/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pascal Morillon <[email protected]>
- Loading branch information
1 parent
fe80800
commit 48ecf13
Showing
6 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{- if eq (include "stack.hookDownloadJobEnabled" .) "false" }} | ||
Warning: | ||
|
||
You are using no persistence or ReadWriteOnce access modes on PersistentVolumeClaim, Job `download-hook` is disabled. | ||
You will need to manage hooks artifacts manually. | ||
Also stack Deployment is not scalable. | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{- define "stack.hookDownloadJobEnabled" -}} | ||
{{- $result := .Values.stack.persistence.enabled }} | ||
{{- if and .Values.stack.persistence.enabled (eq .Values.stack.persistence.type "pvc") }} | ||
{{- range .Values.stack.persistence.accessModes }} | ||
{{- if eq . "ReadWriteOnce" }} | ||
{{- $result = false}} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- $result }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
tinkerbell/stack/templates/nginx_persistentvolumeclaim.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{{- if and .Values.stack.persistence.enabled (not .Values.stack.persistence.existingClaim) (eq .Values.stack.persistence.type "pvc") }} | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: hook-artifacts | ||
labels: | ||
{{- with .Values.stack.persistence.extraPvcLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.stack.persistence.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
accessModes: | ||
{{- range .Values.stack.persistence.accessModes }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
resources: | ||
requests: | ||
storage: {{ .Values.stack.persistence.size | quote }} | ||
{{- with .Values.stack.persistence.storageClassName }} | ||
storageClassName: {{ . }} | ||
{{- end }} | ||
{{- with .Values.stack.persistence.selectorLabels }} | ||
selector: | ||
matchLabels: | ||
{{- toYaml . | nindent 6 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters