This commit is contained in:
Steffen Illium 2024-05-03 18:49:08 +02:00
parent 89b101a969
commit 84d7f6e2eb
6 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,53 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: grafana
name: grafana
spec:
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
securityContext:
fsGroup: 472
supplementalGroups:
- 0
containers:
- name: grafana
image: grafana/grafana:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
name: http-grafana
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /robots.txt
port: 3000
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 2
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 3000
timeoutSeconds: 1
resources: {}
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana
volumes:
- name: grafana
persistentVolumeClaim:
claimName: grafana

View File

@ -0,0 +1,14 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: grafana
spec:
entryPoints:
- websecure-local
tls: {}
routes:
- match: Host(`grafana.steffenillium.de`)
kind: Rule
services:
- name: grafana
port: http

View File

@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
resources:
- ingress.yaml
- deployment.yaml
- pvc.yaml
- service.yaml

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafana
spec:
storageClassName: "rook-cephfs"
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi

View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: grafana
spec:
ports:
- port: 3000
protocol: TCP
targetPort: http-grafana
name: http
selector:
app: grafana
sessionAffinity: None
type: ClusterIP

View File

@ -4,6 +4,7 @@ kind: Kustomization
namespace: default
resources:
- grafana
- ingress.yaml
helmCharts: