Compare commits

..

3 Commits

Author SHA1 Message Date
Jonas Forsberg
0a3982ff7f fixed empty env to list 2024-10-18 08:59:45 +02:00
Jonas Forsberg
1ac11c9a92 added volumeClaimTemplates 2024-10-18 08:48:05 +02:00
Jonas Forsberg
eb8c3dad8d added gitignore 2024-10-18 08:09:13 +02:00
3 changed files with 66 additions and 9 deletions

37
.gitignore vendored Normal file
View File

@ -0,0 +1,37 @@
# General files for the project
pkg/*
*.pyc
bin/*
.project
/.bin
/_test/secrets/*.json
# OSX leaves these everywhere on SMB shares
._*
# OSX trash
.DS_Store
# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA
.idea/
*.iml
# Vscode files
.vscode
# Emacs save files
*~
\#*\#
.\#*
# Vim-related files
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
# Chart dependencies
**/charts/*.tgz
.history

View File

@ -51,20 +51,17 @@ spec:
{{- end -}}
{{- end }}
env:
{{- include "lib.environmentVariables" . | default "{}" | nindent 12 }}
{{- include "lib.environmentVariables" . | default "[]" | nindent 12 }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- range $i, $values := .Values.volumeClaimTemplates }}
- name: {{ $values.name }}
mountPath: {{ $values.mountPath }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
@ -78,4 +75,16 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumeClaimTemplates:
{{- range $i, $values := .Values.volumeClaimTemplates }}
- metadata:
name: {{ $values.name }}
spec:
accessModes:
- {{ required (printf "accessMode is required for volumeClaimTemplate %v" $values.name) $values.accessMode | quote }}
storageClassName: {{ required (printf "storageClassName is required for volumeClaimTemplate %v" $values.name) $values.storageClassName | quote }}
resources:
requests:
storage: {{ required (printf "size is required for volumeClaimTemplate %v" $values.name) $values.size | quote }}
{{- end }}
{{- end -}}

View File

@ -120,6 +120,17 @@ volumeMounts: []
# mountPath: "/etc/foo"
# readOnly: true
# used for statefulset https://kubernetes.io/docs/concepts/workloads/controllers/statefulset
volumeClaimTemplates: []
#volumeClaimTemplates:
# - name: www
# mountPath: /var/www/html
# accessModes: "ReadWriteOnce"
# storageClassName: "my-storage-class"
# size: 1Gi
serviceAccount:
# Specifies whether a service account should be created
create: true