Skip to content

Commit d24f21a

Browse files
committed
chore: Improved kind testing
1 parent c766a19 commit d24f21a

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

.github/workflows/workflow.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ jobs:
1111
chart:
1212
name: 'Build and Test Helm Chart'
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
k8s_version:
17+
- 1.23.13
18+
- 1.24.7
19+
- 1.25.3
1420

1521
steps:
1622
- uses: actions/checkout@v4
@@ -51,6 +57,11 @@ jobs:
5157
- name: Create kind cluster
5258
if: steps.list-changed.outputs.changed == 'true'
5359
uses: helm/[email protected]
60+
with:
61+
version: v0.17.0
62+
node_image: kindest/node:v${{ matrix.k8s_version }}
63+
cluster_name: kind-cluster-${{ matrix.k8s_version }}
64+
config: test/integration/kind-cluster.yaml
5465

5566
- name: Run chart-testing (install)
5667
if: steps.list-changed.outputs.changed == 'true'

chart/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This is a YAML-formatted file.
33
# Declare variables to be passed into your templates.
44
global:
5-
storageClass:
5+
storageClass: ""
66
accessMode: ReadWriteOnce
77
replicaCount: 2
88
# -- Update policy

test/integration/kind-cluster.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
kubeadmConfigPatches:
6+
- |
7+
kind: InitConfiguration
8+
nodeRegistration:
9+
kubeletExtraArgs:
10+
node-labels: "ingress-ready=true"
11+
extraPortMappings:
12+
- containerPort: 80
13+
hostPort: 80
14+
protocol: TCP
15+
- containerPort: 443
16+
hostPort: 443
17+
protocol: TCP
18+
- containerPort: 30003
19+
hostPort: 30003
20+
protocol: TCP

0 commit comments

Comments
 (0)