From 0dd0e55ec46cc63a326a78bd55850b6b0e1deccf Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 25 Jun 2021 17:19:25 -0700 Subject: [PATCH] (dev-v2.6-archive) Update rancher-grafana to new base bf7e1110a5ee9258190d0377fea319bb8e764e62 (partially cherry picked from commit 77baac0ccabc8d15e184e7a8ecfca691822cfa4d) --- .../overlay/templates/hpa.yaml | 20 ---- .../generated-changes/patch/Chart.yaml.patch | 5 +- .../generated-changes/patch/README.md.patch | 66 ----------- .../patch/templates/_helpers.tpl.patch | 17 --- .../patch/templates/_pod.tpl.patch | 77 +------------ .../patch/templates/configmap.yaml.patch | 14 --- .../patch/templates/deployment.yaml.patch | 21 ---- .../image-renderer-service.yaml.patch | 13 --- .../templates/podsecuritypolicy.yaml.patch | 45 +------- .../patch/templates/secret.yaml.patch | 28 ----- .../patch/templates/service.yaml.patch | 13 --- .../patch/templates/statefulset.yaml.patch | 9 -- .../generated-changes/patch/values.yaml.patch | 107 ++---------------- packages/rancher-grafana/package.yaml | 2 +- 14 files changed, 13 insertions(+), 424 deletions(-) delete mode 100644 packages/rancher-grafana/generated-changes/overlay/templates/hpa.yaml delete mode 100644 packages/rancher-grafana/generated-changes/patch/README.md.patch delete mode 100644 packages/rancher-grafana/generated-changes/patch/templates/configmap.yaml.patch delete mode 100644 packages/rancher-grafana/generated-changes/patch/templates/deployment.yaml.patch delete mode 100644 packages/rancher-grafana/generated-changes/patch/templates/image-renderer-service.yaml.patch delete mode 100644 packages/rancher-grafana/generated-changes/patch/templates/secret.yaml.patch delete mode 100644 packages/rancher-grafana/generated-changes/patch/templates/service.yaml.patch diff --git a/packages/rancher-grafana/generated-changes/overlay/templates/hpa.yaml b/packages/rancher-grafana/generated-changes/overlay/templates/hpa.yaml deleted file mode 100644 index 9c186d74a..000000000 --- a/packages/rancher-grafana/generated-changes/overlay/templates/hpa.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "grafana.fullname" . }} - labels: - app.kubernetes.io/name: {{ template "grafana.name" . }} - helm.sh/chart: {{ template "grafana.chart" . }} - app.kubernetes.io/managed-by: {{ .Release.Service }} - app.kubernetes.io/instance: {{ .Release.Name }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "grafana.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: -{{ toYaml .Values.autoscaling.metrics | indent 4 }} -{{- end }} diff --git a/packages/rancher-grafana/generated-changes/patch/Chart.yaml.patch b/packages/rancher-grafana/generated-changes/patch/Chart.yaml.patch index 4ca8d9c7f..b1f759d6c 100644 --- a/packages/rancher-grafana/generated-changes/patch/Chart.yaml.patch +++ b/packages/rancher-grafana/generated-changes/patch/Chart.yaml.patch @@ -9,10 +9,9 @@ + catalog.cattle.io/os: linux apiVersion: v2 -name: grafana --version: 6.6.4 --appVersion: 7.4.5 +name: rancher-grafana -+version: 6.11.0 + version: 6.11.0 +-appVersion: 7.5.5 +appVersion: 7.5.8 kubeVersion: '^1.8.0-0' description: The leading tool for querying and visualizing time series and metrics. diff --git a/packages/rancher-grafana/generated-changes/patch/README.md.patch b/packages/rancher-grafana/generated-changes/patch/README.md.patch deleted file mode 100644 index 82473196d..000000000 --- a/packages/rancher-grafana/generated-changes/patch/README.md.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- charts-original/README.md -+++ charts/README.md -@@ -63,6 +63,7 @@ - | `image.sha` | Image sha (optional) | `2b56f6106ddc376bb46d974230d530754bf65a640dfbc5245191d72d3b49efc6` | - | `image.pullPolicy` | Image pull policy | `IfNotPresent` | - | `image.pullSecrets` | Image pull secrets | `{}` | -+| `service.enabled` | Enable grafana service | `true` | - | `service.type` | Kubernetes service type | `ClusterIP` | - | `service.port` | Kubernetes port where service is exposed | `80` | - | `service.portName` | Name of the port on the service | `service` | -@@ -82,7 +83,7 @@ - | `ingress.path` | Ingress accepted path | `/` | - | `ingress.pathType` | Ingress type of path | `Prefix` | - | `ingress.hosts` | Ingress accepted hostnames | `["chart-example.local"]` | --| `ingress.extraPaths` | Ingress extra paths to prepend to every host configuration. Useful when configuring [custom actions with AWS ALB Ingress Controller](https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/ingress/annotation/#actions). | `[]` | -+| `ingress.extraPaths` | Ingress extra paths to prepend to every host configuration. Useful when configuring [custom actions with AWS ALB Ingress Controller](https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/ingress/annotation/#actions). Requires `ingress.hosts` to have one or more host entries. | `[]` | - | `ingress.tls` | Ingress TLS configuration | `[]` | - | `resources` | CPU/Memory resource requests/limits | `{}` | - | `nodeSelector` | Node labels for pod assignment | `{}` | -@@ -157,13 +158,16 @@ - | `sidecar.dashboards.folderAnnotation` | The annotation the sidecar will look for in configmaps to override the destination folder for files | `nil` | - | `sidecar.dashboards.defaultFolderName` | The default folder name, it will create a subfolder under the `sidecar.dashboards.folder` and put dashboards in there instead | `nil` | - | `sidecar.dashboards.searchNamespace` | If specified, the sidecar will search for dashboard config-maps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify ALL to search in all namespaces | `nil` | -+| `sidecar.dashboards.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` | - | `sidecar.datasources.enabled` | Enables the cluster wide search for datasources and adds/updates/deletes them in grafana |`false` | - | `sidecar.datasources.label` | Label that config maps with datasources should have to be added | `grafana_datasource` | --| `sidecar.datasources.labelValue` | Label value that config maps with datasources should have to be added | `nil` | -+| `sidecar.datasources.labelValue` | Label value that config maps with datasources should have to be added | `nil` | - | `sidecar.datasources.searchNamespace` | If specified, the sidecar will search for datasources config-maps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify ALL to search in all namespaces | `nil` | -+| `sidecar.datasources.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` | - | `sidecar.notifiers.enabled` | Enables the cluster wide search for notifiers and adds/updates/deletes them in grafana | `false` | - | `sidecar.notifiers.label` | Label that config maps with notifiers should have to be added | `grafana_notifier` | - | `sidecar.notifiers.searchNamespace` | If specified, the sidecar will search for notifiers config-maps (or secrets) inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify ALL to search in all namespaces | `nil` | -+| `sidecar.notifiers.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` | - | `smtp.existingSecret` | The name of an existing secret containing the SMTP credentials. | `""` | - | `smtp.userKey` | The key in the existing SMTP secret containing the username. | `"user"` | - | `smtp.passwordKey` | The key in the existing SMTP secret containing the password. | `"password"` | -@@ -215,6 +219,7 @@ - | `imageRenderer.securityContext` | image-renderer deployment securityContext | `{}` | - | `imageRenderer.hostAliases` | image-renderer deployment Host Aliases | `[]` | - | `imageRenderer.priorityClassName` | image-renderer deployment priority class | `''` | -+| `imageRenderer.service.enabled` | Enable the image-renderer service | `true` | - | `imageRenderer.service.portName` | image-renderer service port name | `'http'` | - | `imageRenderer.service.port` | image-renderer service port used by both service and deployment | `8081` | - | `imageRenderer.grafanaSubPath` | Grafana sub path to use for image renderer callback url | `''` | -@@ -242,6 +247,9 @@ - - ### Example of extraVolumeMounts - -+Volume can be type persistentVolumeClaim or hostPath but not both at same time. -+If none existingClaim or hostPath argument is givent then type is emptyDir. -+ - ```yaml - - extraVolumeMounts: - - name: plugins -@@ -249,6 +257,10 @@ - subPath: configs/grafana/plugins - existingClaim: existing-grafana-claim - readOnly: false -+ - name: dashboards -+ mountPath: /var/lib/grafana/dashboards -+ hostPath: /usr/shared/grafana/dashboards -+ readOnly: false - ``` - - ## Import dashboards diff --git a/packages/rancher-grafana/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rancher-grafana/generated-changes/patch/templates/_helpers.tpl.patch index fe1b48aab..dd510e2b2 100644 --- a/packages/rancher-grafana/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rancher-grafana/generated-changes/patch/templates/_helpers.tpl.patch @@ -33,20 +33,3 @@ {{/* vim: set filetype=mustache: */}} {{/* Expand the name of the chart. -@@ -114,3 +143,16 @@ - {{- print "rbac.authorization.k8s.io/v1beta1" -}} - {{- end -}} - {{- end -}} -+ -+{{/* -+Looks if there's an existing secret and reuse its password. If not it generates -+new password and use it. -+*/}} -+{{- define "grafana.password" -}} -+{{- $secret := (lookup "v1" "Secret" (include "grafana.namespace" .) (include "grafana.fullname" .) ) -}} -+ {{- if $secret -}} -+ {{- index $secret "data" "admin-password" -}} -+ {{- else -}} -+ {{- (randAlphaNum 40) | b64enc | quote -}} -+ {{- end -}} -+{{- end -}} diff --git a/packages/rancher-grafana/generated-changes/patch/templates/_pod.tpl.patch b/packages/rancher-grafana/generated-changes/patch/templates/_pod.tpl.patch index 148b42526..50d29485e 100644 --- a/packages/rancher-grafana/generated-changes/patch/templates/_pod.tpl.patch +++ b/packages/rancher-grafana/generated-changes/patch/templates/_pod.tpl.patch @@ -48,15 +48,6 @@ env: - name: METHOD value: LIST -@@ -96,7 +100,7 @@ - - name: FOLDER - value: "/etc/grafana/provisioning/datasources" - - name: RESOURCE -- value: "both" -+ value: {{ quote .Values.sidecar.datasources.resource }} - {{- if .Values.sidecar.enableUniqueFilenames }} - - name: UNIQUE_FILENAMES - value: "{{ .Values.sidecar.enableUniqueFilenames }}" @@ -118,9 +122,9 @@ {{- if .Values.sidecar.notifiers.enabled }} - name: {{ template "grafana.name" . }}-sc-notifiers @@ -69,15 +60,6 @@ {{- end }} imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} env: -@@ -131,7 +135,7 @@ - - name: FOLDER - value: "/etc/grafana/provisioning/notifiers" - - name: RESOURCE -- value: "both" -+ value: {{ quote .Values.sidecar.notifiers.resource }} - {{- if .Values.sidecar.enableUniqueFilenames }} - - name: UNIQUE_FILENAMES - value: "{{ .Values.sidecar.enableUniqueFilenames }}" @@ -163,9 +167,9 @@ {{- if .Values.sidecar.dashboards.enabled }} - name: {{ template "grafana.name" . }}-sc-dashboard @@ -90,15 +72,6 @@ {{- end }} imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} env: -@@ -180,7 +184,7 @@ - - name: FOLDER - value: "{{ .Values.sidecar.dashboards.folder }}{{- with .Values.sidecar.dashboards.defaultFolderName }}/{{ . }}{{- end }}" - - name: RESOURCE -- value: "both" -+ value: {{ quote .Values.sidecar.dashboards.resource }} - {{- if .Values.sidecar.enableUniqueFilenames }} - - name: UNIQUE_FILENAMES - value: "{{ .Values.sidecar.enableUniqueFilenames }}" @@ -205,9 +209,9 @@ {{- end}} - name: {{ .Chart.Name }} @@ -111,7 +84,7 @@ {{- end }} imagePullPolicy: {{ .Values.image.pullPolicy }} {{- if .Values.command }} -@@ -307,20 +311,20 @@ +@@ -307,7 +311,7 @@ {{- end }} ports: - name: {{ .Values.service.portName }} @@ -120,37 +93,7 @@ protocol: TCP - name: {{ .Values.podPortName }} containerPort: 3000 - protocol: TCP - env: -- {{- if not .Values.env.GF_SECURITY_ADMIN_USER }} -+ {{- if and (not .Values.env.GF_SECURITY_ADMIN_USER) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} - - name: GF_SECURITY_ADMIN_USER - valueFrom: - secretKeyRef: - name: {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }} - key: {{ .Values.admin.userKey | default "admin-user" }} - {{- end }} -- {{- if and (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) }} -+ {{- if and (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} - - name: GF_SECURITY_ADMIN_PASSWORD - valueFrom: - secretKeyRef: -@@ -352,6 +356,14 @@ - - name: GF_RENDERING_CALLBACK_URL - value: http://{{ template "grafana.fullname" . }}.{{ template "grafana.namespace" . }}:{{ .Values.service.port }}/{{ .Values.imageRenderer.grafanaSubPath }} - {{ end }} -+ - name: GF_PATHS_DATA -+ value: {{ (get .Values "grafana.ini").paths.data }} -+ - name: GF_PATHS_LOGS -+ value: {{ (get .Values "grafana.ini").paths.logs }} -+ - name: GF_PATHS_PLUGINS -+ value: {{ (get .Values "grafana.ini").paths.plugins }} -+ - name: GF_PATHS_PROVISIONING -+ value: {{ (get .Values "grafana.ini").paths.provisioning }} - {{- range $key, $value := .Values.envValueFrom }} - - name: {{ $key | quote }} - valueFrom: -@@ -380,17 +392,17 @@ +@@ -388,17 +392,17 @@ {{- with .Values.extraContainers }} {{ tpl . $ | indent 2 }} {{- end }} @@ -174,19 +117,3 @@ {{- end }} volumes: - name: config -@@ -479,8 +491,15 @@ - {{- end }} - {{- range .Values.extraVolumeMounts }} - - name: {{ .name }} -+ {{- if .existingClaim }} - persistentVolumeClaim: - claimName: {{ .existingClaim }} -+ {{- else if .hostPath }} -+ hostPath: -+ path: {{ .hostPath }} -+ {{- else }} -+ emptyDir: {} -+ {{- end }} - {{- end }} - {{- range .Values.extraEmptyDirMounts }} - - name: {{ .name }} diff --git a/packages/rancher-grafana/generated-changes/patch/templates/configmap.yaml.patch b/packages/rancher-grafana/generated-changes/patch/templates/configmap.yaml.patch deleted file mode 100644 index ce6c80df7..000000000 --- a/packages/rancher-grafana/generated-changes/patch/templates/configmap.yaml.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- charts-original/templates/configmap.yaml -+++ charts/templates/configmap.yaml -@@ -19,8 +19,10 @@ - {{- range $elem, $elemVal := $value }} - {{- if kindIs "invalid" $elemVal }} - {{ $elem }} = -+ {{- else if kindIs "string" $elemVal }} -+ {{ $elem }} = {{ tpl $elemVal $ }} - {{- else }} -- {{ $elem }} = {{ tpl (toYaml $elemVal) $ }} -+ {{ $elem }} = {{ $elemVal }} - {{- end }} - {{- end }} - {{- end }} diff --git a/packages/rancher-grafana/generated-changes/patch/templates/deployment.yaml.patch b/packages/rancher-grafana/generated-changes/patch/templates/deployment.yaml.patch deleted file mode 100644 index 383da57ea..000000000 --- a/packages/rancher-grafana/generated-changes/patch/templates/deployment.yaml.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- charts-original/templates/deployment.yaml -+++ charts/templates/deployment.yaml -@@ -14,7 +14,9 @@ - {{ toYaml . | indent 4 }} - {{- end }} - spec: -+ {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicas }} -+ {{- end }} - revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} - selector: - matchLabels: -@@ -34,7 +36,7 @@ - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/dashboards-json-config: {{ include (print $.Template.BasePath "/dashboards-json-configmap.yaml") . | sha256sum }} - checksum/sc-dashboard-provider-config: {{ include (print $.Template.BasePath "/configmap-dashboard-provider.yaml") . | sha256sum }} --{{- if or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret)) }} -+{{- if and (or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret))) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} - checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- end }} - {{- if .Values.envRenderSecret }} diff --git a/packages/rancher-grafana/generated-changes/patch/templates/image-renderer-service.yaml.patch b/packages/rancher-grafana/generated-changes/patch/templates/image-renderer-service.yaml.patch deleted file mode 100644 index 160ebc17a..000000000 --- a/packages/rancher-grafana/generated-changes/patch/templates/image-renderer-service.yaml.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- charts-original/templates/image-renderer-service.yaml -+++ charts/templates/image-renderer-service.yaml -@@ -1,4 +1,5 @@ - {{ if .Values.imageRenderer.enabled }} -+{{ if .Values.imageRenderer.service.enabled }} - apiVersion: v1 - kind: Service - metadata: -@@ -26,3 +27,4 @@ - selector: - {{- include "grafana.imageRenderer.selectorLabels" . | nindent 4 }} - {{ end }} -+{{ end }} diff --git a/packages/rancher-grafana/generated-changes/patch/templates/podsecuritypolicy.yaml.patch b/packages/rancher-grafana/generated-changes/patch/templates/podsecuritypolicy.yaml.patch index cbe9f618b..3c492293c 100644 --- a/packages/rancher-grafana/generated-changes/patch/templates/podsecuritypolicy.yaml.patch +++ b/packages/rancher-grafana/generated-changes/patch/templates/podsecuritypolicy.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/podsecuritypolicy.yaml +++ charts/templates/podsecuritypolicy.yaml -@@ -6,30 +6,15 @@ +@@ -6,13 +6,9 @@ namespace: {{ template "grafana.namespace" . }} labels: {{- include "grafana.labels" . | nindent 4 }} @@ -17,46 +17,3 @@ spec: privileged: false allowPrivilegeEscalation: false - requiredDropCapabilities: -- # Default set from Docker, without DAC_OVERRIDE or CHOWN -- - FOWNER -- - FSETID -- - KILL -- - SETGID -- - SETUID -- - SETPCAP -- - NET_BIND_SERVICE -- - NET_RAW -- - SYS_CHROOT -- - MKNOD -- - AUDIT_WRITE -- - SETFCAP -+ # Default set from Docker, with DAC_OVERRIDE and CHOWN -+ - ALL - volumes: - - 'configMap' - - 'emptyDir' -@@ -42,12 +27,20 @@ - hostIPC: false - hostPID: false - runAsUser: -- rule: 'RunAsAny' -+ rule: 'MustRunAsNonRoot' - seLinux: - rule: 'RunAsAny' - supplementalGroups: -- rule: 'RunAsAny' -+ rule: 'MustRunAs' -+ ranges: -+ # Forbid adding the root group. -+ - min: 1 -+ max: 65535 - fsGroup: -- rule: 'RunAsAny' -+ rule: 'MustRunAs' -+ ranges: -+ # Forbid adding the root group. -+ - min: 1 -+ max: 65535 - readOnlyRootFilesystem: false - {{- end }} diff --git a/packages/rancher-grafana/generated-changes/patch/templates/secret.yaml.patch b/packages/rancher-grafana/generated-changes/patch/templates/secret.yaml.patch deleted file mode 100644 index 3b2de60aa..000000000 --- a/packages/rancher-grafana/generated-changes/patch/templates/secret.yaml.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- charts-original/templates/secret.yaml -+++ charts/templates/secret.yaml -@@ -1,4 +1,4 @@ --{{- if or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret)) }} -+{{- if and (or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret))) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} - apiVersion: v1 - kind: Secret - metadata: -@@ -6,6 +6,10 @@ - namespace: {{ template "grafana.namespace" . }} - labels: - {{- include "grafana.labels" . | nindent 4 }} -+{{- with .Values.annotations }} -+ annotations: -+{{ toYaml . | indent 4 }} -+{{- end }} - type: Opaque - data: - {{- if and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) }} -@@ -13,7 +17,7 @@ - {{- if .Values.adminPassword }} - admin-password: {{ .Values.adminPassword | b64enc | quote }} - {{- else }} -- admin-password: {{ randAlphaNum 40 | b64enc | quote }} -+ admin-password: {{ template "grafana.password" . }} - {{- end }} - {{- end }} - {{- if not .Values.ldap.existingSecret }} diff --git a/packages/rancher-grafana/generated-changes/patch/templates/service.yaml.patch b/packages/rancher-grafana/generated-changes/patch/templates/service.yaml.patch deleted file mode 100644 index b5b5b4e66..000000000 --- a/packages/rancher-grafana/generated-changes/patch/templates/service.yaml.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- charts-original/templates/service.yaml -+++ charts/templates/service.yaml -@@ -1,3 +1,4 @@ -+{{ if .Values.service.enabled }} - apiVersion: v1 - kind: Service - metadata: -@@ -47,4 +48,4 @@ - {{- end }} - selector: - {{- include "grafana.selectorLabels" . | nindent 4 }} -- -+{{ end }} diff --git a/packages/rancher-grafana/generated-changes/patch/templates/statefulset.yaml.patch b/packages/rancher-grafana/generated-changes/patch/templates/statefulset.yaml.patch index b2d149010..ebf0760af 100644 --- a/packages/rancher-grafana/generated-changes/patch/templates/statefulset.yaml.patch +++ b/packages/rancher-grafana/generated-changes/patch/templates/statefulset.yaml.patch @@ -1,14 +1,5 @@ --- charts-original/templates/statefulset.yaml +++ charts/templates/statefulset.yaml -@@ -27,7 +27,7 @@ - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/dashboards-json-config: {{ include (print $.Template.BasePath "/dashboards-json-configmap.yaml") . | sha256sum }} - checksum/sc-dashboard-provider-config: {{ include (print $.Template.BasePath "/configmap-dashboard-provider.yaml") . | sha256sum }} -- {{- if or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret)) }} -+ {{- if and (or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret))) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }} - checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- end }} - {{- with .Values.podAnnotations }} @@ -39,11 +39,13 @@ - metadata: name: storage diff --git a/packages/rancher-grafana/generated-changes/patch/values.yaml.patch b/packages/rancher-grafana/generated-changes/patch/values.yaml.patch index a83d06bd0..088f9e422 100644 --- a/packages/rancher-grafana/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-grafana/generated-changes/patch/values.yaml.patch @@ -27,41 +27,18 @@ namespaced: false extraRoleRules: [] # - apiGroups: [] -@@ -22,6 +38,22 @@ - - replicas: 1 - -+## Create HorizontalPodAutoscaler object for deployment type -+# -+autoscaling: -+ enabled: false -+# minReplicas: 1 -+# maxReplicas: 10 -+# metrics: -+# - type: Resource -+# resource: -+# name: cpu -+# targetAverageUtilization: 60 -+# - type: Resource -+# resource: -+# name: memory -+# targetAverageUtilization: 60 -+ - ## See `kubectl explain poddisruptionbudget.spec` for more - ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ - podDisruptionBudget: {} -@@ -52,8 +84,8 @@ +@@ -68,8 +84,8 @@ # schedulerName: "default-scheduler" image: - repository: grafana/grafana -- tag: 7.4.5 +- tag: 7.5.5 + repository: rancher/mirrored-grafana-grafana + tag: 7.5.8 sha: "" pullPolicy: IfNotPresent -@@ -66,12 +98,15 @@ +@@ -82,12 +98,15 @@ testFramework: enabled: true @@ -79,7 +56,7 @@ runAsUser: 472 runAsGroup: 472 fsGroup: 472 -@@ -99,7 +134,7 @@ +@@ -115,7 +134,7 @@ # priorityClassName: downloadDashboardsImage: @@ -88,15 +65,7 @@ tag: 7.73.0 sha: "" pullPolicy: IfNotPresent -@@ -125,6 +160,7 @@ - ## ref: http://kubernetes.io/docs/user-guide/services/ - ## - service: -+ enabled: true - type: ClusterIP - port: 80 - targetPort: 3000 -@@ -284,7 +320,7 @@ +@@ -301,7 +320,7 @@ ## initChownData container image ## image: @@ -105,33 +74,7 @@ tag: "1.31.1" sha: "" pullPolicy: IfNotPresent -@@ -401,10 +437,14 @@ - ## Additional grafana server volume mounts - # Defines additional volume mounts. - extraVolumeMounts: [] -- # - name: extra-volume -- # mountPath: /mnt/volume -+ # - name: extra-volume-0 -+ # mountPath: /mnt/volume0 - # readOnly: true - # existingClaim: volume-claim -+ # - name: extra-volume-1 -+ # mountPath: /mnt/volume1 -+ # readOnly: true -+ # hostPath: /usr/shared/ - - ## Pass the plugins you want installed as a list. - ## -@@ -511,7 +551,7 @@ - ## - grafana.ini: - paths: -- data: /var/lib/grafana/data -+ data: /var/lib/grafana/ - logs: /var/log/grafana - plugins: /var/lib/grafana/plugins - provisioning: /etc/grafana/provisioning -@@ -581,7 +621,7 @@ +@@ -602,7 +621,7 @@ ## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards sidecar: image: @@ -140,34 +83,7 @@ tag: 1.10.7 sha: "" imagePullPolicy: IfNotPresent -@@ -610,6 +650,8 @@ - # Otherwise the namespace in which the sidecar is running will be used. - # It's also possible to specify ALL to search in all namespaces - searchNamespace: null -+ # search in configmap, secret or both -+ resource: both - # If specified, the sidecar will look for annotation with this name to create folder and put graph here. - # You can use this parameter together with `provider.foldersFromFilesStructure`to annotate configmaps and create folder structure. - folderAnnotation: null -@@ -639,6 +681,8 @@ - # Otherwise the namespace in which the sidecar is running will be used. - # It's also possible to specify ALL to search in all namespaces - searchNamespace: null -+ # search in configmap, secret or both -+ resource: both - notifiers: - enabled: false - # label that the configmaps with notifiers are marked with -@@ -647,6 +691,8 @@ - # Otherwise the namespace in which the sidecar is running will be used. - # It's also possible to specify ALL to search in all namespaces - searchNamespace: null -+ # search in configmap, secret or both -+ resource: both - - ## Override the deployment namespace - ## -@@ -663,9 +709,9 @@ +@@ -690,9 +709,9 @@ replicas: 1 image: # image-renderer Image repository @@ -179,12 +95,3 @@ # image-renderer Image sha (optional) sha: "" # image-renderer ImagePullPolicy -@@ -684,6 +730,8 @@ - # image-renderer deployment priority class - priorityClassName: '' - service: -+ # Enable the image-renderer service -+ enabled: true - # image-renderer service port name - portName: 'http' - # image-renderer service port used by both service and deployment diff --git a/packages/rancher-grafana/package.yaml b/packages/rancher-grafana/package.yaml index c34e71f58..bbb109e4a 100644 --- a/packages/rancher-grafana/package.yaml +++ b/packages/rancher-grafana/package.yaml @@ -1,4 +1,4 @@ url: https://github.com/grafana/helm-charts.git subdirectory: charts/grafana -commit: 837b4ace32278eee14310f1d654d651d0898bb19 +commit: bf7e1110a5ee9258190d0377fea319bb8e764e62 version: 100.0.0