Skip to content

Scheduled Kubernetes Dashboard + Metrics Server verification #115

Scheduled Kubernetes Dashboard + Metrics Server verification

Scheduled Kubernetes Dashboard + Metrics Server verification #115

Workflow file for this run

---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2021
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
name: Scheduled Kubernetes Dashboard + Metrics Server verification
# yamllint disable-line rule:truthy
on:
schedule:
- cron: '0 0 * * 5'
workflow_dispatch:
jobs:
check-dashboard-and-metrics:
name: Check All-in-One setup in a Ubuntu Focal virtual environment
runs-on: ubuntu-20.04
env:
KRD_DEBUG: true
KRD_DASHBOARD_ENABLED: true
KRD_ANSIBLE_DEBUG: true
KRD_CONTAINER_RUNTIME: crio
steps:
- uses: actions/[email protected]
- name: Deploy services
run: KRD_FOLDER=$(git rev-parse --show-toplevel) ./aio.sh
- name: Run Dashboard test
run: |
set -o errexit
set -o pipefail
set -o xtrace
attempt_counter=0
max_attempts=5
until curl -s "http://$(ip route get 8.8.8.8 | grep "^8." | awk '{ print $7 }')" | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' | grep -q "Kubernetes Dashboard"; do
if [ ${attempt_counter} -eq ${max_attempts} ];then
echo "Max attempts reached"
exit 1
fi
attempt_counter=$((attempt_counter+1))
sleep 10
done
- if: ${{ failure() }}
run: kubectl get all -A -o wide
- name: Deploy Metrics server services
run: ./krd_command.sh -a install_metrics_server
- if: ${{ failure() }}
run: kubectl get all -A -o wide
- name: Validate top node command
run: kubectl top node
- name: Validate top node command
run: kubectl top pod
- name: Undeploy services
run: ./krd_command.sh -a uninstall_k8s