monitoring cicd
Some checks failed
Deploy Casa services CI/CD Pipeline / deploy (push) Successful in 17s
Monitoring services CI/CD Pipeline / deploy (push) Failing after 18s

This commit is contained in:
2025-11-22 20:46:30 +00:00
parent 6205e9f566
commit 67dc4af2f6
5 changed files with 104 additions and 13 deletions

22
monitoring/README.md Normal file
View File

@@ -0,0 +1,22 @@
# monitoring
## namespace
``` bash
kubectl create namespace monitoring
```
## promtail
### setup
``` bash
# add repo
helm repo add grafana https://grafana.github.io/helm-charts
# Install & Upgrade
helm upgrade --install promtail grafana/promtail --namespace monitoring \
--values=./promtail/values.yaml \
--values=./promtail//values.local.yaml
```
## Continuous Deploy

34
monitoring/cicd-rbac.yaml Normal file
View File

@@ -0,0 +1,34 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: monitoring
name: ci-cd
rules:
- apiGroups: [""]
resources: ["pods", "services", "secrets", "configmaps", "persistentvolumeclaims", "endpoints"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
- apiGroups: ["traefik.io"]
resources: ["ingressroutes"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ci-cd
namespace: monitoring
subjects:
- kind: ServiceAccount
name: casa-ci-cd
namespace: home-assistant
roleRef:
kind: Role
name: ci-cd
apiGroup: rbac.authorization.k8s.io

View File

@@ -1,12 +0,0 @@
# Promtail
``` bash
kubectl get namespace monitoring || kubectl create namespace monitoring
# add repo
helm repo add grafana https://grafana.github.io/helm-charts
# Install & Upgrade
helm upgrade --install promtail grafana/promtail --namespace monitoring \
--values=./values.yaml \
--values=./values.local.yaml
```