Skip to content

Commit

Permalink
Create grafanadeployment.yaml
Browse files Browse the repository at this point in the history
Deployment for grafana based on grafana's recommendation but using image used for normal install
  • Loading branch information
cfoos authored Sep 21, 2024
1 parent ea53d99 commit d4c8161
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions k3s/grafanadeployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: grafana
name: grafana
namespace: powerwall
spec:
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
securityContext:
fsGroup: 472
supplementalGroups:
- 0
containers:
- name: grafana
image: grafana/grafana:9.1.2-ubuntu
imagePullPolicy: Always
env:
- name: GF_INSTALL_PLUGINS
value: "grafana-piechart-panel,fetzerch-sunandmoon-datasource,vonage-status-panel,yesoreyeram-boomtable-panel,simpod-json-datasource"
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:
requests:
cpu: 250m
memory: 750Mi
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana-pv
- mountPath: /etc/grafana/provisioning/datasources
name: grafana-datasources
readOnly: false
volumes:
- name: grafana-pv
persistentVolumeClaim:
claimName: grafana-pvc
- name: grafana-datasources
configMap:
defaultMode: 420
name: grafana-datasources

0 comments on commit d4c8161

Please sign in to comment.