monitoring cicd
This commit is contained in:
22
monitoring/README.md
Normal file
22
monitoring/README.md
Normal 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
34
monitoring/cicd-rbac.yaml
Normal 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
|
||||
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user