diff --git a/charts/netbox-operator/ci/default-values.yaml b/charts/netbox-operator/ci/default-values.yaml index d6abbe5..c648cd1 100644 --- a/charts/netbox-operator/ci/default-values.yaml +++ b/charts/netbox-operator/ci/default-values.yaml @@ -1,3 +1,3 @@ netbox: - enabled: true + enabled: false nameOverride: netbox-app diff --git a/charts/netbox-operator/templates/_helpers.tpl b/charts/netbox-operator/templates/_helpers.tpl index 96d554b..a355e6b 100644 --- a/charts/netbox-operator/templates/_helpers.tpl +++ b/charts/netbox-operator/templates/_helpers.tpl @@ -4,19 +4,19 @@ Create the name of the service account to use */}} {{- define "netbox-operator.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "common.names.fullname" .) .Values.serviceAccount.name | trunc 63 | trimSuffix "-" }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name | trunc 63 | trimSuffix "-" }} -{{- end -}} -{{- end -}} +{{- if .Values.serviceAccount.create }} + {{- default (include "common.names.fullname" .) .Values.serviceAccount.name | trunc 63 | trimSuffix "-" }} +{{- else }} + {{- default "default" .Values.serviceAccount.name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} {{/* Name of the Secret that contains the NetBox API Token */}} {{- define "netbox-operator.netbox.secret" -}} {{- if .Values.netbox.enabled }} - {{ printf "%s-%s" (include "common.names.dependency.fullname" (dict "chartName" "netbox" "chartValues" .Values.netbox "context" .)) "superuser" | trunc 63 | trimSuffix "-" }} + {{- printf "%s-%s" (include "common.names.dependency.fullname" (dict "chartName" "netbox" "chartValues" .Values.netbox "context" .)) "superuser" | trunc 63 | trimSuffix "-" }} {{- else }} {{- include "common.secrets.name" (dict "existingSecret" .Values.auth.existingSecret "defaultNameSuffix" "netbox-auth" "context" .) }} {{- end }} diff --git a/charts/netbox-operator/templates/deployment.yaml b/charts/netbox-operator/templates/deployment.yaml index 9afea88..62d6c03 100644 --- a/charts/netbox-operator/templates/deployment.yaml +++ b/charts/netbox-operator/templates/deployment.yaml @@ -71,7 +71,7 @@ spec: - name: AUTH_TOKEN valueFrom: secretKeyRef: - name: {{ include "netbox-operator.netbox.secret" . }} + name: {{ include "netbox-operator.netbox.secret" $ }} key: api_token - name: DEBUG_ENABLE value: {{ .Values.debug | quote }}