Error while checking for service account using Lookup Function

52 views Asked by At

{{- if not (lookup "v1" "ServiceAccount" "{{.Release.Namespace}}" "{{ .Release.preinstall }}" ) }} << another service account >> {{- end }}

While using lookup function for checking that if service account is already present it will not create another service account with same functionality as earlier they were created simultaneously but even after using the lookup function they are created simultaneously and if using the index function or providing the name as a variable $namespace:= {{.Release.Namespace}} and $service:= {{ .Release.preinstall"}}) } it is giving the error as nil pointer.

Can anyone please help with the use of lookup function and what is the error in using it

0

There are 0 answers