diff --git a/charts/prom-aggregation-gateway/Chart.yaml b/charts/prom-aggregation-gateway/Chart.yaml index bb8897e6..ed8c53aa 100644 --- a/charts/prom-aggregation-gateway/Chart.yaml +++ b/charts/prom-aggregation-gateway/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: prom-aggregation-gateway -version: 0.0.2 +version: 0.0.3 home: https://github.com/zapier/prom-aggregation-gateway appVersion: latest description: cLabs prometheus aggregation gateway diff --git a/charts/prom-aggregation-gateway/templates/_helpers.tpl b/charts/prom-aggregation-gateway/templates/_helpers.tpl index db111788..586d27a4 100644 --- a/charts/prom-aggregation-gateway/templates/_helpers.tpl +++ b/charts/prom-aggregation-gateway/templates/_helpers.tpl @@ -44,3 +44,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/name: {{ include "prom-aggregation-gateway.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} + +{{- define "prom-aggregation-gateway.api-port" -}} +{{- .Values.service.port }} +{{- end -}} diff --git a/charts/prom-aggregation-gateway/templates/ingress.yaml b/charts/prom-aggregation-gateway/templates/ingress.yaml index 8104d9f3..d9475dcb 100644 --- a/charts/prom-aggregation-gateway/templates/ingress.yaml +++ b/charts/prom-aggregation-gateway/templates/ingress.yaml @@ -1,4 +1,6 @@ {{- if .Values.ingress.enabled -}} +{{- $fullName := include "prom-aggregation-gateway.fullname" . -}} +{{- $svcPort := include "prom-aggregation-gateway.api-port" . -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -33,9 +35,9 @@ spec: {{- end }} backend: service: - name: {{ include "prom-aggregation-gateway.fullname" . }} + name: {{ $fullName }} port: - number: api-port + number: {{ $svcPort }} {{- end }} {{- end }} {{- end }}