From 00b968b90df06856e2c88ec67d58511dc8be2320 Mon Sep 17 00:00:00 2001 From: treydock Date: Wed, 5 Jun 2024 14:05:59 -0400 Subject: [PATCH] Avoid changing Ingress name unnecessarily (#251) --- charts/webservice/Chart.yaml | 2 +- charts/webservice/templates/ingress.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/webservice/Chart.yaml b/charts/webservice/Chart.yaml index 93ff863..d727a94 100644 --- a/charts/webservice/Chart.yaml +++ b/charts/webservice/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: webservice description: OSC webservice bootstrap Helm Chart type: application -version: 0.35.1 +version: 0.35.2 appVersion: "0.1.0" maintainers: - name: treydock diff --git a/charts/webservice/templates/ingress.yaml b/charts/webservice/templates/ingress.yaml index 2ede876..366592a 100644 --- a/charts/webservice/templates/ingress.yaml +++ b/charts/webservice/templates/ingress.yaml @@ -4,7 +4,11 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: + {{- if eq (len $root.Values.containers) 1 }} + name: {{ include "webservice.name" $root }} + {{- else }} name: {{ include "webservice.name" $root }}-{{ tpl $container.name $root }} + {{- end }} labels: {{- include "webservice.labels" $root | nindent 4 }} {{- if (include "webservice.alert.receiver" $root) }}