mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-22 03:25:53 +10:00
Merge pull request #1617 from juan131/grafana-lint
[bitnami/grafana] Lint chart
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
apiVersion: v1
|
||||
name: grafana
|
||||
version: 1.1.2
|
||||
version: 1.1.3
|
||||
appVersion: 6.4.4
|
||||
description: Grafana is an open source, feature rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB.
|
||||
keywords:
|
||||
- analitics
|
||||
- monitoring
|
||||
- metrics
|
||||
- logs
|
||||
- analitics
|
||||
- monitoring
|
||||
- metrics
|
||||
- logs
|
||||
home: https://grafana.com/
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-grafana
|
||||
- https://github.com/bitnami/bitnami-docker-grafana
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
icon: https://bitnami.com/assets/stacks/grafana/img/grafana-stack-220x234.png
|
||||
|
||||
@@ -49,8 +49,8 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
|
||||
The following tables lists the configurable parameters of the grafana chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|----------------------------------------|--------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
|
||||
| Parameter | Description | Default |
|
||||
| -------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.registry` | Grafana image registry | `docker.io` |
|
||||
@@ -73,8 +73,8 @@ The following tables lists the configurable parameters of the grafana chart and
|
||||
| `ldap.enabled` | Enable LDAP for Grafana | `false` |
|
||||
| `ldap.allowSignUp` | Allows LDAP sign up for Grafana | `false` |
|
||||
| `ldap.configMapName` | Name of the ConfigMap with the LDAP configuration file for Grafana | `nil` |
|
||||
| `extraEnvVars` | Array containing extra env vars to configure Grafana | `nil` |
|
||||
| `extraConfigmaps` | Array to mount extra ConfigMaps to configure Grafana | `nil` |
|
||||
| `extraEnvVars` | Array containing extra env vars to configure Grafana | `{}` |
|
||||
| `extraConfigmaps` | Array to mount extra ConfigMaps to configure Grafana | `{}` |
|
||||
| `config.useGrafanaIniFile` | Allows to load a `grafana.ini` file | `false` |
|
||||
| `config.grafanaIniConfigMap` | Name of the ConfigMap containing the `grafana.ini` file | `nil` |
|
||||
| `config.useCustomIniFile` | Allows to load a `custom.ini` file | `false` |
|
||||
@@ -159,13 +159,20 @@ Bitnami will release a new chart updating its containers if a new version of the
|
||||
|
||||
This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one.
|
||||
|
||||
- Enable ingress controller
|
||||
- Enable ingress controller:
|
||||
|
||||
```diff
|
||||
- ingress.enabled: false
|
||||
+ ingress.enabled: true
|
||||
```
|
||||
|
||||
- Enable exposing Prometheus metrics:
|
||||
|
||||
```diff
|
||||
- metrics.enabled: false
|
||||
+ metrics.enabled: true
|
||||
```
|
||||
|
||||
### Using custom configuration
|
||||
|
||||
Grafana support multiples configuration files. Using kubernetes you can mount a file using a ConfigMap. For example, to mount a custom `grafana.ini` file or `custom.ini` file you can create a ConfigMap like the following:
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
{{- range .paths }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.name }}{{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
|
||||
@@ -161,3 +161,16 @@ WARNING: Using more than one replica requires using an external database to shar
|
||||
Please, ensure you provide a configuration file configuring the external database to share data between replicas.
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "grafana.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "grafana.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "grafana.fullname" . }}-envvars
|
||||
labels: {{ include "grafana.labels" . | nindent 4 }}
|
||||
labels: {{- include "grafana.labels" . | nindent 4 }}
|
||||
data:
|
||||
GF_SECURITY_ADMIN_USER: {{ .Values.admin.user | quote }}
|
||||
{{- if .Values.plugins }}
|
||||
@@ -16,4 +16,3 @@ data:
|
||||
GF_PATHS_CONFIG: "/opt/bitnami/grafana/conf/grafana.ini"
|
||||
GF_PATHS_DATA: "/opt/bitnami/grafana/data"
|
||||
GF_PATHS_LOGS: "/opt/bitnami/grafana/logs"
|
||||
GF_PATHS_PLUGINS: "/opt/bitnami/grafana/data/plugins"
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "grafana.fullname" . }}-provider
|
||||
labels: {{ include "grafana.labels" . | nindent 4 }}
|
||||
labels: {{- include "grafana.labels" . | nindent 4 }}
|
||||
data:
|
||||
default-provider.yaml: |-
|
||||
apiVersion: 1
|
||||
|
||||
@@ -2,17 +2,17 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "grafana.fullname" . }}
|
||||
labels: {{ include "grafana.labels" . | nindent 4 }}
|
||||
labels: {{- include "grafana.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels: {{ include "grafana.matchLabels" . | nindent 6 }}
|
||||
matchLabels: {{- include "grafana.matchLabels" . | nindent 6 }}
|
||||
{{- if .Values.updateStrategy }}
|
||||
strategy: {{ toYaml .Values.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels: {{ include "grafana.labels" . | nindent 8 }}
|
||||
labels: {{- include "grafana.labels" . | nindent 8 }}
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
checksum/dashboard-provider: {{ include (print $.Template.BasePath "/dashboard-provider.yaml") . | sha256sum }}
|
||||
@@ -20,158 +20,158 @@ spec:
|
||||
{{ toYaml .Values.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "grafana.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: {{ .Values.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- include "grafana.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity: {{- include "grafana.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector: {{- include "grafana.tplValue" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "grafana.tplValue" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- tpl (toYaml .) $ | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- tpl (toYaml .) $ | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- tpl (toYaml .) $ | indent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: {{ template "grafana.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "grafana.fullname" . }}-envvars
|
||||
- secretRef:
|
||||
name: {{ include "grafana.fullname" . }}-secret
|
||||
{{- if .Values.smtp.existingSecret }}
|
||||
- name: GF_SMTP_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.smtp.existingSecret }}
|
||||
key: {{ .Values.smtp.existingSecretUserKey }}
|
||||
- name: GF_SMTP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.smtp.existingSecret }}
|
||||
key: {{ .Values.smtp.existingSecretPasswordKey }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{ toYaml .Values.extraEnvVars | indent 8 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.config.useGrafanaIniFile }}
|
||||
- name: grafana-ini
|
||||
mountPath: /opt/bitnami/grafana/conf/grafana.ini
|
||||
subPath: grafana.ini
|
||||
{{- end }}
|
||||
{{- if .Values.config.useCustomIniFile }}
|
||||
- name: custom-ini
|
||||
mountPath: /opt/bitnami/grafana/conf/custom.ini
|
||||
subPath: custom.ini
|
||||
{{- end }}
|
||||
- name: {{ .Chart.Name }}
|
||||
image: {{ template "grafana.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "grafana.fullname" . }}-envvars
|
||||
- secretRef:
|
||||
name: {{ include "grafana.fullname" . }}-secret
|
||||
env:
|
||||
{{- if .Values.smtp.existingSecret }}
|
||||
- name: GF_SMTP_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.smtp.existingSecret }}
|
||||
key: {{ .Values.smtp.existingSecretUserKey }}
|
||||
- name: GF_SMTP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.smtp.existingSecret }}
|
||||
key: {{ .Values.smtp.existingSecretPasswordKey }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- toYaml .Values.extraEnvVars | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.config.useGrafanaIniFile }}
|
||||
- name: grafana-ini
|
||||
mountPath: /opt/bitnami/grafana/conf/grafana.ini
|
||||
subPath: grafana.ini
|
||||
{{- end }}
|
||||
{{- if .Values.config.useCustomIniFile }}
|
||||
- name: custom-ini
|
||||
mountPath: /opt/bitnami/grafana/conf/custom.ini
|
||||
subPath: custom.ini
|
||||
{{- end }}
|
||||
- name: data
|
||||
mountPath: /opt/bitnami/grafana/data
|
||||
{{- if .Values.dashboardsProvider.enabled }}
|
||||
- name: dashboards-provider
|
||||
mountPath: /opt/bitnami/grafana/conf/provisioning/dashboards
|
||||
{{- end }}
|
||||
{{- range .Values.dashboardsConfigMaps }}
|
||||
- name: {{ .configMapName }}
|
||||
mountPath: /opt/bitnami/grafana/dashboards/{{ .fileName }}
|
||||
subPath: {{ .fileName }}
|
||||
{{- end }}
|
||||
{{- if .Values.datasources.secretName }}
|
||||
- name: datasources
|
||||
mountPath: /opt/bitnami/grafana/conf/provisioning/datasources
|
||||
{{- end }}
|
||||
{{- if and .Values.ldap.enabled .Values.ldap.configMapName }}
|
||||
- name: ldap
|
||||
mountPath: /opt/bitnami/grafana/conf/ldap.toml
|
||||
subPath: ldap.toml
|
||||
{{- end }}
|
||||
{{- range .Values.extraConfigmaps }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .mountPath }}
|
||||
subPath: {{ .subPath | default "" }}
|
||||
readOnly: {{ .readOnly }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: dashboard
|
||||
containerPort: 3000
|
||||
protocol: TCP
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: dashboard
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: dashboard
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.resources }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: data
|
||||
mountPath: /opt/bitnami/grafana/data
|
||||
{{- if .Values.dashboardsProvider.enabled }}
|
||||
- name: dashboards-provider
|
||||
mountPath: /opt/bitnami/grafana/conf/provisioning/dashboards
|
||||
{{- end }}
|
||||
{{- range .Values.dashboardsConfigMaps }}
|
||||
- name: {{ .configMapName }}
|
||||
mountPath: /opt/bitnami/grafana/dashboards/{{ .fileName }}
|
||||
subPath: {{ .fileName }}
|
||||
{{- end }}
|
||||
{{- if .Values.datasources.secretName }}
|
||||
- name: datasources
|
||||
mountPath: /opt/bitnami/grafana/conf/provisioning/datasources
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.existingClaim | default (include "grafana.fullname" .) }}
|
||||
{{- end }}
|
||||
{{- if and .Values.ldap.enabled .Values.ldap.configMapName }}
|
||||
- name: ldap
|
||||
mountPath: /opt/bitnami/grafana/conf/ldap.toml
|
||||
subPath: ldap.toml
|
||||
configMap:
|
||||
name: {{ .Values.ldap.configMapName }}
|
||||
{{- end }}
|
||||
{{- if .Values.dashboardsProvider.enabled }}
|
||||
- name: dashboards-provider
|
||||
configMap:
|
||||
{{- if .Values.dashboardsProvider.configMapName }}
|
||||
name: {{ .Values.dashboardsProvider.configMapName }}
|
||||
{{- else }}
|
||||
name: {{ include "grafana.fullname" . }}-provider
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range .Values.dashboardsConfigMaps }}
|
||||
- name: {{ .configMapName }}
|
||||
configMap:
|
||||
name: {{ .configMapName }}
|
||||
{{- end }}
|
||||
{{- if .Values.datasources.secretName }}
|
||||
- name: datasources
|
||||
secret:
|
||||
secretName: {{ .Values.datasources.secretName }}
|
||||
{{- end }}
|
||||
{{- if .Values.config.useGrafanaIniFile }}
|
||||
- name: grafana-ini
|
||||
configMap:
|
||||
name: {{ required "A configmap containing the grafana.ini file is needed!!" .Values.config.grafanaIniConfigMap }}
|
||||
{{- end }}
|
||||
{{- if .Values.config.useCustomIniFile }}
|
||||
- name: custom-ini
|
||||
configMap:
|
||||
name: {{ required "A configmap containing the custom.ini file is needed!!" .Values.config.customIniConfigMap }}
|
||||
{{- end }}
|
||||
{{- range .Values.extraConfigmaps }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .mountPath }}
|
||||
subPath: {{ .subPath | default "" }}
|
||||
readOnly: {{ .readOnly }}
|
||||
configMap:
|
||||
name: {{ .name }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: dashboard
|
||||
containerPort: 3000
|
||||
protocol: TCP
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: dashboard
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: dashboard
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
resources: {{- toYaml .Values.resources | nindent 10 }}
|
||||
volumes:
|
||||
- name: data
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.existingClaim | default (include "grafana.fullname" .) }}
|
||||
{{- end }}
|
||||
{{- if and .Values.ldap.enabled .Values.ldap.configMapName }}
|
||||
- name: ldap
|
||||
configMap:
|
||||
name: {{ .Values.ldap.configMapName }}
|
||||
{{- end }}
|
||||
{{- if .Values.dashboardsProvider.enabled }}
|
||||
- name: dashboards-provider
|
||||
configMap:
|
||||
{{- if .Values.dashboardsProvider.configMapName }}
|
||||
name: {{ .Values.dashboardsProvider.configMapName }}
|
||||
{{- else }}
|
||||
name: {{ include "grafana.fullname" . }}-provider
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range .Values.dashboardsConfigMaps }}
|
||||
- name: {{ .configMapName }}
|
||||
configMap:
|
||||
name: {{ .configMapName }}
|
||||
{{- end }}
|
||||
{{- if .Values.datasources.secretName }}
|
||||
- name: datasources
|
||||
secret:
|
||||
secretName: {{ .Values.datasources.secretName }}
|
||||
{{- end }}
|
||||
{{- if .Values.config.useGrafanaIniFile }}
|
||||
- name: grafana-ini
|
||||
configMap:
|
||||
name: {{ required "A configmap containing the grafana.ini file is needed!!" .Values.config.grafanaIniConfigMap }}
|
||||
{{- end }}
|
||||
{{- if .Values.config.useCustomIniFile }}
|
||||
- name: custom-ini
|
||||
configMap:
|
||||
name: {{ required "A configmap containing the custom.ini file is needed!!" .Values.config.customIniConfigMap }}
|
||||
{{- end }}
|
||||
{{- range .Values.extraConfigmaps }}
|
||||
- name: {{ .name }}
|
||||
configMap:
|
||||
name: {{ .name }}
|
||||
{{- end }}
|
||||
|
||||
@@ -3,14 +3,14 @@ apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "grafana.fullname" . }}
|
||||
labels: {{ include "grafana.labels" . | nindent 4 }}
|
||||
labels: {{- include "grafana.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- if .Values.ingress.certManager }}
|
||||
{{- if .Values.ingress.certManager }}
|
||||
kubernetes.io/tls-acme: "true"
|
||||
{{- end }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
{{- end }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
|
||||
@@ -3,7 +3,7 @@ kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "grafana.fullname" . }}
|
||||
labels: {{ include "grafana.labels" . | nindent 4 }}
|
||||
labels: {{- include "grafana.labels" . | nindent 4 }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode | quote }}
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "grafana.fullname" . }}-secret
|
||||
labels: {{ include "grafana.labels" . | nindent 4 }}
|
||||
labels: {{- include "grafana.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if .Values.admin.password }}
|
||||
|
||||
@@ -2,19 +2,19 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "grafana.fullname" . }}
|
||||
labels: {{ include "grafana.labels" . | nindent 4 }}
|
||||
{{- if or (and .Values.metrics.enabled .Values.metrics.service.annotations) .Values.service.annotations }}
|
||||
labels: {{- include "grafana.labels" . | nindent 4 }}
|
||||
{{- if or (and .Values.metrics.enabled .Values.metrics.service.annotations) .Values.service.annotations }}
|
||||
annotations:
|
||||
{{- if and .Values.metrics.enabled .Values.metrics.service.annotations }}
|
||||
{{- toYaml .Values.metrics.service.annotations | nindent 4 }}
|
||||
{{- include "grafana.tplValue" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.annotations }}
|
||||
{{ toYaml .Values.service.annotations | nindent 4 }}
|
||||
{{- include "grafana.tplValue" (dict "value" .Values.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and .Values.service.loadBalancerIP (eq .Values.service.type "LoadBalancer") }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
@@ -22,7 +22,9 @@ spec:
|
||||
targetPort: dashboard
|
||||
protocol: TCP
|
||||
name: http
|
||||
{{- if .Values.service.nodePort }}
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort)) }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
selector: {{ include "grafana.matchLabels" . | nindent 4 }}
|
||||
selector: {{- include "grafana.matchLabels" . | nindent 4 }}
|
||||
|
||||
@@ -6,7 +6,7 @@ metadata:
|
||||
{{- if .Values.metrics.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
labels: {{ include "grafana.labels" . | nindent 4 }}
|
||||
labels: {{- include "grafana.labels" . | nindent 4 }}
|
||||
{{- range $key, $value := .Values.metrics.serviceMonitor.selector }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
@@ -14,15 +14,15 @@ spec:
|
||||
selector:
|
||||
matchLabels: {{ include "grafana.matchLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- port: http
|
||||
path: "/metrics"
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
- port: http
|
||||
path: "/metrics"
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
- {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/grafana
|
||||
tag: 6.4.4-debian-9-r0
|
||||
tag: 6.4.4-debian-9-r8
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -97,7 +97,7 @@ ldap:
|
||||
## - name: GF_DEFAULT_INSTANCE_NAME
|
||||
## value: my-instance
|
||||
##
|
||||
# extraEnvVars:
|
||||
extraEnvVars: {}
|
||||
|
||||
## An array to add extra configmaps:
|
||||
## For example:
|
||||
@@ -106,6 +106,8 @@ ldap:
|
||||
## mountPath: /opt/bitnami/desired-path
|
||||
## subPath: file-name.extension (optional)
|
||||
## readOnly: true
|
||||
##
|
||||
extraConfigmaps: {}
|
||||
|
||||
## Parameters to override the default grafana.ini and custom.ini files.
|
||||
## It is needed to create a configmap containing the grafana.ini and custom.ini files.
|
||||
@@ -164,8 +166,8 @@ persistence:
|
||||
accessMode: ReadWriteOnce
|
||||
size: 10Gi
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
## Grafana containers' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
@@ -182,27 +184,29 @@ readinessProbe:
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
## Service configuration
|
||||
## Service parameters
|
||||
##
|
||||
service:
|
||||
port: 3000
|
||||
## K8s service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Grafana service port
|
||||
##
|
||||
port: 3000
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## loadBalancerIP for the PrestaShop Service (optional, cloud specific)
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## loadBalancerIP for the PrestaShop Service (optional, cloud specific)
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Configure the ingress resource that allows you to access the
|
||||
## Grafana web. Set up the URL
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
@@ -250,15 +254,23 @@ securityContext:
|
||||
fsGroup: 1001
|
||||
runAsNonRoot: true
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Grafana containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
## Example:
|
||||
## resources:
|
||||
## requests:
|
||||
## memory: 512Mi
|
||||
## cpu: 300m
|
||||
## Minimum memory for development is 4GB and 2 CPU cores
|
||||
## Minimum memory for production is 8GB and 4 CPU cores
|
||||
## ref: http://docs.datastax.com/en/archived/cassandra/2.0/cassandra/architecture/architecturePlanningHardware_c.html
|
||||
##
|
||||
# resources:
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 500m
|
||||
# memory: 1Gi
|
||||
requests: {}
|
||||
# cpu: 250m
|
||||
# memory: 256Mi
|
||||
|
||||
## Node labels for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
@@ -283,7 +295,7 @@ podAnnotations: {}
|
||||
## Prometheus metrics
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
enabled: true
|
||||
|
||||
## Prometheus Operator ServiceMonitor configuration
|
||||
##
|
||||
|
||||
+31
-19
@@ -14,7 +14,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/grafana
|
||||
tag: 6.4.4-debian-9-r0
|
||||
tag: 6.4.4-debian-9-r8
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -97,7 +97,7 @@ ldap:
|
||||
## - name: GF_DEFAULT_INSTANCE_NAME
|
||||
## value: my-instance
|
||||
##
|
||||
# extraEnvVars:
|
||||
extraEnvVars: {}
|
||||
|
||||
## An array to add extra configmaps:
|
||||
## For example:
|
||||
@@ -106,6 +106,8 @@ ldap:
|
||||
## mountPath: /opt/bitnami/desired-path
|
||||
## subPath: file-name.extension (optional)
|
||||
## readOnly: true
|
||||
##
|
||||
extraConfigmaps: {}
|
||||
|
||||
## Parameters to override the default grafana.ini and custom.ini files.
|
||||
## It is needed to create a configmap containing the grafana.ini and custom.ini files.
|
||||
@@ -164,8 +166,8 @@ persistence:
|
||||
accessMode: ReadWriteOnce
|
||||
size: 10Gi
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
## Grafana containers' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
@@ -182,27 +184,29 @@ readinessProbe:
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
## Service configuration
|
||||
## Service parameters
|
||||
##
|
||||
service:
|
||||
port: 3000
|
||||
## K8s service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Grafana service port
|
||||
##
|
||||
port: 3000
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## loadBalancerIP for the PrestaShop Service (optional, cloud specific)
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## loadBalancerIP for the PrestaShop Service (optional, cloud specific)
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Configure the ingress resource that allows you to access the
|
||||
## Grafana web. Set up the URL
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
@@ -250,15 +254,23 @@ securityContext:
|
||||
fsGroup: 1001
|
||||
runAsNonRoot: true
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Grafana containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
## Example:
|
||||
## resources:
|
||||
## requests:
|
||||
## memory: 512Mi
|
||||
## cpu: 300m
|
||||
## Minimum memory for development is 4GB and 2 CPU cores
|
||||
## Minimum memory for production is 8GB and 4 CPU cores
|
||||
## ref: http://docs.datastax.com/en/archived/cassandra/2.0/cassandra/architecture/architecturePlanningHardware_c.html
|
||||
##
|
||||
# resources:
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 500m
|
||||
# memory: 1Gi
|
||||
requests: {}
|
||||
# cpu: 250m
|
||||
# memory: 256Mi
|
||||
|
||||
## Node labels for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
|
||||
Reference in New Issue
Block a user