|
200 | 200 | {{- break -}} |
201 | 201 | {{- end -}} |
202 | 202 | {{- $_is_returning = true -}} |
203 | | -{{- (dict "r" (mustMergeOverwrite (dict "name" "" "resources" (dict)) (dict "name" "tuning" "image" (printf "%s:%s" $state.Values.image.repository (get (fromJson (include "redpanda.Tag" (dict "a" (list $state)))) "r")) "command" (list `/bin/bash` `-c` `rpk redpanda tune all`) "securityContext" (mustMergeOverwrite (dict) (dict "capabilities" (mustMergeOverwrite (dict) (dict "add" (list `SYS_RESOURCE`))) "privileged" true "runAsUser" ((0 | int64) | int64) "runAsGroup" ((0 | int64) | int64))) "volumeMounts" (concat (default (list) (get (fromJson (include "redpanda.CommonMounts" (dict "a" (list $state)))) "r")) (list (mustMergeOverwrite (dict "name" "" "mountPath" "") (dict "name" "base-config" "mountPath" "/etc/redpanda"))))))) | toJson -}} |
| 203 | +{{- (dict "r" (mustMergeOverwrite (dict "name" "" "resources" (dict)) (dict "name" "tuning" "image" (printf "%s:%s" $state.Values.image.repository (get (fromJson (include "redpanda.Tag" (dict "a" (list $state)))) "r")) "command" (list `/bin/bash` `-c` `rpk redpanda tune all`) "securityContext" (mustMergeOverwrite (dict) (dict "capabilities" (mustMergeOverwrite (dict) (dict "add" (list `SYS_RESOURCE`))) "privileged" true "runAsNonRoot" false "runAsUser" ((0 | int64) | int64) "runAsGroup" ((0 | int64) | int64))) "volumeMounts" (concat (default (list) (get (fromJson (include "redpanda.CommonMounts" (dict "a" (list $state)))) "r")) (list (mustMergeOverwrite (dict "name" "" "mountPath" "") (dict "name" "base-config" "mountPath" "/etc/redpanda"))))))) | toJson -}} |
204 | 204 | {{- break -}} |
205 | 205 | {{- end -}} |
206 | 206 | {{- end -}} |
|
215 | 215 | {{- (dict "r" (coalesce nil)) | toJson -}} |
216 | 216 | {{- break -}} |
217 | 217 | {{- end -}} |
218 | | -{{- $_397_uid_gid := (get (fromJson (include "redpanda.securityContextUidGid" (dict "a" (list $state $pool "set-datadir-ownership")))) "r") -}} |
219 | | -{{- $uid := ((index $_397_uid_gid 0) | int64) -}} |
220 | | -{{- $gid := ((index $_397_uid_gid 1) | int64) -}} |
| 218 | +{{- $_398_uid_gid := (get (fromJson (include "redpanda.securityContextUidGid" (dict "a" (list $state $pool "set-datadir-ownership")))) "r") -}} |
| 219 | +{{- $uid := ((index $_398_uid_gid 0) | int64) -}} |
| 220 | +{{- $gid := ((index $_398_uid_gid 1) | int64) -}} |
221 | 221 | {{- $_is_returning = true -}} |
222 | 222 | {{- (dict "r" (mustMergeOverwrite (dict "name" "" "resources" (dict)) (dict "name" "set-datadir-ownership" "image" (printf "%s:%s" $pool.Statefulset.initContainerImage.repository $pool.Statefulset.initContainerImage.tag) "command" (list `/bin/sh` `-c` (printf `chown %d:%d -R /var/lib/redpanda/data` $uid $gid)) "securityContext" (mustMergeOverwrite (dict) (dict "runAsUser" (0 | int64) "runAsGroup" (0 | int64))) "volumeMounts" (concat (default (list) (get (fromJson (include "redpanda.CommonMounts" (dict "a" (list $state)))) "r")) (list (mustMergeOverwrite (dict "name" "" "mountPath" "") (dict "name" `datadir` "mountPath" `/var/lib/redpanda/data`))))))) | toJson -}} |
223 | 223 | {{- break -}} |
|
230 | 230 | {{- $containerName := (index .a 2) -}} |
231 | 231 | {{- range $_ := (list 1) -}} |
232 | 232 | {{- $_is_returning := false -}} |
233 | | -{{- $_423_gid_uid := (get (fromJson (include "redpanda.giduidFromPodTemplate" (dict "a" (list $state.Values.podTemplate "redpanda")))) "r") -}} |
234 | | -{{- $gid := (index $_423_gid_uid 0) -}} |
235 | | -{{- $uid := (index $_423_gid_uid 1) -}} |
236 | | -{{- $_424_sgid_suid := (get (fromJson (include "redpanda.giduidFromPodTemplate" (dict "a" (list $pool.Statefulset.podTemplate "redpanda")))) "r") -}} |
237 | | -{{- $sgid := (index $_424_sgid_suid 0) -}} |
238 | | -{{- $suid := (index $_424_sgid_suid 1) -}} |
| 233 | +{{- $_424_gid_uid := (get (fromJson (include "redpanda.giduidFromPodTemplate" (dict "a" (list $state.Values.podTemplate "redpanda")))) "r") -}} |
| 234 | +{{- $gid := (index $_424_gid_uid 0) -}} |
| 235 | +{{- $uid := (index $_424_gid_uid 1) -}} |
| 236 | +{{- $_425_sgid_suid := (get (fromJson (include "redpanda.giduidFromPodTemplate" (dict "a" (list $pool.Statefulset.podTemplate "redpanda")))) "r") -}} |
| 237 | +{{- $sgid := (index $_425_sgid_suid 0) -}} |
| 238 | +{{- $suid := (index $_425_sgid_suid 1) -}} |
239 | 239 | {{- if (ne (toJson $sgid) "null") -}} |
240 | 240 | {{- $gid = $sgid -}} |
241 | 241 | {{- end -}} |
|
312 | 312 | {{- (dict "r" (coalesce nil)) | toJson -}} |
313 | 313 | {{- break -}} |
314 | 314 | {{- end -}} |
315 | | -{{- $_503_uid_gid := (get (fromJson (include "redpanda.securityContextUidGid" (dict "a" (list $state $pool "set-tiered-storage-cache-dir-ownership")))) "r") -}} |
316 | | -{{- $uid := ((index $_503_uid_gid 0) | int64) -}} |
317 | | -{{- $gid := ((index $_503_uid_gid 1) | int64) -}} |
| 315 | +{{- $_504_uid_gid := (get (fromJson (include "redpanda.securityContextUidGid" (dict "a" (list $state $pool "set-tiered-storage-cache-dir-ownership")))) "r") -}} |
| 316 | +{{- $uid := ((index $_504_uid_gid 0) | int64) -}} |
| 317 | +{{- $gid := ((index $_504_uid_gid 1) | int64) -}} |
318 | 318 | {{- $cacheDir := (get (fromJson (include "redpanda.Storage.TieredCacheDirectory" (dict "a" (list $state.Values.storage $state)))) "r") -}} |
319 | 319 | {{- $mounts := (get (fromJson (include "redpanda.CommonMounts" (dict "a" (list $state)))) "r") -}} |
320 | 320 | {{- $mounts = (concat (default (list) $mounts) (list (mustMergeOverwrite (dict "name" "" "mountPath" "") (dict "name" "datadir" "mountPath" "/var/lib/redpanda/data")))) -}} |
|
0 commit comments