diff --git a/charts/py-app/templates/_helpers.tpl b/charts/py-app/templates/_helpers.tpl index 34ee528..3857c41 100644 --- a/charts/py-app/templates/_helpers.tpl +++ b/charts/py-app/templates/_helpers.tpl @@ -83,10 +83,3 @@ 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 }} diff --git a/charts/py-app/templates/static-service.yaml b/charts/py-app/templates/static-service.yaml index d3dddbd..84d4729 100644 --- a/charts/py-app/templates/static-service.yaml +++ b/charts/py-app/templates/static-service.yaml @@ -1,8 +1,8 @@ -{{- if .Values.service.enabled -}} +{{- if and .Values.service.enabled .Values.service.staticServiceName -}} apiVersion: v1 kind: Service metadata: - name: {{ include "py-app.staticServiceName" . }} + name: {{ .Values.service.staticServiceName }} labels: {{- include "py-app.labels" . | nindent 4 }} spec: