diff --git a/charts/open-notificaties/templates/ingress.yaml b/charts/open-notificaties/templates/ingress.yaml index f1a545f..ac115d1 100644 --- a/charts/open-notificaties/templates/ingress.yaml +++ b/charts/open-notificaties/templates/ingress.yaml @@ -6,9 +6,11 @@ {{- $flowerFullName := include "open-notificaties.flowerFullname" . -}} {{- $flowerSvcPort := .Values.flower.service.port -}} {{- $flowerUrlPrefix := .Values.settings.flower.urlPrefix -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} +apiVersion: networking.k8s.io/v1 +{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }} apiVersion: networking.k8s.io/v1beta1 -{{- else -}} +{{- else }} apiVersion: extensions/v1beta1 {{- end }} kind: Ingress @@ -21,6 +23,9 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} {{- if .Values.ingress.tls }} tls: {{- range .Values.ingress.tls }} @@ -38,13 +43,33 @@ spec: paths: - path: / backend: + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} serviceName: {{ $fullName }} servicePort: {{ $svcPort }} + {{- end }} + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} + pathType: ImplementationSpecific + {{- end }} {{- if and ($flowerEnabled) (not $flowerIngressEnabled) }} - path: /{{ $flowerUrlPrefix }} backend: + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} + service: + name: {{ $flowerFullName }} + port: + number: {{ $flowerSvcPort }} + {{- else }} serviceName: {{ $flowerFullName }} servicePort: {{ $flowerSvcPort }} + {{- end }} + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} + pathType: ImplementationSpecific + {{- end }} {{- end }} {{- end }} {{- end }} @@ -54,9 +79,11 @@ spec: {{- $fullName := include "open-notificaties.flowerFullname" . -}} {{- $svcPort := .Values.flower.service.port -}} {{- $flowerUrlPrefix := .Values.settings.flower.urlPrefix -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} +apiVersion: networking.k8s.io/v1 +{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }} apiVersion: networking.k8s.io/v1beta1 -{{- else -}} +{{- else }} apiVersion: extensions/v1beta1 {{- end }} kind: Ingress @@ -69,6 +96,9 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} {{- if .Values.flower.ingress.tls }} tls: {{- range .Values.flower.ingress.tls }} @@ -86,7 +116,17 @@ spec: paths: - path: /{{ $flowerUrlPrefix }} backend: + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} serviceName: {{ $fullName }} servicePort: {{ $svcPort }} + {{- end }} + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} + pathType: ImplementationSpecific + {{- end }} {{- end }} {{- end }} diff --git a/charts/open-notificaties/values.yaml b/charts/open-notificaties/values.yaml index 847f242..93a5f5a 100644 --- a/charts/open-notificaties/values.yaml +++ b/charts/open-notificaties/values.yaml @@ -59,6 +59,7 @@ ingress: annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" + className: "" hosts: - open-notificaties.gemeente.nl tls: [] diff --git a/charts/open-zaak/Chart.yaml b/charts/open-zaak/Chart.yaml index c1153e1..9b0f13d 100644 --- a/charts/open-zaak/Chart.yaml +++ b/charts/open-zaak/Chart.yaml @@ -6,14 +6,14 @@ type: application version: 0.8.1 appVersion: "1.7.1" -dependencies: - - name: postgresql - version: ~10.12.0 - repository: https://charts.bitnami.com/bitnami - tags: - - postgresql - - name: redis - version: ~13.0.0 - repository: https://charts.bitnami.com/bitnami - tags: - - redis +# dependencies: +# - name: postgresql +# version: ~10.12.0 +# repository: https://charts.bitnami.com/bitnami +# tags: +# - postgresql +# - name: redis +# version: ~13.0.0 +# repository: https://charts.bitnami.com/bitnami +# tags: +# - redis diff --git a/charts/open-zaak/templates/ingress.yaml b/charts/open-zaak/templates/ingress.yaml index 6cd45db..bf9c831 100644 --- a/charts/open-zaak/templates/ingress.yaml +++ b/charts/open-zaak/templates/ingress.yaml @@ -1,9 +1,11 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "open-zaak.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} +apiVersion: networking.k8s.io/v1 +{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }} apiVersion: networking.k8s.io/v1beta1 -{{- else -}} +{{- else }} apiVersion: extensions/v1beta1 {{- end }} kind: Ingress @@ -16,6 +18,9 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} {{- if .Values.ingress.tls }} tls: {{- range .Values.ingress.tls }} @@ -33,7 +38,17 @@ spec: paths: - path: / backend: + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} + service: + name: {{ $fullName }} + port: + name: {{ $svcPort }} + {{- else }} serviceName: {{ $fullName }} servicePort: {{ $svcPort }} + {{- end}} + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} + pathType: ImplementationSpecific + {{- end }} {{- end }} {{- end }} diff --git a/charts/open-zaak/values.yaml b/charts/open-zaak/values.yaml index d4fc912..f869477 100644 --- a/charts/open-zaak/values.yaml +++ b/charts/open-zaak/values.yaml @@ -59,6 +59,7 @@ ingress: annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" + className: "" hosts: - open-zaak.gemeente.nl tls: []