feat(grafana): add affinity to values

!1
This commit is contained in:
2023-09-23 15:30:15 +09:30
parent 83fb30b4ed
commit 0d1d0a34d8
2 changed files with 35 additions and 5 deletions

View File

@ -53,6 +53,8 @@ spec:
app.kubernetes.io/version: {{ $.Chart.Version }}
spec:
affinity:
{{- toYaml .Values.nfc_monitoring.grafana.affinity | nindent 12 }}
containers:
- name: grafana
image: "{{ .Values.nfc_monitoring.grafana.image.name }}:{{ .Values.nfc_monitoring.grafana.image.tag }}"

View File

@ -19,15 +19,43 @@ nfc_monitoring:
grafana:
image:
name: grafana/grafana
tag: '10.1.2' # '10.0.5'
namespace: grafana
replicas: 1
admin_user: admin
admin_password: admin
image:
name: grafana/grafana
tag: '10.1.2' # '10.0.5'
namespace: grafana
replicas: 1
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: node-role.kubernetes.io/worker
operator: Exists
weight: 100
- preference:
matchExpressions:
- key: node-role.kubernetes.io/storage
operator: DoesNotExist
weight: 100
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- prometheus
topologyKey: kubernetes.io/hostname
weight: 10
grafana_agent:
image: