netflux-kubernetes/deploy/base/inflated/grafana/templates/deployment.yaml

145 lines
4.7 KiB
YAML
Raw Permalink Normal View History

2022-05-11 01:10:37 +00:00
---
# Source: grafana/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: default
labels:
2024-04-18 06:00:10 +00:00
helm.sh/chart: grafana-7.3.8
2022-05-11 01:10:37 +00:00
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: grafana
2024-04-18 06:00:10 +00:00
app.kubernetes.io/version: "10.4.1"
2022-05-11 01:10:37 +00:00
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:
2024-04-18 06:00:10 +00:00
checksum/config: d247383d611034ff04b37cc27677f166bc48f1eb6f5bb108696cb8a488b1c954
checksum/dashboards-json-config: 6cafd198a0669840a2973e251c2a9a6dade8318043557e28a0c85c0de28e3b46
checksum/sc-dashboard-provider-config: 593c0a8778b83f11fe80ccb21dfb20bc46705e2be3178df1dc4c89d164c8cd9c
2023-07-16 06:31:39 +00:00
kubectl.kubernetes.io/default-container: grafana
2022-05-11 01:10:37 +00:00
spec:
serviceAccountName: grafana
automountServiceAccountToken: true
securityContext:
fsGroup: 472
runAsGroup: 472
2023-07-16 06:31:39 +00:00
runAsNonRoot: true
2022-05-11 01:10:37 +00:00
runAsUser: 472
initContainers:
- name: download-dashboards
2023-07-16 06:31:39 +00:00
image: "docker.io/curlimages/curl:7.85.0"
2022-05-11 01:10:37 +00:00
imagePullPolicy: IfNotPresent
command: ["/bin/sh"]
args: [ "-c", "mkdir -p /var/lib/grafana/dashboards/default && /bin/sh -x /etc/grafana/download_dashboards.sh" ]
env:
2023-07-16 06:31:39 +00:00
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
2022-05-11 01:10:37 +00:00
volumeMounts:
- name: config
mountPath: "/etc/grafana/download_dashboards.sh"
subPath: download_dashboards.sh
- name: storage
mountPath: "/var/lib/grafana"
enableServiceLinks: true
containers:
- name: grafana
2024-04-18 06:00:10 +00:00
image: "docker.io/grafana/grafana:10.4.1"
2022-05-11 01:10:37 +00:00
imagePullPolicy: IfNotPresent
2023-07-16 06:31:39 +00:00
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
2022-05-11 01:10:37 +00:00
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/alerting/contactpoints.yaml"
subPath: "contactpoints.yaml"
- name: config
mountPath: "/etc/grafana/provisioning/alerting/rules.yaml"
subPath: "rules.yaml"
2022-05-11 01:10:37 +00:00
- name: config
mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml"
subPath: "dashboardproviders.yaml"
ports:
- name: grafana
containerPort: 3000
protocol: TCP
2023-07-16 06:31:39 +00:00
- name: gossip-tcp
containerPort: 9094
protocol: TCP
- name: gossip-udp
containerPort: 9094
protocol: UDP
2022-05-11 01:10:37 +00:00
env:
2023-07-16 06:31:39 +00:00
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
2022-05-11 01:10:37 +00:00
- 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: {}