Skip to content

Commit

Permalink
nameoverride
Browse files Browse the repository at this point in the history
  • Loading branch information
pulledtim committed Jul 19, 2024
1 parent 9719fce commit fb68081
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions aws/didymosxr/nginx/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Expand the name of the chart.
*/}}
{{- define "nginx.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- default .Chart.Name .Values.nginx.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand All @@ -11,10 +11,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "nginx.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- if .Values.nginx.fullnameOverride }}
{{- .Values.nginx.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- $name := default .Chart.Name .Values.nginx.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand Down
2 changes: 1 addition & 1 deletion aws/didymosxr/nginx/templates/route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
host: {{ .Values.nginx.route.host }}
to:
kind: Service
name: {{ $fullName }}
name: {{ include "nginx.fullname" . }}
{{- if .Values.nginx.route.tls }}
tls:
{{- with .Values.nginx.route.tls }}
Expand Down
1 change: 1 addition & 0 deletions aws/didymosxr/nginx/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
nginx:
fullnameOverride: didymosxr-nginx
service:
type: ClusterIP
route:
Expand Down

0 comments on commit fb68081

Please sign in to comment.