From f2fd295bfa74a41630c31ee73bb005ef5ea3229b Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sat, 6 Feb 2021 21:54:28 +0100 Subject: [PATCH] Update ingresses to networking.k8s.io/v1 --- .github/workflows/helm-charts-test.yaml | 2 +- charts/commento/Chart.yaml | 3 ++- charts/commento/templates/ingress.yaml | 9 ++++++--- charts/default-backend/Chart.yaml | 4 ++-- charts/default-backend/templates/ingress.yaml | 9 ++++++--- charts/redirect/Chart.yaml | 4 ++-- charts/redirect/templates/_helpers.tpl | 7 +++++-- charts/redirect/templates/ingress.yaml | 2 +- 8 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.github/workflows/helm-charts-test.yaml b/.github/workflows/helm-charts-test.yaml index adb1a4a..913d74a 100644 --- a/.github/workflows/helm-charts-test.yaml +++ b/.github/workflows/helm-charts-test.yaml @@ -29,7 +29,7 @@ jobs: run: git fetch --prune --unshallow - name: Create kind cluster - uses: helm/kind-action@v1.0.0 + uses: helm/kind-action@v1.1.0 with: installLocalPathProvisioner: true # Only build a kind cluster if there are chart changes to test. diff --git a/charts/commento/Chart.yaml b/charts/commento/Chart.yaml index 7760c8f..0f907a6 100644 --- a/charts/commento/Chart.yaml +++ b/charts/commento/Chart.yaml @@ -4,7 +4,8 @@ description: Helm chart to install commento on a kubernetes cluster home: https://commento.io/ icon: https://cdn.commento.io/images/logo.svg name: commento -version: 0.1.3 +version: 0.2.0 +kubeVersion: ^1.19 maintainers: - name: WyriHaximus email: helm@wyrihaximus.net diff --git a/charts/commento/templates/ingress.yaml b/charts/commento/templates/ingress.yaml index f5377ea..129e28f 100644 --- a/charts/commento/templates/ingress.yaml +++ b/charts/commento/templates/ingress.yaml @@ -1,7 +1,7 @@ {{- if eq (eq .Values.ingress.host "comments.YOURDOMAIN.TLD") false }} {{- $chartName := .Chart.Name -}} {{- $fullName := include "commons.fullname" . -}} -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -21,7 +21,10 @@ spec: http: paths: - path: / + pathType: Prefix backend: - serviceName: {{ $fullName }} - servicePort: commento + service: + name: {{ $fullName }} + port: + name: commento {{- end }} \ No newline at end of file diff --git a/charts/default-backend/Chart.yaml b/charts/default-backend/Chart.yaml index d653a1f..06501b5 100644 --- a/charts/default-backend/Chart.yaml +++ b/charts/default-backend/Chart.yaml @@ -4,8 +4,8 @@ description: A Helm chart for Kubernetes home: https://github.com/wyrihaximusnet/docker-default-backend icon: https://helm.wyrihaximus.net/images/charts/default-backend.png type: application -version: 0.4.4 -kubeVersion: ^1.18 +version: 0.5.0 +kubeVersion: ^1.19 appVersion: random maintainers: - name: WyriHaximus diff --git a/charts/default-backend/templates/ingress.yaml b/charts/default-backend/templates/ingress.yaml index 6842f6f..6bc4e32 100644 --- a/charts/default-backend/templates/ingress.yaml +++ b/charts/default-backend/templates/ingress.yaml @@ -1,7 +1,7 @@ {{- if not (empty .Values.ingress.hosts) -}} {{- $chartName := .Chart.Name -}} {{- $fullName := include "commons.fullname" . -}} -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -24,8 +24,11 @@ spec: http: paths: - path: / + pathType: Prefix backend: - serviceName: {{ $fullName }} - servicePort: default-backend + service: + name: {{ $fullName }} + port: + name: default-backend {{- end }} {{ end }} diff --git a/charts/redirect/Chart.yaml b/charts/redirect/Chart.yaml index 21efdd8..1f4f862 100644 --- a/charts/redirect/Chart.yaml +++ b/charts/redirect/Chart.yaml @@ -4,8 +4,8 @@ description: Redirect home: https://github.com/wyrihaximusnet/docker-redirect icon: https://helm.wyrihaximus.net/images/charts/redirect.png type: application -version: 0.9.5 -kubeVersion: ^1.18 +version: 0.10.0 +kubeVersion: ^1.19 appVersion: random maintainers: - name: WyriHaximus diff --git a/charts/redirect/templates/_helpers.tpl b/charts/redirect/templates/_helpers.tpl index 6e35490..f583371 100644 --- a/charts/redirect/templates/_helpers.tpl +++ b/charts/redirect/templates/_helpers.tpl @@ -18,9 +18,12 @@ Host rule http: paths: - path: / + pathType: Prefix backend: - serviceName: {{ .FullName }} - servicePort: {{ .SvcPort }} + service: + name: {{ .FullName }} + port: + number: {{ .SvcPort }} {{- end -}} {{/* diff --git a/charts/redirect/templates/ingress.yaml b/charts/redirect/templates/ingress.yaml index 30bf046..00b3e7b 100644 --- a/charts/redirect/templates/ingress.yaml +++ b/charts/redirect/templates/ingress.yaml @@ -2,7 +2,7 @@ {{- $hosts := concat (.Values.redirect.ingressHosts | mustDeepCopy) (.Values.redirect.hosts | mustDeepCopy | keys) -}} {{- range $host := ($hosts | uniq) }} --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }}-{{ $host | replace "." "-" }}