mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
refactor persistent volume configuration (#565)
Co-authored-by: Aleksandr Cupacenko <alcu@danskebank.lt>
This commit is contained in:
committed by
GitHub
parent
1a39abbdb5
commit
e5e15f922c
@@ -75,7 +75,8 @@ The following table lists the configurable parameters of the chart and their def
|
||||
| `dashboard.persistence.accessModes` | Persistent Volume access modes | `["ReadWriteOnce"]` |
|
||||
| `dashboard.persistence.storageClass` | Persistent Volume storage class | `""` |
|
||||
| `dashboard.persistence.size` | Persistent Volume size | `100M` |
|
||||
| `dashboard.persistence.hostPath` | Set path in case you want to use local host path volumes (not recommended in production) | `""` |
|
||||
| `dashboard.persistence.finalizers` | Finalizers for the Persistent Volume Claim | `[kubernetes.io/pvc-protection]` |
|
||||
| `dashboard.persistence.lookupVolumeName` | Lookup volume name for the Persistent Volume Claim | `true` |
|
||||
| `updateStrategy.type` | Set up update strategy for helm-dashboard installation. | `RollingUpdate` |
|
||||
| `extraArgs` | Set the arguments to be supplied to the helm-dashboard binary | `[--no-browser, --bind=0.0.0.0]` |
|
||||
| `testImage.repository` | Test image registry/name | `busybox` |
|
||||
|
||||
@@ -10,47 +10,22 @@ metadata:
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.dashboard.persistence.hostPath }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
{{- if kindIs "string" .Values.dashboard.persistence.storageClass }}
|
||||
storageClassName: "{{ .Values.dashboard.persistence.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
accessModes:
|
||||
{{- if not (empty .Values.dashboard.persistence.accessModes) }}
|
||||
{{- range .Values.dashboard.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.dashboard.persistence.size | quote }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
{{- if and .Values.dashboard.persistence.enabled .Values.dashboard.persistence.hostPath -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ include "helm-dashboard.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
{{- include "helm-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.dashboard.persistence.annotations }}
|
||||
annotations:
|
||||
{{- with .Values.dashboard.persistence.finalizers }}
|
||||
finalizers:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- if not (empty .Values.dashboard.persistence.accessModes) }}
|
||||
{{- range .Values.dashboard.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.dashboard.persistence.size | quote }}
|
||||
{{- if and (.Values.dashboard.persistence.lookupVolumeName) (lookup "v1" "PersistentVolumeClaim" .Release.Namespace (include "helm-dashboard.fullname" .)) }}
|
||||
volumeName: {{ (lookup "v1" "PersistentVolumeClaim" .Release.Namespace (include "helm-dashboard.fullname" .)).spec.volumeName }}
|
||||
{{- end }}
|
||||
capacity:
|
||||
storage: {{ .Values.dashboard.persistence.size | quote }}
|
||||
hostPath:
|
||||
path: {{ .Values.dashboard.persistence.hostPath | quote }}
|
||||
{{- end -}}
|
||||
{{- with .Values.dashboard.persistence.storageClassName }}
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -49,12 +49,11 @@ dashboard:
|
||||
enabled: true
|
||||
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
storageClass: null
|
||||
# storageClassName: default
|
||||
|
||||
## Helm Dashboard Persistent Volume access modes
|
||||
## Must match those of existing PV or dynamic provisioner
|
||||
@@ -71,14 +70,19 @@ dashboard:
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Set path in case you want to use local host path volumes (not recommended in production)
|
||||
## Finalizer to ensure PVC is not deleted until the pod is terminated
|
||||
##
|
||||
hostPath: ""
|
||||
finalizers:
|
||||
- kubernetes.io/pvc-protection
|
||||
|
||||
## Helm Dashboard data Persistent Volume size
|
||||
##
|
||||
size: 100M
|
||||
|
||||
|
||||
## If 'lookupVolumeName' is set to true, Helm will attempt to retrieve
|
||||
## the current value of 'spec.volumeName' and incorporate it into the template.
|
||||
lookupVolumeName: true
|
||||
|
||||
## @param.updateStrategy.type Set up update strategy for helm-dashboard installation.
|
||||
## Set to Recreate if you use persistent volume that cannot be mounted by more than one pods to make sure the pods is destroyed first.
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
||||
|
||||
@@ -74,12 +74,14 @@
|
||||
|
||||
},
|
||||
"enabled":true,
|
||||
"hostPath":"",
|
||||
"labels":{
|
||||
|
||||
},
|
||||
"size":"100M",
|
||||
"storageClass":null
|
||||
"finalizers":[
|
||||
"kubernetes.io/pvc-protection"
|
||||
],
|
||||
"lookupVolumeName": true
|
||||
}
|
||||
},
|
||||
"debug":false,
|
||||
|
||||
Reference in New Issue
Block a user