113 lines
3.6 KiB
YAML
113 lines
3.6 KiB
YAML
---
|
|
# Source: grafana/templates/deployment.yaml
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: grafana
|
|
namespace: default
|
|
labels:
|
|
helm.sh/chart: grafana-6.48.0
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/instance: grafana
|
|
app.kubernetes.io/version: "9.3.1"
|
|
app.kubernetes.io/managed-by: Helm
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/instance: grafana
|
|
strategy:
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/instance: grafana
|
|
annotations:
|
|
checksum/config: 60be875675b2ad83279ee347d5a150559b24646f43fbc740f51b97915a0b9c31
|
|
checksum/dashboards-json-config: 703b33634d715cefba0501f04654c5d6dc28aba46888183ea3420ccdae3c8ecf
|
|
checksum/sc-dashboard-provider-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
|
|
spec:
|
|
|
|
serviceAccountName: grafana
|
|
automountServiceAccountToken: true
|
|
securityContext:
|
|
fsGroup: 472
|
|
runAsGroup: 472
|
|
runAsUser: 472
|
|
initContainers:
|
|
- name: download-dashboards
|
|
image: "curlimages/curl:7.85.0"
|
|
imagePullPolicy: IfNotPresent
|
|
command: ["/bin/sh"]
|
|
args: [ "-c", "mkdir -p /var/lib/grafana/dashboards/default && /bin/sh -x /etc/grafana/download_dashboards.sh" ]
|
|
env:
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: "/etc/grafana/download_dashboards.sh"
|
|
subPath: download_dashboards.sh
|
|
- name: storage
|
|
mountPath: "/var/lib/grafana"
|
|
enableServiceLinks: true
|
|
containers:
|
|
- name: grafana
|
|
image: "grafana/grafana:9.3.1"
|
|
imagePullPolicy: IfNotPresent
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: "/etc/grafana/grafana.ini"
|
|
subPath: grafana.ini
|
|
- name: storage
|
|
mountPath: "/var/lib/grafana"
|
|
- name: config
|
|
mountPath: "/etc/grafana/provisioning/datasources/datasources.yaml"
|
|
subPath: "datasources.yaml"
|
|
- name: config
|
|
mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml"
|
|
subPath: "dashboardproviders.yaml"
|
|
ports:
|
|
- name: grafana
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
env:
|
|
- name: GF_SECURITY_ADMIN_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: grafana-credentials
|
|
key: admin-user
|
|
- name: GF_SECURITY_ADMIN_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: grafana-credentials
|
|
key: admin-password
|
|
- name: GF_PATHS_DATA
|
|
value: /var/lib/grafana/
|
|
- name: GF_PATHS_LOGS
|
|
value: /var/log/grafana
|
|
- name: GF_PATHS_PLUGINS
|
|
value: /var/lib/grafana/plugins
|
|
- name: GF_PATHS_PROVISIONING
|
|
value: /etc/grafana/provisioning
|
|
livenessProbe:
|
|
failureThreshold: 10
|
|
httpGet:
|
|
path: /api/health
|
|
port: 3000
|
|
initialDelaySeconds: 60
|
|
timeoutSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 3000
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: grafana
|
|
- name: dashboards-default
|
|
configMap:
|
|
name: grafana-dashboards-default
|
|
- name: storage
|
|
emptyDir: {}
|