mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Add support for multiple replicas and anti affinity to grafana (#3476)
This commit is contained in:
committed by
k8s-ci-robot
parent
99247acd6b
commit
87e5bdf483
@@ -1,5 +1,5 @@
|
||||
name: grafana
|
||||
version: 0.6.2
|
||||
version: 0.7.0
|
||||
description: The leading tool for querying and visualizing time series and metrics.
|
||||
home: https://grafana.net
|
||||
icon: https://raw.githubusercontent.com/grafana/grafana/master/public/img/logo_transparent_400x.png
|
||||
|
||||
@@ -34,6 +34,8 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
| `server.image` | Container image to run | grafana/grafana:4.6.3 |
|
||||
| `server.adminUser` | Admin user username | admin |
|
||||
| `server.adminPassword` | Admin user password | Randomly generated |
|
||||
| `server.antiAffinity.enabled` | Enable anti affinity | false |
|
||||
| `server.antiAffinity.type` | Hard or soft anti affinity | hard |
|
||||
| `server.persistentVolume.enabled` | Create a volume to store data | true |
|
||||
| `server.persistentVolume.size` | Size of persistent volume claim | 1Gi RW |
|
||||
| `server.persistentVolume.storageClass` | Type of persistent volume claim | `nil` (uses alpha storage class annotation) |
|
||||
@@ -41,6 +43,7 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
| `server.persistentVolume.existingClaim` | Existing persistent volume claim | null |
|
||||
| `server.persistentVolume.subPath` | Subdirectory of pvc to mount | null |
|
||||
| `server.readinessProbe` | Server readiness probe | httpGet: {path: /api/health, port: 3000}, initialDelaySeconds: 30, timeoutSeconds: 30 |
|
||||
| `server.replicaCount` | Desired number of grafana pods | 1 |
|
||||
| `server.resources` | Server resource requests and limits | requests: {cpu: 100m, memory: 100Mi} |
|
||||
| `server.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | null |
|
||||
| `server.service.annotations` | Service annotations | null |
|
||||
|
||||
@@ -9,7 +9,7 @@ metadata:
|
||||
release: "{{ .Release.Name }}"
|
||||
name: {{ template "grafana.server.fullname" . }}
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: {{ .Values.server.replicaCount }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -29,6 +29,27 @@ spec:
|
||||
tolerations:
|
||||
{{ toYaml .Values.server.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.antiAffinity.enabled }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
{{- $antiAffinityType := default "hard" .Values.server.antiAffinity.type | lower }}
|
||||
{{- if eq $antiAffinityType "hard" }}
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "grafana.server.fullname" . }}
|
||||
{{- end }}
|
||||
{{- if eq $antiAffinityType "soft" }}
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "grafana.server.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "grafana.name" . }}
|
||||
image: "{{ .Values.server.image }}"
|
||||
|
||||
@@ -12,6 +12,14 @@ server:
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
|
||||
# Multiple replicas do not work with the default sqlite database,
|
||||
# see http://docs.grafana.org/tutorials/ha_setup/.
|
||||
replicaCount: 1
|
||||
|
||||
antiAffinity:
|
||||
enabled: false
|
||||
type: hard
|
||||
|
||||
ingress:
|
||||
## If true, Grafana Ingress will be created
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user