1
0
Fork 0
mirror of https://gitlab.com/shouptech/flux.git synced 2026-02-03 22:19:43 +00:00
flux/workloads/grafana/grafana-deploy.yml

88 lines
2.3 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: grafana
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
containers:
- image: grafana/grafana:7.0.3
imagePullPolicy: IfNotPresent
name: grafana
env:
- name: GF_SERVER_ROOT_URL
value: https://grafana.shoup.io
- name: GF_SERVER_DOMAIN
value: grafana.shoup.io
- name: GF_DATABASE_TYPE
value: postgres
- name: GF_DATABASE_HOST
value: postgres:5432
- name: GF_DATABASE_NAME
valueFrom:
secretKeyRef:
name: postgres
key: POSTGRES_USER
- name: GF_DATABASE_USER
valueFrom:
secretKeyRef:
name: postgres
key: POSTGRES_USER
- name: GF_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: postgres
key: POSTGRES_PASSWORD
- name: GF_USERS_ALLOW_SIGN_UP
value: "false"
- name: GF_USERS_AUTO_ASSIGN_ORG
value: "true"
- name: GF_USERS_AUTO_ASSIGN_ORG_ROLE
value: Editor
- name: GF_AUTH_PROXY_ENABLED
value: "true"
- name: GF_AUTH_PROXY_HEADER_NAME
value: X-Forwarded-User
- name: GF_AUTH_PROXY_HEADER_PROPERTY
value: username
- name: GF_AUTH_PROXY_AUTO_SIGN_UP
value: "true"
- name: GF_AUTH_SIGNOUT_REDIRECT_URL
value: "https://grafana.shoup.io/oauth2/sign_out"
- name: GF_LOG_MODE
value: console
- name: GF_LOG_CONSOLE_FORMAT
value: json
resources:
requests:
memory: "128Mi"
cpu: "100m"
livenessProbe:
tcpSocket:
port: 3000
initialDelaySeconds: 600
periodSeconds: 30
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 2
ports:
- containerPort: 3000
volumeMounts:
- name: grafana-storage
mountPath: /var/lib/grafana
volumes:
- name: grafana-storage
hostPath:
path: /opt/grafana/pod
type: Directory