mirror of
https://github.com/truecharts/charts.git
synced 2026-07-11 17:21:22 -03:00
allow setting readOnly on customStorage and limit permissionsmounts (#357)
* alles setting readOnly on customStorage * update common version and example * fix a typo * Limit volume mounting for permission fix to relevant volumes.
This commit is contained in:
committed by
GitHub
parent
369f0e1c00
commit
aeab9be5d2
@@ -1,7 +1,7 @@
|
||||
apiVersion: v2
|
||||
kubeVersion: ">=1.16.0-0"
|
||||
name: common-test
|
||||
version: 2.1.3
|
||||
version: 2.1.4
|
||||
# upstream_version:
|
||||
appVersion: none
|
||||
description: Helper chart to test different use cases of the common library
|
||||
|
||||
@@ -55,7 +55,6 @@ additionalIngress:
|
||||
enabled: true
|
||||
|
||||
# these values and names are set specifically with the unittests in mind.
|
||||
fixMountPermissions: false
|
||||
deviceMounts:
|
||||
test1:
|
||||
enabled: true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v2
|
||||
kubeVersion: ">=1.16.0-0"
|
||||
name: common
|
||||
version: 3.0.4
|
||||
version: 3.5.0
|
||||
# upstream_version:
|
||||
appVersion: none
|
||||
description: Function library for TrueCharts
|
||||
|
||||
@@ -37,6 +37,9 @@ Volumes included by the controller.
|
||||
{{ if $csm.subPath }}
|
||||
subPath: {{ $csm.subPath }}
|
||||
{{ end }}
|
||||
{{ if $csm.readOnly }}
|
||||
readOnly: {{ $csm.readOnly }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -40,11 +40,40 @@ spec:
|
||||
#securityContext:
|
||||
#
|
||||
volumeMounts:
|
||||
{{- include "common.controller.volumeMounts" . | indent 12 }}
|
||||
{{- with (include "common.controller.volumes" . | trim) }}
|
||||
{{ range $name, $csm := .Values.customStorage }}
|
||||
{{- if $csm.enabled -}}
|
||||
{{- if $csm.setPermissions -}}
|
||||
{{ if $csm.name }}
|
||||
{{ $name = $csm.name }}
|
||||
{{ end }}
|
||||
- name: customstorage-{{ $name }}
|
||||
mountPath: {{ $csm.mountPath }}
|
||||
{{ if $csm.subPath }}
|
||||
subPath: {{ $csm.subPath }}
|
||||
{{ end }}
|
||||
{{ if $csm.readOnly }}
|
||||
readOnly: {{ $csm.readOnly }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
volumes:
|
||||
{{- . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- range $name, $cs := .Values.customStorage -}}
|
||||
{{ if $cs.enabled }}
|
||||
{{ if $cs.setPermissions }}
|
||||
{{ if $cs.name }}
|
||||
{{ $name = $cs.name }}
|
||||
{{ end }}
|
||||
- name: customstorage-{{ $name }}
|
||||
{{ if $cs.emptyDir }}
|
||||
emptyDir: {}
|
||||
{{- else -}}
|
||||
hostPath:
|
||||
path: {{ required "hostPath not set" $cs.hostPath }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- end }}
|
||||
|
||||
@@ -310,4 +310,5 @@ fixMountPermissions: true
|
||||
# mountPath: "/data"
|
||||
# subPath: some-subpath
|
||||
# hostPath: ""
|
||||
# readOnly: false
|
||||
# setPermissions: true
|
||||
|
||||
Reference in New Issue
Block a user