Skip to content

Create cluster using KinD #143

Create cluster using KinD

Create cluster using KinD #143

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.19
tags: |
ghcr.io/grafana/k6-operator:${{ github.sha }}
kind-kustomize:
needs: ["docker"]
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.20.0"
image: "kindest/node:v1.27.1"
- name: Testing
run: |
kubectl cluster-info
kubectl cluster-info dump | grep 'nodeInfo' -A 11
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 -n k6-operator-system describe deployment k6-operator-controller-manager
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
kind-helm:
needs: ["docker"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2
- name: Create kind cluster
uses: helm/[email protected]
with:
version: 1.27.1
- name: Testing
run: |
helm install k6-operator ./charts/ -f ./charts/values.yaml --set manager.image.tag=${{github.sha}}
kubectl cluster-info dump | grep 'nodeInfo' -A 11
kubectl -n k6-operator-system describe deployment k6-operator-controller-manager
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-1
kubectl delete configmap crocodile-stress-test
kubectl delete -f e2e/test.yaml