Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Bootzooka use new ingress API #724

Merged
merged 4 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/bootzooka-helm-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -52,7 +50,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"
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion helm/bootzooka/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion helm/bootzooka/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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"` | |
Expand Down
16 changes: 16 additions & 0 deletions helm/bootzooka/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -30,8 +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 }}
1 change: 1 addition & 0 deletions helm/bootzooka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ bootzooka:
- host:
domain: bootzooka.example.com
path: /
pathType: ImplementationSpecific
port: http
tls:
- secretName: bootzooka-tls
Expand Down