added default value used when staticServiceName is absent
This commit is contained in:
@ -83,3 +83,10 @@ envFrom:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end -}}
|
||||
|
||||
{{/*
|
||||
Create staticServiceName, same for all environments
|
||||
*/}}
|
||||
{{- define "py-app.staticServiceName" -}}
|
||||
{{- .Values.service.staticServiceName | default (printf "%s-%s" .Values.nameOverride "static-svc") }}
|
||||
{{- end }}
|
||||
|
@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.service.staticServiceName }}
|
||||
name: {{ include "py-app.staticServiceName" . }}
|
||||
labels:
|
||||
{{- include "py-app.labels" . | nindent 4 }}
|
||||
spec:
|
||||
|
Reference in New Issue
Block a user