1
0
Fork 0
home-stack-kustomize/kustomize/bases/grafana/grafana-deployment.yaml

71 lines
1.7 KiB
YAML
Raw Normal View History

2020-05-18 18:55:58 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
2020-05-18 20:18:39 +00:00
name: grafana
2020-05-31 22:05:21 +00:00
labels:
app: grafana
2020-05-18 18:55:58 +00:00
spec:
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
containers:
- name: grafana
image: grafana/grafana
env:
- name: GF_AUTH_ANONYMOUS_ENABLED
value: "true"
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
value: Admin
- name: GF_DATABASE_TYPE
2021-08-26 16:42:10 +00:00
value: postgres
2020-05-18 18:55:58 +00:00
- name: GF_DATABASE_HOST
2020-08-11 04:37:20 +00:00
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-08-11 04:37:20 +00:00
key: host
2020-05-18 18:55:58 +00:00
- name: GF_DATABASE_NAME
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-05-18 18:55:58 +00:00
key: database
- name: GF_DATABASE_USER
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-05-18 18:55:58 +00:00
key: username
- name: GF_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-05-18 18:55:58 +00:00
key: password
ports:
- name: http
containerPort: 3000
volumeMounts:
- name: grafana-datasources
mountPath: /etc/grafana/provisioning/datasources
volumes:
- name: grafana-datasources
configMap:
name: grafana-datasources
---
apiVersion: v1
kind: Service
metadata:
name: grafana
2020-05-31 22:05:21 +00:00
labels:
app: grafana
monitor: main
2020-05-18 18:55:58 +00:00
spec:
selector:
app: grafana
ports:
- name: http
protocol: TCP
port: 3000
2020-08-02 03:40:27 +00:00
targetPort: http