Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template dataPlaneDomain for Self Hosted Installations #945

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/conductor/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.2
version: 0.5.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
14 changes: 14 additions & 0 deletions charts/conductor/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,17 @@ Create the name of the service account to use
{{- define "conductor.serviceAccountName" -}}
{{- default (include "conductor.fullname" .) .Values.serviceAccount.name }}
{{- end }}

{{/*
If .Values.global.baseDomain is present, create dataPlaneDomain.
This is for Self Hosted installations.
*/}}
{{- define "conductor.dataPlaneDomain" -}}
{{- if .Values.env | toString | regexMatch "DATA_PLANE_BASEDOMAIN" -}}
{{- else -}}
{{- if .Values.global.baseDomain }}
- name: DATA_PLANE_BASEDOMAIN
value: {{- printf " dataplane.%s" .Values.global.baseDomain }}
{{- end }}
{{- end }}
{{- end -}}
1 change: 1 addition & 0 deletions charts/conductor/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
value: "false"
- name: RUST_LOG
value: {{ .Values.logLevel }}
{{ include "conductor.dataPlaneDomain" . | nindent 10 }}
{{- 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/templates/metrics-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ spec:
value: "true"
- name: RUST_LOG
value: {{ .Values.logLevel }}
{{ include "conductor.dataPlaneDomain" . | nindent 10 }}
{{- 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/templates/watcher-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
value: "true"
- name: RUST_LOG
value: {{ .Values.logLevel }}
{{ include "conductor.dataPlaneDomain" . | nindent 10 }}
{{- if .Values.env }}{{ .Values.env | default list | toYaml | nindent 10 }}{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/tembo-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: tembo-operator
description: "Helm chart to deploy the tembo-operator"
type: application
icon: https://cloud.tembo.io/images/TemboElephant.png
version: 0.7.2
version: 0.7.3
home: https://tembo.io
sources:
- https://github.com/tembo-io/tembo
Expand Down
14 changes: 14 additions & 0 deletions charts/tembo-operator/templates/_helpers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,17 @@ app.kubernetes.io/name: {{ include "controller.fullname" . | quote }}
app.kubernetes.io/version: {{ default (index .Values "controller").image.tag .Chart.Version }}
app.kubernetes.io/component: "controller"
{{- end }}

{{/*
If .Values.global.baseDomain is present, create dataPlaneDomain.
This is for Self Hosted installations.
*/}}
{{- define "controller.dataPlaneDomain" -}}
{{- if .Values.controller.extraEnv | toString | regexMatch "DATA_PLANE_BASEDOMAIN" -}}
{{- else -}}
{{- if .Values.global.baseDomain }}
- name: DATA_PLANE_BASEDOMAIN
value: {{- printf " dataplane.%s" .Values.global.baseDomain }}
{{- end }}
{{- end }}
{{- end -}}
1 change: 1 addition & 0 deletions charts/tembo-operator/templates/deployment-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
imagePullPolicy: {{ (index .Values "controller").image.pullPolicy }}
name: tembo-controller
env:
{{ include "controller.dataPlaneDomain" . | nindent 12 }}
{{- with (index .Values "controller").env }}
{{- range . }}
- name: {{ .name }}
Expand Down
2 changes: 1 addition & 1 deletion conductor/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions tembo-operator/testdata/operator-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ pod-init:
extraEnv:
- name: OPENTELEMETRY_ENDPOINT_URL
value: http://tempo.monitoring.svc.cluster.local:4317
- name: DATA_PLANE_BASEDOMAIN
value: data-1.example.tembo.io
resources:
requests:
cpu: 50m
Expand Down
Loading