fix: simplified conditional static service
This commit is contained in:
@ -83,10 +83,3 @@ envFrom:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- 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 }}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{{- if .Values.service.enabled -}}
|
{{- if and .Values.service.enabled .Values.service.staticServiceName -}}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "py-app.staticServiceName" . }}
|
name: {{ .Values.service.staticServiceName }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "py-app.labels" . | nindent 4 }}
|
{{- include "py-app.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
Reference in New Issue
Block a user