mirror of
https://github.com/kerberos-io/helm-charts.git
synced 2026-08-23 15:18:33 +00:00
53 lines
2.2 KiB
YAML
53 lines
2.2 KiB
YAML
name: Deploy on microk8s
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
jobs:
|
|
deploy:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-22.04, ubuntu-24.04]
|
|
microk8s: [1.32/stable]
|
|
steps:
|
|
- uses: balchua/microk8s-actions@v0.4.3
|
|
with:
|
|
channel: ${{ matrix.microk8s }}
|
|
addons: '["dns", "dashboard", "hostpath-storage", "nvidia"]'
|
|
- name: Set permissions
|
|
run: |
|
|
sudo chown -f -R $USER $HOME/.kube $HOME/.config
|
|
- name: Test microk8s
|
|
id: list-pods
|
|
run: |
|
|
kubectl get no
|
|
kubectl get pods -A -o wide
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Install Prometheus operator
|
|
id: install-prometheus-operator
|
|
run: |
|
|
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.48.1/bundle.yaml
|
|
kubectl wait --for=condition=available deployment/prometheus-operator -n default --timeout=300s
|
|
kubectl get crd
|
|
kubectl get po -A -o wide
|
|
- name: Install Hub Helm chart
|
|
id: install-hub
|
|
run: |
|
|
helm repo add kerberos https://charts.kerberos.io
|
|
kubectl create namespace kerberos-hub
|
|
helm install hub ./charts/hub --values charts/hub/values.yaml -n kerberos-hub --create-namespace
|
|
kubectl get pods -A -o wide
|
|
- name: Send Slack Notification on Success
|
|
if: success()
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
run: |
|
|
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"✅ MicroK8s deployment successful on ${{ matrix.os }} (${{ matrix.microk8s }}) - triggered by ${{ github.actor }}\"}" $SLACK_WEBHOOK_URL
|
|
- name: Send Slack Notification on Failure
|
|
if: failure()
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
run: |
|
|
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"❌ MicroK8s deployment failed on ${{ matrix.os }} (${{ matrix.microk8s }}) - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>\"}" $SLACK_WEBHOOK_URL
|
|
|