Cleanup, Fixes and Review Feedback
Includes mix fixes like: - Fixing the documentation - Making sure device and storage mounts work correctly - Fixing broken things that where supposed to work according to the PR highlights - Moving some additional things to TrueCharts based containers - Hiding, changing and reordening some bad UI elements - Adding support for supplementalGroup permissions Co-authored-by: Dan Sheridan <dan.sheridan@postman.org.uk> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Justin Clift <justin@postgresql.org>
This commit is contained in:
co-authored by
Dan Sheridan
Stavros Kois
Justin Clift
parent
1257de6408
commit
e8f9ef02d4
@@ -1,12 +1,8 @@
|
||||
apiVersion: v2
|
||||
kubeVersion: ">=1.16.0-0"
|
||||
name: common
|
||||
<<<<<<< HEAD
|
||||
version: 1.6.7
|
||||
=======
|
||||
version: 2.0.0
|
||||
>>>>>>> [Common] Refactor Services (#212)
|
||||
# upstream_version: 3.0.1
|
||||
# upstream_version:
|
||||
# appVersion:
|
||||
description: Function library for TrueCharts
|
||||
type: library
|
||||
|
||||
@@ -30,6 +30,9 @@ securityContext:
|
||||
{{- if not .Values.startAsRoot }}
|
||||
runAsUser: {{ .Values.PUID }}
|
||||
runAsGroup: {{ .Values.PGID }}
|
||||
fsGroup: {{ .Values.PGID }}
|
||||
# 5=tty 20=dailout 24=cdrom 44=video 107=render
|
||||
supplementalGroups: [{{- .Values.supplementalGroups }}]
|
||||
runAsNonRoot: true
|
||||
{{- end }}
|
||||
{{- with .Values.podSecurityContext }}
|
||||
|
||||
@@ -3,7 +3,7 @@ Define appVolumeMounts for container
|
||||
*/}}
|
||||
{{- define "common.storage.configureAppVolumeMountsInContainer" -}}
|
||||
{{ range $name, $avm := . }}
|
||||
{{- if (default true $avm.enabled) -}}
|
||||
{{- if $avm.enabled -}}
|
||||
{{ if $avm.name }}
|
||||
{{ $name = $avm.name }}
|
||||
{{ end }}
|
||||
@@ -22,7 +22,7 @@ Define hostPath for appVolumes
|
||||
*/}}
|
||||
{{- define "common.storage.configureAppVolumes" -}}
|
||||
{{- range $name, $av := $.volMounts -}}
|
||||
{{ if (default true $av.enabled) }}
|
||||
{{ if $av.enabled }}
|
||||
{{ if $av.name }}
|
||||
{{ $name = $av.name }}
|
||||
{{ end }}
|
||||
|
||||
@@ -3,12 +3,14 @@ This template serves as the blueprint for the mountPermissions job that is run
|
||||
before chart installation.
|
||||
*/}}
|
||||
{{- define "common.storage.permissions" -}}
|
||||
{{- if and .Values.appVolumeMounts .Values.fixMountPermissions }}
|
||||
{{- range $name, $avm := .Values.appVolumeMounts -}}
|
||||
{{- if and $avm.enabled $avm.setPermissions}}
|
||||
{{- if .Values.fixMountPermissions }}
|
||||
|
||||
{{- if .Values.appVolumeMounts }}
|
||||
{{- range $name, $vm := .Values.appVolumeMounts -}}
|
||||
{{- if and $vm.enabled $vm.setPermissions}}
|
||||
{{- print "---" | nindent 0 -}}
|
||||
|
||||
{{- $VMValues := $avm -}}
|
||||
{{- $VMValues := $vm -}}
|
||||
{{- if not $VMValues.nameSuffix -}}
|
||||
{{- $_ := set $VMValues "nameSuffix" $name -}}
|
||||
{{ end -}}
|
||||
@@ -18,4 +20,23 @@ before chart installation.
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{- if .Values.additionalAppVolumeMounts }}
|
||||
{{- range $index, $avm := .Values.additionalAppVolumeMounts -}}
|
||||
{{- if and $avm.enabled $avm.setPermissions}}
|
||||
{{- print "---" | nindent 0 -}}
|
||||
|
||||
{{- $AVMValues := $avm -}}
|
||||
{{- if not $AVMValues.nameSuffix -}}
|
||||
{{- $_ := set $AVMValues "nameSuffix" $index -}}
|
||||
{{ end -}}
|
||||
{{- $_ := set $ "ObjectValues" (dict "appVolumeMounts" $AVMValues) -}}
|
||||
|
||||
{{ include "common.storage.permissions.job" $ | nindent 0 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user