Skip to content

Commit

Permalink
Fixing stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoColomb authored Oct 29, 2024
1 parent 43629d4 commit 8e9b71e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/netbox-operator/ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
netbox:
enabled: true
enabled: false
nameOverride: netbox-app
14 changes: 7 additions & 7 deletions charts/netbox-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/netbox-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 8e9b71e

Please sign in to comment.