diff --git a/helm/taskplaner/templates/ingress.yaml b/helm/taskplaner/templates/ingress.yaml index 2cc026d..b630b81 100644 --- a/helm/taskplaner/templates/ingress.yaml +++ b/helm/taskplaner/templates/ingress.yaml @@ -33,7 +33,7 @@ spec: pathType: {{ .pathType }} backend: service: - name: {{ include "taskplaner.fullname" $ }} + name: {{ $.Values.service.name | default (include "taskplaner.fullname" $) }} port: name: http {{- end }} diff --git a/helm/taskplaner/templates/service.yaml b/helm/taskplaner/templates/service.yaml index 9e31ac8..f2a7334 100644 --- a/helm/taskplaner/templates/service.yaml +++ b/helm/taskplaner/templates/service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "taskplaner.fullname" . }} + name: {{ .Values.service.name | default (include "taskplaner.fullname" .) }} labels: {{- include "taskplaner.labels" . | nindent 4 }} spec: diff --git a/helm/taskplaner/values.yaml b/helm/taskplaner/values.yaml index 6c4ff40..21911f9 100644 --- a/helm/taskplaner/values.yaml +++ b/helm/taskplaner/values.yaml @@ -36,6 +36,9 @@ securityContext: - ALL service: + # Name override to avoid Kubernetes creating TASKPLANER_* env vars + # which conflict with the app's envPrefix + name: "tp-app" type: ClusterIP port: 80 targetPort: 3000