Files
casa/.gitea/workflows/monitoring-deploy.yaml
Márcio Fernandes 2e2bfe96bf
All checks were successful
Monitoring services CI/CD Pipeline / deploy (push) Successful in 21s
disable telegraf cd
2025-11-22 22:05:04 +00:00

70 lines
2.3 KiB
YAML

name: Monitoring services CI/CD Pipeline
on:
push:
branches:
- fix/*
- main
- master
paths:
- 'monitoring/**'
- '.gitea/workflows/monitoring**'
pull_request:
paths:
- 'monitoring/**'
- '.gitea/workflows/monitoring**'
schedule:
- cron: '0 12 * * 0' # every sunday 12 am
jobs:
deploy:
runs-on: casa-vlan-cicd
env:
GITHUB_TEMP: ${{ runner.temp }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Fetch limbo public actions
env:
RUNNER_TEMP: "${{ runner.temp }}"
WORKSPACE: "${{ gitea.workspace }}"
run: |
curl -fsSL https://git.limbosolutions.com/kb/gitea/raw/branch/main/cloud-scripts/setup-limbo-actions.sh | bash 2>&1
- name: Setup kubectl
uses: ./.gitea/limbo_actions/kubectl-setup
with:
kube_server: ${{ secrets.CASA_VLAN_KUBE_SERVER }}
kube_ca_base64: ${{ secrets.CASA_VLAN_KUBE_CA_BASE64 }}
kube_token: ${{ secrets.CASA_VLAN_KUBE_TOKEN }}
# secrets.LOKI_URL = https://<LOKISERVER>/loki/api/v1/push
- name: Deploy promtail
shell: bash
env:
LOKI_URL: "${{ secrets.LOKI_URL }}"
run: |
# add repo
helm repo add grafana https://grafana.github.io/helm-charts
# Install & Upgrade
helm upgrade --install promtail grafana/promtail --namespace monitoring \
--values=./monitoring/promtail/values.yaml --set config.clients[0].url=${LOKI_URL}
# - name: Deploy Telegraf
# shell: bash
# run: |
# # add repo
# helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
# # Install & Upgrade
# helm upgrade --install prometheus-stack prometheus-community/kube-prometheus-stack \
# --namespace monitoring \
# --values=./monitoring/prometheus/deploy/helm/01-only-crd-and-operator.yaml \
# --values=./monitoring/prometheus/deploy//helm/02-kube-metrics.yaml \
# --values=./monitoring/prometheus/deploy/helm/03-node-exporter.yaml \
# --values=./monitoring/prometheus/deploy/helm/04-kubelet.yaml
# kubectl apply -f ./monitoring/prometheus/deploy/prometheus-agent.yaml