Skip to content

Commit

Permalink
chore(dependencies): add better support for fullnameOverride
Browse files Browse the repository at this point in the history
  • Loading branch information
emaincourt committed Sep 17, 2024
1 parent 8b08dab commit 0ff4439
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions charts/redash/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ Create a default fully qualified scheduler name.
Create a default fully qualified postgresql name.
*/}}
{{- define "redash.postgresql.fullname" -}}
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
{{ template "postgresql.v1.primary.fullname" .Subcharts.postgresql }}
{{- end -}}

{{/*
Create a default fully qualified redis name.
*/}}
{{- define "redash.redis.fullname" -}}
{{- printf "%s-%s" .Release.Name "redis-master" | trunc 63 | trimSuffix "-" -}}
{{ printf "%s-master" (include "common.names.fullname" .Subcharts.redis) }}
{{- end -}}

{{/*
Expand Down Expand Up @@ -91,7 +91,7 @@ Shared environment block used across each component.
- name: REDASH_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-postgresql
name: {{ include "redash.fullname" . }}-postgresql
key: password
- name: REDASH_DATABASE_HOSTNAME
value: {{ include "redash.postgresql.fullname" . }}
Expand All @@ -117,7 +117,7 @@ Shared environment block used across each component.
{{- with .Values.redis.existingSecret }}
name: {{ . }}
{{- else }}
name: {{ .Release.Name }}-redis
name: {{ include "redash.fullname" . }}-redis
{{- end }}
key: redis-password
- name: REDASH_REDIS_HOSTNAME
Expand Down
4 changes: 2 additions & 2 deletions charts/redash/templates/hook-migrations-job.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ .Release.Name }}-migrations"
name: "{{ include "redash.fullname" . }}-migrations"
labels:
{{- include "redash.labels" . | nindent 4 }}
app.kubernetes.io/component: migrations
Expand All @@ -14,7 +14,7 @@ spec:
ttlSecondsAfterFinished: {{ .Values.migrations.ttlSecondsAfterFinished }}
template:
metadata:
name: "{{ .Release.Name }}"
name: "{{ include "redash.fullname" . }}"
labels:
{{- include "redash.selectorLabels" . | nindent 8 }}
{{- with .Values.migrations.podLabels }}
Expand Down

0 comments on commit 0ff4439

Please sign in to comment.