From c7be9bf55b99fe88095fd61e7f0eef1f1bb9a90d Mon Sep 17 00:00:00 2001 From: Julius Tens Date: Mon, 9 Sep 2024 21:19:08 +0200 Subject: [PATCH] make hosts optional in chart --- kubernetes/.charts/simple-app/Chart.yaml | 2 +- kubernetes/.charts/simple-app/templates/ingress.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kubernetes/.charts/simple-app/Chart.yaml b/kubernetes/.charts/simple-app/Chart.yaml index 2c6428c..65e80e7 100644 --- a/kubernetes/.charts/simple-app/Chart.yaml +++ b/kubernetes/.charts/simple-app/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 name: simple-app -version: 3.0.1 +version: 3.1.0 description: Provides a deployment, service and ingress to expose one container at a given domain diff --git a/kubernetes/.charts/simple-app/templates/ingress.yaml b/kubernetes/.charts/simple-app/templates/ingress.yaml index 0aecc07..77d6501 100644 --- a/kubernetes/.charts/simple-app/templates/ingress.yaml +++ b/kubernetes/.charts/simple-app/templates/ingress.yaml @@ -1,4 +1,5 @@ {{- $dot := . }} +{{- if .Values.hosts -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -32,3 +33,4 @@ spec: port: number: 80 {{- end }} +{{- end -}}