mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-05 05:16:23 -03:00
fix(common): don't try to lookup a configmap in a potentially non-existing namespace
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{{- define "tc.v1.common.lib.util.operator.register" -}}
|
||||
{{- if .Values.operator.register -}}
|
||||
{{- with (lookup "v1" "ConfigMap" "tc-system" $.Chart.Name) -}}
|
||||
{{- fail (printf "You cannot install the [%s] operator twice..." $.Chart.Name) -}}
|
||||
{{- with (lookup "v1" "Namespace" "tc-system" "") -}}
|
||||
{{- with (lookup "v1" "ConfigMap" "tc-system" $.Chart.Name) -}}
|
||||
{{- fail (printf "You cannot install the [%s] operator twice..." $.Chart.Name) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $objectData := (dict "name" $.Chart.Name
|
||||
|
||||
Reference in New Issue
Block a user