Update _netshoot.tpl

Signed-off-by: Kjeld Schouten <info@kjeldschouten.nl>
This commit is contained in:
Kjeld Schouten
2025-01-30 12:04:22 +01:00
parent 2a4961e168
commit 7879c416fc

View File

@@ -3,14 +3,18 @@ Template to render code-server addon
It will include / inject the required templates based on the given values.
*/}}
{{- define "tc.v1.common.addon.netshoot" -}}
{{- $targetSelector := "main" -}}
{{- $targetSelector := list "main" -}}
{{- if $.Values.addons.netshoot.targetSelector -}}
{{- $targetSelector = $.Values.addons.netshoot.container.targetSelector -}}
{{- end -}}
{{- if .Values.addons.netshoot.enabled -}}
{{/* Append the code-server container to the workloads */}}
{{- $workload := get $.Values.workload $targetSelector -}}
{{- $_ := set $workload.podSpec.containers "netshoot" .Values.addons.netshoot.container -}}
{{- range $targetSelector -}}
{{/* Append the code-server container to the workloads */}}
{{- $workload := get $.Values.workload $targetSelector -}}
{{- $_ := set $workload.podSpec.containers "netshoot" .Values.addons.netshoot.container -}}
{{- end -}}
{{- end -}}
{{- end -}}