File tree Expand file tree Collapse file tree 5 files changed +35
-11
lines changed Expand file tree Collapse file tree 5 files changed +35
-11
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ The chart should dump its version and appVersion in the Chart.yaml file every re
3434| ` preferences.enabled ` | Whether to mount preferences.json | ` false ` |
3535| ` preferences.data ` | Preferences to load | ` {} ` |
3636| ` resources.* ` | Allocated requests and limits resources | ` {"requests": {...}, "limits": {...}} ` |
37- | ` persistence.enabled ` | PVC resource creation | ` false ` |
37+ | ` persistence.enabled ` | PVC resource creation | ` true ` |
3838| ` service.type ` | Service type | ` "ClusterIP" ` |
3939| ` service.loadBalancerIP ` | Load balancer IP (Only if service.type is LoadBalancer) | ` "" ` |
4040| ` ingress.enabled ` | Ingress resource creation | ` false ` |
41- | ` ingress.hostname ` | Ingress resource hostname | ` "pgadmin4.local" ` |
41+ | ` ingress.hostname ` | Ingress resource hostname | ` "pgadmin4.local" ` |
Original file line number Diff line number Diff line change 2525 { {- $securityContext = omit $securityContext " appArmorProfile" -} }
2626{ {- end -} }
2727{ {- $securityContext | toYaml -} }
28- { {- end -} }
28+ { {- end -} }
29+
30+ { {- define " tpl.preserve.variable" -} }
31+ { {- $obj := . } }
32+ { {- if kindIs " map" $obj } }
33+ { {- range $k , $v := $obj } }
34+ { {- if kindIs " string" $v } }
35+ { {- if regexMatch " ^[0-9]+$" $v } }
36+ { {- $_ := set $obj $k (atoi $v ) } }
37+ { {- else if regexMatch " (?i)^(true|false)$" $v } }
38+ { {- $_ := set $obj $k (eq (lower $v ) " true" ) } }
39+ { {- end } }
40+ { {- else } }
41+ { {- include " tpl.preserve.variable" $v } }
42+ { {- end } }
43+ { {- end } }
44+ { {- else if kindIs " slice" $obj } }
45+ { {- range $i , $v := $obj } }
46+ { {- include " tpl.preserve.variable" $v } }
47+ { {- end } }
48+ { {- end } }
49+ { {- end } }
Original file line number Diff line number Diff line change @@ -10,5 +10,7 @@ metadata:
1010 annotations : {{ . | toYaml | nindent 4 }}
1111 {{- end }}
1212data :
13- servers.json : | {{ tpl (dict "Servers" .Values.serverDefinitions.data | toYaml) . | fromYaml | toPrettyJson | nindent 4 }}
13+ {{- $variableToPreserveTPL := tpl (dict "Servers" .Values.serverDefinitions.data | toYaml) . | fromYaml }}
14+ {{- include "tpl.preserve.variable" $variableToPreserveTPL }}
15+ servers.json : | {{ $variableToPreserveTPL | toYaml | nindent 4 }}
1416{{- end }}
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ spec:
117117 - name : PGADMIN_DISABLE_POSTFIX
118118 value : {{ .Values.disablePostfix | quote }}
119119 {{- with .Values.extraEnvVars }}
120- {{- tpl (. | toYaml) $ | nindent 14 }}
120+ {{- tpl (. | toYaml) $ | nindent 12 }}
121121 {{- end }}
122122 volumeMounts :
123123 - mountPath : /var/lib/pgadmin
@@ -234,4 +234,4 @@ spec:
234234 type : RuntimeDefault
235235 {{- end }}
236236 windowsOptions :
237- hostProcess : false
237+ hostProcess : false
Original file line number Diff line number Diff line change @@ -71,11 +71,11 @@ preferences:
7171
7272resources :
7373 requests :
74- cpu : 250m
75- memory : 512Mi
74+ cpu : 500m
75+ memory : 1Gi
7676 limits :
77- cpu : 250m
78- memory : 512Mi
77+ cpu : 500m
78+ memory : 1Gi
7979
8080persistence :
8181 enabled : true
@@ -152,4 +152,5 @@ containerSecurityContext:
152152 appArmorProfile :
153153 type : RuntimeDefault
154154 windowsOptions :
155- hostProcess : false
155+
156+ hostProcess : false
You can’t perform that action at this time.
0 commit comments