diff --git a/charts/gtm-server-container-cluster/Chart.yaml b/charts/gtm-server-container-cluster/Chart.yaml index f453406..842dfb1 100644 --- a/charts/gtm-server-container-cluster/Chart.yaml +++ b/charts/gtm-server-container-cluster/Chart.yaml @@ -15,7 +15,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. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.5 +version: 0.1.6 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/gtm-server-container-cluster/templates/ingress.yaml b/charts/gtm-server-container-cluster/templates/ingress.yaml index 14cbb64..67ba405 100644 --- a/charts/gtm-server-container-cluster/templates/ingress.yaml +++ b/charts/gtm-server-container-cluster/templates/ingress.yaml @@ -1,6 +1,5 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "gtm-server-container-cluster.fullname" . -}} -{{- $taggingHost := .Values.ingress.taggingHost -}} {{- $svcPort := .Values.service.port -}} {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} @@ -19,48 +18,36 @@ metadata: name: {{ $fullName }} labels: {{- include "gtm-server-container-cluster.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} annotations: - {{- toYaml . | nindent 4 }} - {{- end }} + {{- toYaml .Values.ingress.annotations | nindent 4 }} spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + {{- if .Values.ingress.className }} ingressClassName: {{ .Values.ingress.className }} {{- end }} tls: - hosts: - - {{ lower .Values.ingress.taggingHost | quote }} + {{- range .Values.ingress.rules }} + - {{ lower .taggingHost | quote }} + {{- end }} secretName: "{{ $fullName }}-tls-secret" rules: - - host: {{ .Values.ingress.taggingHost }} + {{- range .Values.ingress.rules }} + - host: {{ .taggingHost }} http: paths: - path: / - {{- if and .Values.ingress.pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .Values.ingress.pathType }} - {{- end }} + pathType: {{ .pathType }} backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: name: {{ $fullName }} port: number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - path: /preview - {{- if and .Values.ingress.pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .Values.ingress.pathType }} - {{- end }} + pathType: {{ .pathType }} backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: name: "{{ $fullName }}-preview" port: number: {{ $svcPort }} - {{- else }} - serviceName: "{{ $fullName }}-preview" - servicePort: {{ $svcPort }} - {{- end }} + {{- end }} {{- end }} diff --git a/charts/gtm-server-container-cluster/values.yaml b/charts/gtm-server-container-cluster/values.yaml index 9f521bb..a0ba2ec 100644 --- a/charts/gtm-server-container-cluster/values.yaml +++ b/charts/gtm-server-container-cluster/values.yaml @@ -43,11 +43,15 @@ service: ingress: enabled: true className: "" - taggingHost: chart-example.local - pathType: ImplementationSpecific annotations: - cert-manager.io/acme-challenge-type: http01 - cert-manager.io/cluster-issuer: letsencrypt-prod + cert-manager.io/acme-challenge-type: "http01" + cert-manager.io/cluster-issuer: "letsencrypt-prod" + rules: + - taggingHost: "chart-example1.local" + pathType: "ImplementationSpecific" + - taggingHost: "chart-example2.local" + pathType: "ImplementationSpecific" + resources: # We usually recommend not to specify default resources and to leave this as a conscious