From 6f793bd30b5063a0232508f0fbf0c77ac16d0442 Mon Sep 17 00:00:00 2001 From: Arthur de Moulins Date: Thu, 16 Nov 2023 09:10:21 +0100 Subject: [PATCH] fixes --- infra/helm/zippy/Chart.yaml | 2 +- infra/helm/zippy/templates/ingress.yaml | 19 +++++++++++++++---- .../zippy/templates/zippy-rabbitmq-pvc.yaml | 2 ++ infra/helm/zippy/values.yaml | 2 ++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/infra/helm/zippy/Chart.yaml b/infra/helm/zippy/Chart.yaml index e020312..62b039c 100644 --- a/infra/helm/zippy/Chart.yaml +++ b/infra/helm/zippy/Chart.yaml @@ -14,7 +14,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.1.8 +version: 0.1.9 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/infra/helm/zippy/templates/ingress.yaml b/infra/helm/zippy/templates/ingress.yaml index 71b7199..72153fe 100644 --- a/infra/helm/zippy/templates/ingress.yaml +++ b/infra/helm/zippy/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if .Values.ingress.enabled }} +{{- with .Values.ingress }} +{{- if .enabled }} {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}} apiVersion: networking.k8s.io/v1 {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}} @@ -9,9 +10,18 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ include "zippy.fullname" $ }}-ingress +{{- if .ingress.annotations }} + annotations: +{{ toYaml .annotations | indent 4 }} +{{- end }} +{{- if .ingress.extraLabels }} + labels: +{{ toYaml .extraLabels | indent 4 }} +{{- end }} spec: + ingressClassName: nginx rules: - - host: {{ required "Missing ingress.hostname" .Values.ingress.hostname }} + - host: {{ required "Missing ingress.hostname" .hostname | quote }} http: paths: - path: / @@ -29,6 +39,7 @@ spec: {{- end }} tls: - hosts: - - {{ required "Missing ingress.hostname" .Values.ingress.hostname }} - secretName: {{ .Values.ingress.secretName }} + - {{ required "Missing ingress.hostname" .hostname }} + secretName: {{ .secretName | quote }} +{{- end }} {{- end }} diff --git a/infra/helm/zippy/templates/zippy-rabbitmq-pvc.yaml b/infra/helm/zippy/templates/zippy-rabbitmq-pvc.yaml index 9aafdac..48443be 100644 --- a/infra/helm/zippy/templates/zippy-rabbitmq-pvc.yaml +++ b/infra/helm/zippy/templates/zippy-rabbitmq-pvc.yaml @@ -1,3 +1,4 @@ +{{- if .Values.rabbitmq.enabled }} {{- with .Values.rabbitmq.persistence }} {{- if and .enabled (not .existingClaim) }} kind: PersistentVolumeClaim @@ -20,3 +21,4 @@ spec: {{- end }} {{- end }} {{- end }} +{{- end }} diff --git a/infra/helm/zippy/values.yaml b/infra/helm/zippy/values.yaml index ef8f63d..5b101d9 100644 --- a/infra/helm/zippy/values.yaml +++ b/infra/helm/zippy/values.yaml @@ -63,3 +63,5 @@ ingress: enabled: true secretName: hostname: + annotations: + extraLabels: