release(v0.7.7): freeze image tags #711
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: e2e-test | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
e2e-test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
node: | |
- v1.22.17 | |
- v1.23.17 | |
- v1.24.15 | |
- v1.25.11 | |
- v1.26.6 | |
- v1.27.3 | |
- v1.28.0 | |
install-mode: | |
- ha | |
- standalone | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up kubectl | |
uses: azure/[email protected] | |
with: | |
version: ${{ matrix.node }} | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Build Container Image | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ./Dockerfile | |
load: true | |
platforms: linux/amd64 | |
provenance: false | |
push: false | |
tags: ghcr.io/${{ github.repository }}:ci | |
- name: Set up KinD | |
uses: engineerd/[email protected] | |
with: | |
config: ./hack/e2e-kind-config.yaml | |
image: kindest/node:${{ matrix.node }} | |
version: "v0.20.0" | |
- name: Wait for KiND readiness | |
run: | | |
kubectl --namespace kube-system wait --for=condition=ready pod -l tier=control-plane --timeout=300s | |
kubectl get nodes -o wide | |
- name: Load image on the nodes of the KinD | |
run: | | |
kind load docker-image ghcr.io/${{ github.repository }}:ci | |
- name: Patch Install Manifests | |
run: | | |
sed -i -e 's@imagePullPolicy: Always@imagePullPolicy: IfNotPresent@g' ./deploy/${{ matrix.install-mode }}-install.yaml | |
sed -i -e 's@image: .*@image: ghcr.io/${{ github.repository }}:ci@g' ./deploy/${{ matrix.install-mode }}-install.yaml | |
- name: Deploy Application | |
id: deployment | |
run: | | |
kubectl apply -f ./deploy/${{ matrix.install-mode }}-install.yaml | |
count=0 | |
until [[ $(kubectl --namespace kubelet-serving-cert-approver get pod --selector app.kubernetes.io/name=kubelet-serving-cert-approver 2>/dev/null) ]]; do | |
count=$((count + 1)) | |
if [[ "${count}" -eq "150" ]]; then | |
echo 'Wait Timeout exceeded' >&3 | |
return 1 | |
fi | |
sleep 2 | |
done | |
kubectl --namespace kubelet-serving-cert-approver wait --for=condition=ready pod --selector app.kubernetes.io/name=kubelet-serving-cert-approver --timeout=300s | |
- name: Get deployment failure logs | |
if: ${{ failure() && steps.deployment.outputs.exit_code != 0 }} | |
run: | | |
kubectl --namespace kubelet-serving-cert-approver get events | |
kubectl --namespace kubelet-serving-cert-approver describe deployments kubelet-serving-cert-approver | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
cache: true | |
go-version: 1.21.5 | |
- name: Test Approved Certificate Signing Requests | |
run: go test -tags=e2e -v ./e2e | |
- name: Get Application logs | |
if: ${{ always() }} | |
run: | | |
kubectl --namespace kubelet-serving-cert-approver logs --selector app.kubernetes.io/name=kubelet-serving-cert-approver --prefix |