deploy/grafana.yaml

85 lines
1.5 KiB
YAML
Raw Normal View History

2020-05-29 19:20:08 +02:00
apiVersion: v1
kind: Service
metadata:
name: grafana
namespace: birbnetes
spec:
type: NodePort
ports:
- name: grafana
port: 3000
targetPort: 3000
nodePort: 30070
protocol: TCP
selector:
app: grafana
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: grafana-nfs-pv
namespace: birbnetes
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Recycle
nfs:
server: 192.168.100.1
path: /srv/kubedata/birbnetes/grafana
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafana-nfs-pvc
namespace: birbnetes
spec:
accessModes:
2020-06-20 19:30:55 +02:00
- ReadWriteMany
2020-05-29 19:20:08 +02:00
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana
labels:
app: grafana
namespace: birbnetes
data:
2020-06-20 19:30:55 +02:00
GF_SERVER_ROOT_URL: "https://luna.sch.bme.hu:30070/"
---
2020-05-29 19:20:08 +02:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: birbnetes
spec:
selector:
matchLabels:
app: grafana
strategy:
type: Recreate
template:
metadata:
labels:
app: grafana
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: grafana-nfs-pvc
containers:
- name: grafana
volumeMounts:
- name: data
mountPath: "/var/lib/grafana"
image: grafana/grafana
envFrom:
- configMapRef:
name: grafana
ports:
- containerPort: 3000