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

Update Lagoon charts for Kubernetes 1.22 (min version now 1.19) #417

Merged
merged 24 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d4d5f72
autoscaling/v2beta2 updates to hpas
tobybellwood Apr 5, 2022
34f5d64
networking.k8s.io/v1 updates to ingresses
tobybellwood Apr 5, 2022
b4cbede
scheduling.k8s.io/v1 updates to priorityclasses
tobybellwood Apr 5, 2022
1a0f984
remove lagoon-gatekeeper from lagoon-remote
tobybellwood Apr 5, 2022
b644ac6
set all kubeVersions and chart versions
tobybellwood Apr 5, 2022
1668cf5
Merge branch 'main' into k8s122_chart_updates
tobybellwood Apr 6, 2022
70a2147
update insightsHandler hpa for 1.22
tobybellwood Apr 6, 2022
5a33c70
use correct spec.kind for broker hpa
tobybellwood Apr 8, 2022
451068c
deprecate lagoon-gatekeeper
tobybellwood Apr 8, 2022
3d1317e
set chart versions correctly
tobybellwood Apr 8, 2022
b46d6a9
Merge branch 'main' into k8s122_chart_updates
tobybellwood Apr 8, 2022
2a0580c
Merge branch 'main' into k8s122_chart_updates
tobybellwood May 3, 2022
283419b
fix lagoon-remote deps
tobybellwood May 3, 2022
4a9d9be
fixup lint and test
tobybellwood May 3, 2022
a1937df
update lagoon-build-deploy version
tobybellwood May 3, 2022
6d01b6d
test upgraded k8s versions
tobybellwood May 3, 2022
355f77a
configure ingress-nginx v4
tobybellwood May 3, 2022
429a4f2
typo
tobybellwood May 3, 2022
3d585fc
Merge branch 'main' into k8s122_chart_updates
tobybellwood May 19, 2022
e030986
minor bump lagoon-build-deploy
tobybellwood May 20, 2022
3ca11dd
rework github actions
tobybellwood May 20, 2022
6533659
fix image refs
tobybellwood May 20, 2022
7aad117
fixups
tobybellwood May 20, 2022
b9241f8
Merge branch 'main' into k8s122_chart_updates
tobybellwood Jun 4, 2022
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
51 changes: 51 additions & 0 deletions .github/workflows/lint-test-matrix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Lint and test charts - matrix

on: pull_request

jobs:
# runs for all charts other than lagoon-test, which is excluded in
# default.ct.yaml
lint-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kindest_node_version:
- v1.21.12@sha256:f316b33dd88f8196379f38feb80545ef3ed44d9197dca1bfd48bcb1583210207
- v1.23.6@sha256:b1fa224cc6c7ff32455e0b1fd9cbfd3d3bc87ecaa8fcb06961ed1afb3db0f9ae
- v1.24.0@sha256:0866296e693efe1fed79d5e6c7af8df71fc73ae45e3679af05342239cdc5bc8e
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: "0"

- name: Set up chart-testing dependencies
run: sudo apt-get -y install python3-wheel

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ./default.ct.yaml)
if [[ "$changed" ]]; then
echo "::set-output name=changed::true"
echo "$changed"
fi

- name: Run chart-testing (lint)
run: ct lint --config ./default.ct.yaml

- name: Create kind cluster
uses: helm/[email protected]
with:
version: v0.14.0
node_image: kindest/node:${{ matrix.kindest_node_version }}
if: |
(steps.list-changed.outputs.changed == 'true') ||
(contains(github.event.pull_request.labels.*.name, 'needs-testing'))

- name: Run chart-testing (install)
run: ct install --config ./default.ct.yaml
7 changes: 6 additions & 1 deletion .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint and test charts
name: Lint and test charts - current

on: pull_request

Expand Down Expand Up @@ -26,6 +26,8 @@ jobs:
# hacky workaround for lagoon-test templated values
tests=[foo,bar] envsubst '$tests' < lagoon-test/ci/linter-values.yaml.tpl > lagoon-test/ci/linter-values.yaml

# don't lint lagoon-gatekeeper
rm -rf lagoon-gatekeeper
for chart in *; do
helm dependency build $chart
mkdir -p /tmp/charts/$chart
Expand Down Expand Up @@ -86,6 +88,9 @@ jobs:

- name: Create kind cluster
uses: helm/[email protected]
with:
version: v0.14.0
node_image: kindest/node:v1.22.9@sha256:8135260b959dfe320206eb36b3aeda9cffcb262f4b44cda6b33f7bb73f453105
if: |
(steps.list-changed.outputs.changed == 'true') ||
(contains(github.event.pull_request.labels.*.name, 'needs-testing'))
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
(steps.list-changed.outputs.changed == 'true') ||
(contains(github.event.pull_request.labels.*.name, 'needs-testing'))
with:
version: v0.14.0
node_image: kindest/node:v1.22.9@sha256:8135260b959dfe320206eb36b3aeda9cffcb262f4b44cda6b33f7bb73f453105
config: test-suite.kind-config.yaml

- name: Install kubectl
Expand Down
3 changes: 2 additions & 1 deletion charts/lagoon-build-deploy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ maintainers:
- name: smlx
email: [email protected]
url: https://amazee.io
kubeVersion: ">= 1.19.0-0"

type: application

version: 0.11.3
version: 0.12.0

appVersion: v0.4.1
3 changes: 2 additions & 1 deletion charts/lagoon-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ maintainers:
- name: smlx
email: [email protected]
url: https://amazee.io
kubeVersion: ">= 1.19.0-0"

# Application charts are a collection of templates that can be packaged into
# versioned archives to be deployed.
Expand All @@ -17,7 +18,7 @@ type: application
# 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.72.0
version: 1.0.0

# This is the version number of the application being deployed. This version
# number should be incremented each time you make changes to the application.
Expand Down
10 changes: 7 additions & 3 deletions charts/lagoon-core/templates/actions-handler.hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and .Values.actionsHandler.enabled .Values.actionsHandler.autoscaling.enabled -}}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
tobybellwood marked this conversation as resolved.
Show resolved Hide resolved
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "lagoon-core.actionsHandler.fullname" . }}
Expand All @@ -17,12 +17,16 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.actionsHandler.autoscaling.targetCPUUtilizationPercentage }}
target:
averageUtilization: {{ .Values.actionsHandler.autoscaling.targetCPUUtilizationPercentage }}
type: Utilization
{{- end }}
{{- if .Values.actionsHandler.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.actionsHandler.autoscaling.targetMemoryUtilizationPercentage }}
target:
averageUtilization: {{ .Values.actionsHandler.autoscaling.targetMemoryUtilizationPercentage }}
type: Utilization
{{- end }}
{{- end }}
10 changes: 7 additions & 3 deletions charts/lagoon-core/templates/api.hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.api.autoscaling.enabled -}}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "lagoon-core.api.fullname" . }}
Expand All @@ -17,12 +17,16 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.api.autoscaling.targetCPUUtilizationPercentage }}
target:
averageUtilization: {{ .Values.api.autoscaling.targetCPUUtilizationPercentage }}
type: Utilization
{{- end }}
{{- if .Values.api.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage }}
target:
averageUtilization: {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage }}
type: Utilization
{{- end }}
{{- end }}
9 changes: 6 additions & 3 deletions charts/lagoon-core/templates/api.ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if .Values.api.ingress.enabled -}}
{{- $fullName := include "lagoon-core.api.fullname" . -}}
{{- $svcPort := .Values.api.service.port -}}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down Expand Up @@ -29,9 +29,12 @@ spec:
paths:
{{- range .paths }}
- path: {{ . }}
pathType: Prefix
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
10 changes: 7 additions & 3 deletions charts/lagoon-core/templates/auth-server.hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.authServer.autoscaling.enabled -}}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "lagoon-core.authServer.fullname" . }}
Expand All @@ -17,12 +17,16 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.authServer.autoscaling.targetCPUUtilizationPercentage }}
target:
averageUtilization: {{ .Values.authServer.autoscaling.targetCPUUtilizationPercentage }}
type: Utilization
{{- end }}
{{- if .Values.authServer.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.authServer.autoscaling.targetMemoryUtilizationPercentage }}
target:
averageUtilization: {{ .Values.authServer.autoscaling.targetMemoryUtilizationPercentage }}
type: Utilization
{{- end }}
{{- end }}
10 changes: 7 additions & 3 deletions charts/lagoon-core/templates/backup-handler.hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and .Values.backupHandler.enabled .Values.backupHandler.autoscaling.enabled -}}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "lagoon-core.backupHandler.fullname" . }}
Expand All @@ -17,12 +17,16 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.backupHandler.autoscaling.targetCPUUtilizationPercentage }}
target:
averageUtilization: {{ .Values.backupHandler.autoscaling.targetCPUUtilizationPercentage }}
type: Utilization
{{- end }}
{{- if .Values.backupHandler.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.backupHandler.autoscaling.targetMemoryUtilizationPercentage }}
target:
averageUtilization: {{ .Values.backupHandler.autoscaling.targetMemoryUtilizationPercentage }}
type: Utilization
{{- end }}
{{- end }}
9 changes: 6 additions & 3 deletions charts/lagoon-core/templates/backup-handler.ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if and .Values.backupHandler.enabled .Values.backupHandler.ingress.enabled -}}
{{- $fullName := include "lagoon-core.backupHandler.fullname" . -}}
{{- $svcPort := .Values.backupHandler.service.port -}}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down Expand Up @@ -29,9 +29,12 @@ spec:
paths:
{{- range .paths }}
- path: {{ . }}
pathType: Prefix
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
12 changes: 8 additions & 4 deletions charts/lagoon-core/templates/broker.hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.broker.autoscaling.enabled -}}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "lagoon-core.broker.fullname" . }}
Expand All @@ -8,7 +8,7 @@ metadata:
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
tobybellwood marked this conversation as resolved.
Show resolved Hide resolved
name: {{ include "lagoon-core.broker.fullname" . }}
minReplicas: {{ .Values.broker.autoscaling.minReplicas }}
maxReplicas: {{ .Values.broker.autoscaling.maxReplicas }}
Expand All @@ -17,12 +17,16 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.broker.autoscaling.targetCPUUtilizationPercentage }}
target:
averageUtilization: {{ .Values.broker.autoscaling.targetCPUUtilizationPercentage }}
type: Utilization
{{- end }}
{{- if .Values.broker.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.broker.autoscaling.targetMemoryUtilizationPercentage }}
target:
averageUtilization: {{ .Values.broker.autoscaling.targetMemoryUtilizationPercentage }}
type: Utilization
{{- end }}
{{- end }}
9 changes: 6 additions & 3 deletions charts/lagoon-core/templates/broker.ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if .Values.broker.ingress.enabled -}}
{{- $fullName := include "lagoon-core.broker.fullname" . -}}
{{- $svcPort := .Values.broker.service.ports.http -}}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down Expand Up @@ -29,9 +29,12 @@ spec:
paths:
{{- range .paths }}
- path: {{ . }}
pathType: Prefix
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
10 changes: 7 additions & 3 deletions charts/lagoon-core/templates/drush-alias.hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.drushAlias.autoscaling.enabled -}}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "lagoon-core.drushAlias.fullname" . }}
Expand All @@ -17,12 +17,16 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.drushAlias.autoscaling.targetCPUUtilizationPercentage }}
target:
averageUtilization: {{ .Values.drushAlias.autoscaling.targetCPUUtilizationPercentage }}
type: Utilization
{{- end }}
{{- if .Values.drushAlias.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.drushAlias.autoscaling.targetMemoryUtilizationPercentage }}
target:
averageUtilization: {{ .Values.drushAlias.autoscaling.targetMemoryUtilizationPercentage }}
type: Utilization
{{- end }}
{{- end }}
9 changes: 6 additions & 3 deletions charts/lagoon-core/templates/drush-alias.ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if and .Values.drushAlias.enabled .Values.drushAlias.ingress.enabled -}}
{{- $fullName := include "lagoon-core.drushAlias.fullname" . -}}
{{- $svcPort := .Values.drushAlias.service.port -}}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down Expand Up @@ -29,9 +29,12 @@ spec:
paths:
{{- range .paths }}
- path: {{ . }}
pathType: Prefix
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
Loading