mirror of
https://gitlab.com/shouptech/flux.git
synced 2026-02-03 19:39:43 +00:00
Add grafana
This commit is contained in:
parent
f57803dc8e
commit
0acf00db6b
1 changed files with 64 additions and 0 deletions
64
workloads/grafana/grafana-deploy.yml
Normal file
64
workloads/grafana/grafana-deploy.yml
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
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:6.6.2
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: grafana
|
||||
env:
|
||||
- name: GRAFANA_DATABASE_TYPE
|
||||
value: postgres
|
||||
- name: GRAFANA_DATABASE_HOST
|
||||
value: postgres
|
||||
- name: GRAFANA_DATABASE_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres:5432
|
||||
key: POSTGRES_USER
|
||||
- name: GRAFANA_DATABASE_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres
|
||||
key: POSTGRES_USER
|
||||
- name: GRAFANA_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres
|
||||
key: POSTGRES_PASSWORD
|
||||
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
|
||||
Loading…
Add table
Reference in a new issue