Added Grafana deployment

This commit is contained in:
2026-06-30 09:43:22 +03:00
parent 3b1998f376
commit 82ba268f62
5 changed files with 116 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: monitoring
spec:
replicas: 1
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
securityContext:
fsGroup: 472
containers:
- name: grafana
image: docker.io/grafana/grafana:latest
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 3000
env:
- name: GF_SECURITY_ADMIN_USER
valueFrom:
secretKeyRef:
name: grafana-admin-secret
key: admin-user
- name: GF_SECURITY_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: grafana-admin-secret
key: admin-password
- name: GF_SERVER_ROOT_URL
value: "https://grafana.mariushome.lt/"
- name: GF_SERVER_DOMAIN
value: "grafana.mariushome.lt"
- name: GF_USERS_ALLOW_SIGN_UP
value: "false"
volumeMounts:
- name: grafana-data
mountPath: /var/lib/grafana
- name: grafana-datasources
mountPath: /etc/grafana/provisioning/datasources
readOnly: true
volumes:
- name: grafana-data
persistentVolumeClaim:
claimName: grafana-hetzner-pvc
- name: grafana-datasources
configMap:
name: grafana-datasources