Skip to content

Commit

Permalink
feat(chart): templating in name(Override) for new object
Browse files Browse the repository at this point in the history
[deploy]
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Jan 23, 2024
1 parent 3be1d42 commit 618470e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
13 changes: 10 additions & 3 deletions charts/selenium-grid/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,17 @@ Service Account fullname
{{- end -}}

{{/*
Video ConfigMap fullname
Recorder ConfigMap fullname
*/}}
{{- define "seleniumGrid.video.fullname" -}}
{{- tpl (default "selenium-video" .Values.videoRecorder.nameOverride) $ | trunc 63 | trimSuffix "-" -}}
{{- define "seleniumGrid.recorder.fullname" -}}
{{- tpl (default "selenium-recorder-config" .Values.recorderConfigMap.name) $ | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Uploader ConfigMap fullname
*/}}
{{- define "seleniumGrid.uploader.fullname" -}}
{{- tpl (default "selenium-uploader-config" .Values.uploaderConfigMap.name) $ | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/recorder-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.recorderConfigMap.name }}
name: {{ template "seleniumGrid.recorder.fullname" $ }}
namespace: {{ .Release.Namespace }}
{{- with .Values.recorderConfigMap.annotations }}
annotations: {{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/uploader-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.uploaderConfigMap.name }}
name: {{ template "seleniumGrid.uploader.fullname" $ }}
namespace: {{ .Release.Namespace }}
{{- with .Values.uploaderConfigMap.annotations }}
annotations: {{- toYaml . | nindent 4 }}
Expand Down

0 comments on commit 618470e

Please sign in to comment.