untracked changes, sorry #77
Workflow file for this run
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: Rust Operator test | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: debianmaster/actions-k3s@master | |
id: k3s | |
with: | |
version: "latest" | |
- name: Build | |
run: cargo build --bin operator | |
- name: Run tests | |
run: cargo test --bin operator | |
- name: Apply the custom resource definition and cluster role | |
run: | | |
kubectl create namespace kubetailor && \ | |
kubectl apply -f deploy/crd.yaml \ | |
-f deploy/clusterrole.yaml \ | |
-f deploy/no-role-sa.yaml | |
- name: Run the operator | |
run: cargo run --bin operator & | |
- name: Apply the custom resource after a small pause | |
run: sleep 2 && kubectl apply -f ./examples/basic-manifest.yaml | |
- name: Get pods | |
run: sleep 2 && kubectl get pods -A | |
- name: Validate that the resources has been created after a small pause | |
run: kubectl wait --for=condition=available -n kubetailor --timeout=240s deployment/tailored-app | |
- name: Get tailored apps | |
run: kubectl get tapps -n kubetailor | |
- name: Get all resources | |
run: kubectl get deploy,svc,pv,pvc,ing -n kubetailor | |
- name: Validate that the pod have been created | |
run: kubectl get pods -l owner=test -n kubetailor |