From 8f4385bd8a7b24ae7017c0c1088fbb1a3dd1a577 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 18 Nov 2021 16:07:54 +0100 Subject: [PATCH 1/4] Make Bootzooka use new ingress API --- helm/bootzooka/Chart.yaml | 2 +- helm/bootzooka/templates/ingress.yaml | 9 ++++++--- helm/bootzooka/values.yaml | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/helm/bootzooka/Chart.yaml b/helm/bootzooka/Chart.yaml index ac90de5e1..253ed33d6 100644 --- a/helm/bootzooka/Chart.yaml +++ b/helm/bootzooka/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "1.0" description: "A Helm chart for Bootzooka" name: bootzooka -version: 0.1.2 +version: 0.2.0 type: application keywords: - scala diff --git a/helm/bootzooka/templates/ingress.yaml b/helm/bootzooka/templates/ingress.yaml index 438db4789..5b93c5d90 100644 --- a/helm/bootzooka/templates/ingress.yaml +++ b/helm/bootzooka/templates/ingress.yaml @@ -1,5 +1,5 @@ {{- if .Values.bootzooka.ingress.enabled }} -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "bootzooka.fullname" . }}-ingress @@ -30,8 +30,11 @@ spec: http: paths: - path: {{ .host.path }} + pathType: {{ .host.pathType }} backend: - serviceName: {{ $serviceName }} - servicePort: {{ .host.port }} + service: + name: {{ $serviceName }} + port: + name: {{ .host.port }} {{- end }} {{- end }} diff --git a/helm/bootzooka/values.yaml b/helm/bootzooka/values.yaml index 2d725c412..87ea8bdcf 100644 --- a/helm/bootzooka/values.yaml +++ b/helm/bootzooka/values.yaml @@ -61,6 +61,7 @@ bootzooka: - host: domain: bootzooka.example.com path: / + pathType: Prefix port: http tls: - secretName: bootzooka-tls From e3e8630ff60226aeccc7dd48b427e023e7282187 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 22 Nov 2021 15:24:15 +0100 Subject: [PATCH 2/4] Use ingress syntax depending on K8s version it's installed on --- helm/bootzooka/templates/ingress.yaml | 13 +++++++++++++ helm/bootzooka/values.yaml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/helm/bootzooka/templates/ingress.yaml b/helm/bootzooka/templates/ingress.yaml index 5b93c5d90..f4f238d73 100644 --- a/helm/bootzooka/templates/ingress.yaml +++ b/helm/bootzooka/templates/ingress.yaml @@ -1,5 +1,11 @@ {{- if .Values.bootzooka.ingress.enabled }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0 <1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} kind: Ingress metadata: name: {{ include "bootzooka.fullname" . }}-ingress @@ -30,11 +36,18 @@ spec: http: paths: - path: {{ .host.path }} + {{- if and .host.pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} pathType: {{ .host.pathType }} + {{- end }} backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: name: {{ $serviceName }} port: name: {{ .host.port }} + {{- else }} + serviceName: {{ $serviceName }} + servicePort: {{ .host.port }} + {{- end }} {{- end }} {{- end }} diff --git a/helm/bootzooka/values.yaml b/helm/bootzooka/values.yaml index 87ea8bdcf..df94c0e98 100644 --- a/helm/bootzooka/values.yaml +++ b/helm/bootzooka/values.yaml @@ -61,7 +61,7 @@ bootzooka: - host: domain: bootzooka.example.com path: / - pathType: Prefix + pathType: ImplementationSpecific port: http tls: - secretName: bootzooka-tls From 087507a977ed0dcdb80f1c8ae827c32e27cd5365 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 25 Nov 2021 13:11:59 +0100 Subject: [PATCH 3/4] Bump up kind-action version to fix hanging kind installs --- .github/workflows/bootzooka-helm-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bootzooka-helm-ci.yaml b/.github/workflows/bootzooka-helm-ci.yaml index d3afad250..371e37595 100644 --- a/.github/workflows/bootzooka-helm-ci.yaml +++ b/.github/workflows/bootzooka-helm-ci.yaml @@ -52,7 +52,7 @@ jobs: - name: Create kind ${{ matrix.k8s }} cluster id: kind-cluster-setup - uses: helm/kind-action@v1.1.0 + uses: helm/kind-action@v1.2.0 with: node_image: kindest/node:${{ matrix.k8s }} wait: "120s" From 8d2491c8fcd666ce79865783254a2a4cec6ce8e3 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 25 Nov 2021 15:34:18 +0100 Subject: [PATCH 4/4] Update Helm README.md; update Helm and K8s versions used in Helm CI workflow --- .github/workflows/bootzooka-helm-ci.yaml | 10 ++++------ helm/bootzooka/README.md | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bootzooka-helm-ci.yaml b/.github/workflows/bootzooka-helm-ci.yaml index 371e37595..ff489b36b 100644 --- a/.github/workflows/bootzooka-helm-ci.yaml +++ b/.github/workflows/bootzooka-helm-ci.yaml @@ -38,11 +38,9 @@ jobs: strategy: matrix: k8s: - - v1.15.12 - - v1.16.15 - - v1.17.11 - - v1.18.8 - - v1.19.4 + - v1.20.7 + - v1.21.2 + - v1.22.4 steps: - name: Check-out repository id: repo-checkout @@ -110,5 +108,5 @@ jobs: charts_url: https://softwaremill.github.io/sml-helm-public-repo owner: softwaremill repository: sml-helm-public-repo - helm_version: 3.4.1 + helm_version: 3.7.1 linting: off diff --git a/helm/bootzooka/README.md b/helm/bootzooka/README.md index b147c5fd5..9242223bc 100644 --- a/helm/bootzooka/README.md +++ b/helm/bootzooka/README.md @@ -1,6 +1,6 @@ # bootzooka -![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square) +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square) A Helm chart for Bootzooka @@ -44,6 +44,7 @@ The following table lists the configurable parameters of the chart and the defau | bootzooka.ingress.enabled | bool | `true` | | | bootzooka.ingress.hosts[0].host.domain | string | `"bootzooka.example.com"` | | | bootzooka.ingress.hosts[0].host.path | string | `"/"` | | +| bootzooka.ingress.hosts[0].host.pathType | string | `"ImplementationSpecific"` | | | bootzooka.ingress.hosts[0].host.port | string | `"http"` | | | bootzooka.ingress.tls[0].hosts[0] | string | `"bootzooka.example.com"` | | | bootzooka.ingress.tls[0].secretName | string | `"bootzooka-tls"` | |