create a way of not mounting volumes (#650)
* create a way of not mounting volumes * fix mistake * also noMount for statefull sets
This commit is contained in:
parent
a6b432fd41
commit
dd3b299e2b
|
@ -35,4 +35,4 @@ sources:
|
||||||
- https://github.com/nextcloud/docker
|
- https://github.com/nextcloud/docker
|
||||||
- https://github.com/nextcloud/helm
|
- https://github.com/nextcloud/helm
|
||||||
type: application
|
type: application
|
||||||
version: 1.0.9
|
version: 1.0.10
|
||||||
|
|
|
@ -382,6 +382,12 @@ questions:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
hidden: true
|
hidden: true
|
||||||
|
- variable: noMount
|
||||||
|
label: "Do not mount this storage inside the main pod"
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
hidden: true
|
||||||
- variable: forceName
|
- variable: forceName
|
||||||
label: "Override PVC Name (advanced)"
|
label: "Override PVC Name (advanced)"
|
||||||
description: "Forces a certain name for the PVC"
|
description: "Forces a certain name for the PVC"
|
||||||
|
@ -460,6 +466,12 @@ questions:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
hidden: true
|
hidden: true
|
||||||
|
- variable: noMount
|
||||||
|
label: "Do not mount this storage inside the main pod"
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
hidden: true
|
||||||
- variable: forceName
|
- variable: forceName
|
||||||
label: "Override PVC Name (advanced)"
|
label: "Override PVC Name (advanced)"
|
||||||
description: "Forces a certain name for the PVC"
|
description: "Forces a certain name for the PVC"
|
||||||
|
|
|
@ -51,11 +51,13 @@ persistence:
|
||||||
type: emptyDir
|
type: emptyDir
|
||||||
|
|
||||||
db:
|
db:
|
||||||
|
noMount: true
|
||||||
forceName: "db"
|
forceName: "db"
|
||||||
enabled: true
|
enabled: true
|
||||||
type: emptyDir
|
type: emptyDir
|
||||||
|
|
||||||
redismaster:
|
redismaster:
|
||||||
|
noMount: true
|
||||||
forceName: "redismaster"
|
forceName: "redismaster"
|
||||||
enabled: true
|
enabled: true
|
||||||
type: emptyDir
|
type: emptyDir
|
||||||
|
@ -127,6 +129,8 @@ cronjob:
|
||||||
# Enabled postgres
|
# Enabled postgres
|
||||||
# ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/postgresql
|
# ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/postgresql
|
||||||
postgresql:
|
postgresql:
|
||||||
|
volumePermissions:
|
||||||
|
enabled: true
|
||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: nextcloud
|
postgresqlUsername: nextcloud
|
||||||
postgresqlDatabase: nextcloud
|
postgresqlDatabase: nextcloud
|
||||||
|
@ -138,6 +142,8 @@ postgresql:
|
||||||
# Enabled redis
|
# Enabled redis
|
||||||
# ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis
|
# ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis
|
||||||
redis:
|
redis:
|
||||||
|
volumePermissions:
|
||||||
|
enabled: true
|
||||||
architecture: standalone
|
architecture: standalone
|
||||||
enabled: true
|
enabled: true
|
||||||
auth:
|
auth:
|
||||||
|
|
|
@ -18,4 +18,4 @@ maintainers:
|
||||||
name: common
|
name: common
|
||||||
sources:
|
sources:
|
||||||
type: library
|
type: library
|
||||||
version: 6.4.6
|
version: 6.5.0
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{{/* Volumes included by the controller */}}
|
{{/* Volumes included by the controller */}}
|
||||||
{{- define "common.controller.volumeMounts" -}}
|
{{- define "common.controller.volumeMounts" -}}
|
||||||
{{- range $index, $item := .Values.persistence }}
|
{{- range $index, $item := .Values.persistence }}
|
||||||
|
{{- if not $item.noMount }}
|
||||||
{{- $mountPath := (printf "/%v" $index) -}}
|
{{- $mountPath := (printf "/%v" $index) -}}
|
||||||
{{- if eq "hostPath" (default "pvc" $item.type) -}}
|
{{- if eq "hostPath" (default "pvc" $item.type) -}}
|
||||||
{{- $mountPath = $item.hostPath -}}
|
{{- $mountPath = $item.hostPath -}}
|
||||||
|
@ -19,9 +20,11 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- if eq .Values.controller.type "statefulset" }}
|
{{- if eq .Values.controller.type "statefulset" }}
|
||||||
{{- range $index, $vct := .Values.volumeClaimTemplates }}
|
{{- range $index, $vct := .Values.volumeClaimTemplates }}
|
||||||
|
{{- if not $vct.noMount }}
|
||||||
- mountPath: {{ $vct.mountPath }}
|
- mountPath: {{ $vct.mountPath }}
|
||||||
name: {{ $vct.name }}
|
name: {{ $vct.name }}
|
||||||
{{- if $vct.subPath }}
|
{{- if $vct.subPath }}
|
||||||
|
@ -29,5 +32,7 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
Loading…
Reference in New Issue