diff --git a/helm/mysql-operator/templates/service_account_operator.yaml b/helm/mysql-operator/templates/service_account_operator.yaml index e8e30c55..1558b178 100644 --- a/helm/mysql-operator/templates/service_account_operator.yaml +++ b/helm/mysql-operator/templates/service_account_operator.yaml @@ -1,3 +1,4 @@ +{{- $disable_lookups:= .Values.disableLookups }} {{- $install_namespace := .Release.Namespace }} {{- if and (.Release.IsInstall) (eq $install_namespace "default") }} {{ fail "Please provide a namespace with -n/--namespace . The operator cannot be installed in the 'default' namespace" }} @@ -13,7 +14,7 @@ imagePullSecrets: {{- if not $secret_name }} {{- fail "image.pullSecrets.secretName is required when pull secrets are enabled" }} {{- end }} - {{- if not (lookup "v1" "Secret" $install_namespace $secret_name) }} + {{- if and (not $disable_lookups) (not (lookup "v1" "Secret" $install_namespace $secret_name)) }} {{- $err := printf "image.pullSecrets.secretName: secret '%s' not found in namespace '%s'" $secret_name $install_namespace }} {{- fail $err }} {{- end }} diff --git a/helm/mysql-operator/values.yaml b/helm/mysql-operator/values.yaml index 8b16f615..69e47de5 100644 --- a/helm/mysql-operator/values.yaml +++ b/helm/mysql-operator/values.yaml @@ -9,6 +9,8 @@ image: enabled: false secretName: +disableLookups: false + envs: imagesPullPolicy: IfNotPresent imagesDefaultRegistry: