Skip to content

Commit 51864d4

Browse files
authored
Test with k8s 17, 18 and 19. Use 18.4 for eventing. (#154)
* use newer releases with bug fixes * update action to grab the latest bits too * ok, just update eventing for now * debugging crashloop and does not print reason * run k8s 17, 18 and 19 * remove debug stuff
1 parent 0bd9464 commit 51864d4

File tree

2 files changed

+35
-13
lines changed

2 files changed

+35
-13
lines changed

.github/workflows/kind-e2e.yaml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,27 @@ jobs:
1111
ko-resolve:
1212
name: e2e tests
1313
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false # Keep running if one leg fails.
16+
matrix:
17+
k8s-version:
18+
- v1.17.11
19+
- v1.18.8
20+
- v1.19.1
21+
22+
# Map between K8s and KinD versions.
23+
# This is attempting to make it a bit clearer what's being tested.
24+
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.9.0
25+
include:
26+
- k8s-version: v1.17.11
27+
kind-version: v0.9.0
28+
kind-image-sha: sha256:5240a7a2c34bf241afb54ac05669f8a46661912eab05705d660971eeb12f6555
29+
- k8s-version: v1.18.8
30+
kind-version: v0.9.0
31+
kind-image-sha: sha256:f4bcc97a0ad6e7abaf3f643d890add7efe6ee4ab90baeb374b4f41a4c95567eb
32+
- k8s-version: v1.19.1
33+
kind-version: v0.9.0
34+
kind-image-sha: sha256:98cf5288864662e37115e362b23e4369c8c4a408f99cbc06e58ac30ddc721600
1435
env:
1536
GOPATH: ${{ github.workspace }}
1637
GO111MODULE: off
@@ -38,27 +59,22 @@ jobs:
3859
run: |
3960
set -x
4061
41-
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
62+
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${{ matrix.kind-version }}/kind-$(uname)-amd64
4263
chmod +x ./kind
4364
sudo mv kind /usr/local/bin
4465
4566
- name: Create KinD Cluster
4667
working-directory: ./src/knative.dev/${{ github.event.repository.name }}
47-
env:
48-
NODE_IMAGE: 'kindest/node:v1.16.9@sha256:7175872357bc85847ec4b1aba46ed1d12fa054c83ac7a8a11f5c268957fd5765'
4968
run: |
5069
set -x
5170
5271
# KinD configuration.
5372
cat > kind.yaml <<EOF
5473
apiVersion: kind.x-k8s.io/v1alpha4
5574
kind: Cluster
56-
nodes:
57-
- role: control-plane
58-
image: ${NODE_IMAGE}
59-
- role: worker
60-
image: ${NODE_IMAGE}
6175
76+
# This is needed in order to support projected volumes with service account tokens.
77+
# See: https://kubernetes.slack.com/archives/CEKK1KTN2/p1600268272383600
6278
kubeadmConfigPatches:
6379
- |
6480
apiVersion: kubeadm.k8s.io/v1beta2
@@ -69,6 +85,12 @@ jobs:
6985
extraArgs:
7086
"service-account-issuer": "kubernetes.default.svc"
7187
"service-account-signing-key-file": "/etc/kubernetes/pki/sa.key"
88+
nodes:
89+
- role: control-plane
90+
image: kindest/node:${{ matrix.k8s-version }}@${{ matrix.kind-image-sha }}
91+
- role: worker
92+
image: kindest/node:${{ matrix.k8s-version }}@${{ matrix.kind-image-sha }}
93+
7294
EOF
7395
7496
# Create a cluster!
@@ -84,9 +106,9 @@ jobs:
84106
run: |
85107
set -x
86108
87-
kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.17.0/eventing-crds.yaml
109+
kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.18.4/eventing-crds.yaml
88110
sleep 2 # Wait for the CRDs to be reconciled.
89-
kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.17.0/eventing-core.yaml
111+
kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.18.4/eventing-core.yaml
90112
91113
- name: Install
92114
working-directory: ./src/knative.dev/${{ github.event.repository.name }}
@@ -144,7 +166,7 @@ jobs:
144166
145167
echo "===================== Pod Logs ============================="
146168
namespace=knative-eventing
147-
for pod in $(kubectl get pod -n $namespace | grep Running | awk '{print $1}'); do
169+
for pod in $(kubectl get pod -n $namespace | awk '{print $1}'); do
148170
for container in $(kubectl get pod "${pod}" -n $namespace -ojsonpath='{.spec.containers[*].name}'); do
149171
echo "Namespace, Pod, Container: ${namespace}, ${pod}, ${container}"
150172
kubectl logs -n $namespace "${pod}" -c "${container}" || true

test/kind/prerequisites.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ kubectl apply -f https://github.com/rabbitmq/cluster-operator/releases/download/
3131

3232
echo "Installing Knative Eventing"
3333

34-
kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.17.0/eventing-crds.yaml
34+
kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.18.4/eventing-crds.yaml
3535
sleep 2 # Wait for the CRDs to be reconciled.
36-
kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.17.0/eventing-core.yaml
36+
kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.18.4/eventing-core.yaml

0 commit comments

Comments
 (0)