Skip to content

Create cluster using KinD #126

Create cluster using KinD

Create cluster using KinD #126

Workflow file for this run

---
name: "Create cluster using KinD"
on:
workflow_dispatch: {}
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: "Build:checkout"
uses: actions/checkout@v2
- name: "Build:buildx"
uses: docker/setup-buildx-action@v1
with:
version: v0.9.1 # Buildx version
- name: "Build:login"
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build:dockerimage"
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile.controller
push: true
build-args: |
GO_BUILDER_IMG=golang:1.18
tags: |
ghcr.io/grafana/k6-operator:${{ github.sha }}
kind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: "Kustomize Build"
uses: karancode/kustomize-github-action@master
with:
kustomize_version: "3.0.0"
kustomize_build_dir: "config/default"
kustomize_output_file: "rendered.yaml"
kustomize_build_options: "--load_restrictor none"
- uses: engineerd/[email protected]
with:
version: "v0.11.1"
- name: Testing
run: |
kubectl cluster-info
kubectl apply -f rendered.yaml
kubectl -n k6-operator-system set image deployment/k6-operator-controller-manager manager=ghcr.io/grafana/k6-operator:${{ github.sha }}
kubectl create configmap crocodile-stress-test --from-file e2e/test.js
kubectl apply -f e2e/test.yaml
sleep 30
kubectl get namespaces
kubectl get jobs -A
kubectl wait --for=condition=complete --timeout=180s job/k6-sample-initializer
kubectl delete configmap crocodile-stress-test
kubectl delete -f e2e/test.yaml