Feature grafana/add resourcequotas persistence initcontainer (#12397)

* feat(stable/grafana): Added the resources quotas in the template/deployment.yaml also the README.md

Signed-off-by: Jdavid <jose.david@harbur.io>

* Add space in values.yaml comments

Signed-off-by: Jdavid <jose.david@harbur.io>

* Changed the values.yaml and deployment.yaml to adapt with initchowndata
variables

Signed-off-by: Jdavid <jose.david@harbur.io>

* Update README.md

Signed-off-by: Jdavid <jose.david@harbur.io>

* Fixed spaces

Signed-off-by: Jdavid <jose.david@harbur.io>

* Fixed spaces in values.yaml

Signed-off-by: Jdavid <jose.david@harbur.io>

* Modify the notes from maorfr

Signed-off-by: Jdavid <jose.david@harbur.io>

* Removed variable initchowndata.name from README.md

Signed-off-by: Jdavid <jose.david@harbur.io>
This commit is contained in:
Jdavid7x
2019-03-27 08:08:50 -07:00
committed by Kubernetes Prow Robot
parent ececcab3d7
commit 8ecee38aca
4 changed files with 36 additions and 11 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: grafana
version: 2.3.5
version: 3.0.0
appVersion: 6.0.2
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
+5 -1
View File
@@ -58,12 +58,16 @@ The command removes all the Kubernetes components associated with the chart and
| `extraInitContainers` | Init containers to add to the grafana pod | `{}` |
| `extraContainers` | Sidecar containers to add to the grafana pod | `{}` |
| `persistence.enabled` | Use persistent volume to store data | `false` |
| `persistence.initChownData` | Change ownership of persistent volume on initialization | `true` |
| `persistence.size` | Size of persistent volume claim | `10Gi` |
| `persistence.existingClaim` | Use an existing PVC to persist data | `nil` |
| `persistence.storageClassName` | Type of persistent volume claim | `nil` |
| `persistence.accessModes` | Persistence access modes | `[ReadWriteOnce]` |
| `persistence.subPath` | Mount a sub dir of the persistent volume | `nil` |
| `initChownData.enabled` | If false, don't reset data ownership at startup | true |
| `initChownData.image.repository` | init-chown-data container image repository | `busybox` |
| `initChownData.image.tag` | init-chown-data container image tag | `latest` |
| `initChownData.image.pullPolicy` | init-chown-data container image pull policy | `IfNotPresent` |
| `initChownData.resources` | init-chown-data pod resource requests & limits | `{}` |
| `schedulerName` | Alternate scheduler name | `nil` |
| `env` | Extra environment variables passed to pods | `{}` |
| `envFromSecret` | Name of a Kubenretes secret (must be manually created in the same namespace) containing values to be added to the environment | `""` |
+5 -3
View File
@@ -46,13 +46,15 @@ spec:
{{- if ( or .Values.persistence.enabled .Values.dashboards .Values.sidecar.datasources.enabled .Values.extraInitContainers) }}
initContainers:
{{- end }}
{{- if ( and .Values.persistence.enabled .Values.persistence.initChownData ) }}
{{- if ( and .Values.persistence.enabled .Values.initChownData.enabled ) }}
- name: init-chown-data
image: "{{ .Values.chownDataImage.repository }}:{{ .Values.chownDataImage.tag }}"
imagePullPolicy: {{ .Values.chownDataImage.pullPolicy }}
image: "{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}"
imagePullPolicy: {{ .Values.initChownData.image.pullPolicy }}
securityContext:
runAsUser: 0
command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.runAsUser }}", "/var/lib/grafana"]
resources:
{{ toYaml .Values.initChownData.resources | indent 12 }}
volumeMounts:
- name: storage
mountPath: "/var/lib/grafana"
+25 -6
View File
@@ -61,11 +61,6 @@ downloadDashboardsImage:
tag: latest
pullPolicy: IfNotPresent
chownDataImage:
repository: busybox
tag: 1.30.0
pullPolicy: IfNotPresent
## Pod Annotations
# podAnnotations: {}
@@ -145,7 +140,6 @@ extraContainers: |
##
persistence:
enabled: false
initChownData: true
# storageClassName: default
accessModes:
- ReadWriteOnce
@@ -154,6 +148,31 @@ persistence:
# subPath: ""
# existingClaim:
initChownData:
## If false, data ownership will not be reset at startup
## This allows the prometheus-server to be run with an arbitrary user
##
enabled: true
## initChownData container image
##
image:
repository: busybox
tag: 1.30
pullPolicy: IfNotPresent
## initChownData resource requests and limits
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
# Administrator credentials when not using an existing secret (see below)
adminUser: admin
# adminPassword: strongpassword