diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index a6a7924d33..d7a6cbf759 100755 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -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. diff --git a/stable/grafana/README.md b/stable/grafana/README.md index 8677ba71f7..8a686b9ecc 100644 --- a/stable/grafana/README.md +++ b/stable/grafana/README.md @@ -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 | `""` | diff --git a/stable/grafana/templates/deployment.yaml b/stable/grafana/templates/deployment.yaml index 05225e403b..e61a7db4b8 100644 --- a/stable/grafana/templates/deployment.yaml +++ b/stable/grafana/templates/deployment.yaml @@ -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" diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index d92600b531..593611edac 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -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