mirror of
https://github.com/kubereboot/kured.git
synced 2026-03-05 10:20:29 +00:00
Merge pull request #183 from evrardjp/helm-smoke-test
Add smoke/basic functional test
This commit is contained in:
68
.github/workflows/smoke-tests.yml
vendored
Normal file
68
.github/workflows/smoke-tests.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
# This needs all the previous artifacts to be created:
|
||||
# the image should be published, the repo should be tagged, the helm
|
||||
# chart pushed. It's assumed everything is working, and we are doing
|
||||
# a last final test at the release creation time to _ensure_ we can
|
||||
# release. At this point it's still time to back off in case of problem,
|
||||
# not publish the release and iterate on tags.
|
||||
|
||||
name: Smoke test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
release:
|
||||
types: created
|
||||
|
||||
jobs:
|
||||
deploy-manifests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: "0"
|
||||
|
||||
- name: Workaround "Failed to attach 1 to compat systemd cgroup /actions_job/..." on gh actions
|
||||
run: |
|
||||
sudo bash << EOF
|
||||
cp /etc/docker/daemon.json /etc/docker/daemon.json.old
|
||||
echo '{}' > /etc/docker/daemon.json
|
||||
systemctl restart docker || journalctl --no-pager -n 500
|
||||
systemctl status docker
|
||||
EOF
|
||||
|
||||
- name: Create 5 node kind cluster
|
||||
uses: helm/kind-action@master
|
||||
with:
|
||||
config: .github/kind-cluster.yaml
|
||||
|
||||
- name: Deploy kured on default namespace with its helm chart
|
||||
run: |
|
||||
# Documented in official helm doc to live on the edge
|
||||
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
|
||||
# Refresh bins
|
||||
hash -r
|
||||
helm install kured ./charts/kured/ --set configuration.period=1m
|
||||
kubectl config set-context kind-chart-testing
|
||||
kubectl get ds --all-namespaces
|
||||
kubectl describe ds kured
|
||||
|
||||
- name: Ensure kured is ready
|
||||
uses: nick-invision/retry@v1
|
||||
with:
|
||||
timeout_minutes: 10
|
||||
max_attempts: 10
|
||||
retry_wait_seconds: 60
|
||||
# DESIRED CURRENT READY UP-TO-DATE AVAILABLE should all be = 5
|
||||
command: "kubectl get ds kured | grep -E 'kured.*5.*5.*5.*5.*5' "
|
||||
|
||||
- name: Create reboot sentinel files
|
||||
run: |
|
||||
./tests/kind/create-reboot-sentinels.sh
|
||||
|
||||
- name: Follow reboot until success
|
||||
env:
|
||||
DEBUG: true
|
||||
run: |
|
||||
./tests/kind/follow-coordinated-reboot.sh
|
||||
Reference in New Issue
Block a user