Skip to content

Commit

Permalink
Template dataPlaneDomain if baseDomain value is present in conductor …
Browse files Browse the repository at this point in the history
…chart

Signed-off-by: Ian Stanton <[email protected]>
  • Loading branch information
ianstanton committed Sep 9, 2024
1 parent c831c8a commit d900610
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions charts/conductor/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,13 @@ Create the name of the service account to use
{{- define "conductor.serviceAccountName" -}}
{{- default (include "conductor.fullname" .) .Values.serviceAccount.name }}
{{- end }}

{{/*
If .Values.baseDomain is present, create dataPlaneDomain.
This is for Self Hosted installations.
*/}}
{{- define "conductor.dataPlaneDomain" -}}
{{- if .Values.baseDomain }}
{{- printf "dataplane.%s" .Values.baseDomain }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/conductor/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ spec:
value: "false"
- name: RUST_LOG
value: {{ .Values.logLevel }}
{{- if .Values.baseDomain }}
- name: DATA_PLANE_BASEDOMAIN
value: {{ include "conductor.dataPlaneDomain" . }}
{{- end }}
{{- if .Values.env }}{{ .Values.env | default list | toYaml | nindent 10 }}{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/conductor/templates/metrics-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ spec:
value: "true"
- name: RUST_LOG
value: {{ .Values.logLevel }}
{{- if .Values.baseDomain }}
- name: DATA_PLANE_BASEDOMAIN
value: {{ include "conductor.dataPlaneDomain" . }}
{{- end }}
{{- if .Values.env }}{{ .Values.env | default list | toYaml | nindent 10 }}{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/conductor/templates/watcher-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ spec:
value: "true"
- name: RUST_LOG
value: {{ .Values.logLevel }}
{{- if .Values.baseDomain }}
- name: DATA_PLANE_BASEDOMAIN
value: {{ include "conductor.dataPlaneDomain" . }}
{{- end }}
{{- if .Values.env }}{{ .Values.env | default list | toYaml | nindent 10 }}{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
Expand Down
1 change: 1 addition & 0 deletions charts/conductor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ serviceAccount:
# when this is set to empty string.
name: ""

baseDomain: ~
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down

0 comments on commit d900610

Please sign in to comment.