-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmonitor-grafana-deployment.yaml
More file actions
60 lines (60 loc) · 2.35 KB
/
monitor-grafana-deployment.yaml
File metadata and controls
60 lines (60 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{{- if eq .Values.global.grafanaLocation "on-cluster" }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: drycc-monitor-grafana
labels:
heritage: drycc
annotations:
component.drycc.cc/version: {{ .Values.grafana.imageTag }}
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app: drycc-monitor-grafana
template:
metadata:
labels: {{- include "common.labels.standard" . | nindent 8 }}
app: drycc-monitor-grafana
spec:
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.grafana.podAffinityPreset.type "component" "" "extraMatchLabels" .Values.grafana.podAffinityPreset.extraMatchLabels "topologyKey" "" "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.grafana.podAntiAffinityPreset.type "component" "" "extraMatchLabels" .Values.grafana.podAntiAffinityPreset.extraMatchLabels "topologyKey" "" "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.grafana.nodeAffinityPreset.type "key" .Values.grafana.nodeAffinityPreset.key "values" .Values.grafana.nodeAffinityPreset.values ) | nindent 10 }}
securityContext:
fsGroup: 1001
runAsGroup: 1001
runAsUser: 1001
containers:
- name: drycc-monitor-grafana
image: {{.Values.grafana.imageRegistry}}/{{.Values.grafana.imageOrg}}/grafana:{{.Values.grafana.imageTag}}
imagePullPolicy: {{.Values.grafana.imagePullPolicy}}
{{- if or (.Values.grafana.limitsCpu) (.Values.grafana.limitsMemory)}}
resources:
limits:
{{- if (.Values.grafana.limitsCpu) }}
cpu: {{.Values.grafana.limitsCpu}}
{{- end}}
{{- if (.Values.grafana.limitsMemory) }}
memory: {{.Values.grafana.limitsMemory}}
{{- end}}
{{- end}}
ports:
- containerPort: 3000
name: ui
{{- include "grafana.envs" . | indent 8 }}
{{- if .Values.grafana.persistence.enabled }}
volumeMounts:
- name: grafana-data
mountPath: /var/lib/grafana
volumes:
- name: grafana-data
persistentVolumeClaim:
claimName: drycc-monitor-grafana
{{- end }}
{{- end }}