From ba4838e115320fd76e6c83c7d7b2d2d2b67b8a26 Mon Sep 17 00:00:00 2001 From: Alex Kennedy Date: Tue, 23 Apr 2024 17:41:01 -0400 Subject: [PATCH] chore: Use more modern `$.Values` syntax (#296) --- charts/daemonset-app/Chart.yaml | 2 +- charts/daemonset-app/README.md | 2 +- .../templates/prometheusrules.yaml | 28 +++++++++---------- charts/flink-job/Chart.yaml | 2 +- charts/flink-job/README.md | 2 +- .../flink-job/templates/prometheusrule.yaml | 9 +++--- charts/istio-alerts/Chart.yaml | 3 +- charts/istio-alerts/README.md | 2 +- .../templates/service-prometheusrule.yaml | 22 +++++++-------- charts/istio-endpoints/Chart.yaml | 2 +- charts/istio-endpoints/README.md | 4 +-- charts/istio-endpoints/templates/sidecar.yaml | 5 ++-- charts/rollout-app/Chart.yaml | 2 +- charts/rollout-app/README.md | 2 +- .../templates/prometheusrules.yaml | 16 +++++------ charts/simple-app/Chart.yaml | 2 +- charts/simple-app/README.md | 2 +- .../simple-app/templates/prometheusrules.yaml | 18 ++++++------ charts/stateful-app/Chart.yaml | 2 +- charts/stateful-app/README.md | 2 +- .../templates/prometheusrules.yaml | 24 ++++++++-------- 21 files changed, 70 insertions(+), 83 deletions(-) diff --git a/charts/daemonset-app/Chart.yaml b/charts/daemonset-app/Chart.yaml index 259a4c94..3c240c4c 100644 --- a/charts/daemonset-app/Chart.yaml +++ b/charts/daemonset-app/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: daemonset-app description: Default DaemonSet Helm Chart type: application -version: 0.15.4 +version: 0.15.5 appVersion: latest maintainers: - name: diranged diff --git a/charts/daemonset-app/README.md b/charts/daemonset-app/README.md index 2be2af07..57deefc4 100644 --- a/charts/daemonset-app/README.md +++ b/charts/daemonset-app/README.md @@ -2,7 +2,7 @@ Default DaemonSet Helm Chart -![Version: 0.15.4](https://img.shields.io/badge/Version-0.15.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 0.15.5](https://img.shields.io/badge/Version-0.15.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) [statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ [hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ diff --git a/charts/daemonset-app/templates/prometheusrules.yaml b/charts/daemonset-app/templates/prometheusrules.yaml index 942a6063..a21488b2 100644 --- a/charts/daemonset-app/templates/prometheusrules.yaml +++ b/charts/daemonset-app/templates/prometheusrules.yaml @@ -1,5 +1,3 @@ -{{- $values := .Values }} -{{- $global := . }} {{- $targetNamespace := .Release.Namespace }} {{- $runbookUrl := required "Values.runbookUrl can not be blank!" .Values.runbookUrl }} {{- $appName := include "nd-common.fullname" . }} @@ -38,7 +36,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -65,7 +63,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -95,7 +93,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -136,7 +134,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -155,7 +153,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -199,8 +197,8 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- if $values.prometheusRules.additionalRuleLabels }} - {{ toYaml $values.prometheusRules.additionalRuleLabels | nindent 8 }} + {{- if $.Values.prometheusRules.additionalRuleLabels }} + {{ toYaml $.Values.prometheusRules.additionalRuleLabels | nindent 8 }} {{- end }} {{- end }} @@ -220,8 +218,8 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- if $values.prometheusRules.additionalRuleLabels }} - {{ toYaml $values.prometheusRules.additionalRuleLabels | nindent 8 }} + {{- if $.Values.prometheusRules.additionalRuleLabels }} + {{ toYaml $.Values.prometheusRules.additionalRuleLabels | nindent 8 }} {{- end }} {{- end }} @@ -241,8 +239,8 @@ spec: for: 10m labels: severity: {{ .severity }} - {{- if $values.prometheusRules.additionalRuleLabels }} - {{ toYaml $values.prometheusRules.additionalRuleLabels | nindent 8 }} + {{- if $.Values.prometheusRules.additionalRuleLabels }} + {{ toYaml $.Values.prometheusRules.additionalRuleLabels | nindent 8 }} {{- end }} {{- end }} @@ -259,8 +257,8 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- if $values.prometheusRules.additionalRuleLabels }} - {{ toYaml $values.prometheusRules.additionalRuleLabels | nindent 8 }} + {{- if $.Values.prometheusRules.additionalRuleLabels }} + {{ toYaml $.Values.prometheusRules.additionalRuleLabels | nindent 8 }} {{- end }} {{- end }} diff --git a/charts/flink-job/Chart.yaml b/charts/flink-job/Chart.yaml index c2d5fc94..470e8f83 100644 --- a/charts/flink-job/Chart.yaml +++ b/charts/flink-job/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "1.0" description: Flink job cluster on k8s name: flink-job -version: 0.1.20 +version: 0.1.21 maintainers: - name: Zedive email: albert@nextdoor.com diff --git a/charts/flink-job/README.md b/charts/flink-job/README.md index 21152a62..d0b45618 100644 --- a/charts/flink-job/README.md +++ b/charts/flink-job/README.md @@ -2,7 +2,7 @@ Flink job cluster on k8s -![Version: 0.1.20](https://img.shields.io/badge/Version-0.1.20-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square) +![Version: 0.1.21](https://img.shields.io/badge/Version-0.1.21-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square) This chart deploys a flink job cluster and runs a simple word counting flink app as an example. This chart includes some production ready set-ups such as diff --git a/charts/flink-job/templates/prometheusrule.yaml b/charts/flink-job/templates/prometheusrule.yaml index a8736def..6f54ff31 100644 --- a/charts/flink-job/templates/prometheusrule.yaml +++ b/charts/flink-job/templates/prometheusrule.yaml @@ -1,6 +1,5 @@ {{- if .Values.alerts.enabled -}} -{{ $values := .Values }} {{ $cluster := .Values.fullnameOverride }} {{ $namespace := .Release.Namespace }} @@ -15,7 +14,7 @@ spec: - alert: NoFlinkJobRunning annotations: summary: No Flink job running in this job cluster. - runbook_url: "{{ $values.defaults.runbookUrl }}#noflinkjobrunning" + runbook_url: "{{ $.Values.defaults.runbookUrl }}#noflinkjobrunning" description: >- No job is running in {{ template "flink-job-cluster.fullname" . }}. expr: >- @@ -26,7 +25,7 @@ spec: - alert: FlinkJobOutage annotations: summary: Flink job is down - runbook_url: "{{ $values.defaults.runbookUrl }}#flinkjoboutage" + runbook_url: "{{ $.Values.defaults.runbookUrl }}#flinkjoboutage" description: >- The job running in {{ template "flink-job-cluster.fullname" . }} is down for more than 10s. expr: >- @@ -40,7 +39,7 @@ spec: - alert: FlinkJobTooManyRestarts annotations: summary: Flink job has too many restarts - runbook_url: "{{ $values.defaults.runbookUrl }}#flinkjobtoomanyrestarts" + runbook_url: "{{ $.Values.defaults.runbookUrl }}#flinkjobtoomanyrestarts" description: >- The job running in {{ template "flink-job-cluster.fullname" . }} is having too many restarts. expr: >- @@ -54,7 +53,7 @@ spec: - alert: FlinkCheckpointFailing annotations: summary: Flink fails to capture the checkpoint. - runbook_url: "{{ $values.defaults.runbookUrl }}#flinkcheckpointfailing" + runbook_url: "{{ $.Values.defaults.runbookUrl }}#flinkcheckpointfailing" description: >- The job manager in {{ template "flink-job-cluster.fullname" . }} fails to capture checkpoint. expr: >- diff --git a/charts/istio-alerts/Chart.yaml b/charts/istio-alerts/Chart.yaml index 1e88fd0e..96669df9 100644 --- a/charts/istio-alerts/Chart.yaml +++ b/charts/istio-alerts/Chart.yaml @@ -2,8 +2,7 @@ apiVersion: v2 name: istio-alerts description: A Helm chart that provisions a series of alerts for istio VirtualServices type: application -version: 0.4.0 -appVersion: 0.0.1 +version: 0.4.1 maintainers: - name: diranged email: matt@nextdoor.com diff --git a/charts/istio-alerts/README.md b/charts/istio-alerts/README.md index d60a8ad9..ff1dedc6 100644 --- a/charts/istio-alerts/README.md +++ b/charts/istio-alerts/README.md @@ -1,6 +1,6 @@ # istio-alerts -![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square) +![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart that provisions a series of alerts for istio VirtualServices diff --git a/charts/istio-alerts/templates/service-prometheusrule.yaml b/charts/istio-alerts/templates/service-prometheusrule.yaml index c1314108..1203aca1 100644 --- a/charts/istio-alerts/templates/service-prometheusrule.yaml +++ b/charts/istio-alerts/templates/service-prometheusrule.yaml @@ -1,7 +1,5 @@ {{ $destinationServiceSelectorForIstioMetrics := include "istio-alerts.destinationServiceSelectorForIstioMetrics" . }} {{ $destinationServiceSelectorForKubeStateMetrics := include "istio-alerts.destinationServiceSelectorForKubeStateMetrics" . }} -{{- $values := .Values }} -{{- $release := .Release }} {{- if .Values.serviceRules.enabled }} apiVersion: monitoring.coreos.com/v1 @@ -22,7 +20,7 @@ spec: annotations: summary: >- {{`{{$labels.destination_service_name}} is throwing too many 5xx errors (namespace: {{$labels.namespace}})`}} - runbook_url: {{ $values.defaults.runbookUrl }}#5xx-Rate-Too-High + runbook_url: {{ $.Values.defaults.runbookUrl }}#5xx-Rate-Too-High description: >- High rate of 5xx responses from the {{`{{$labels.destination_service_name}}`}} VirtualService in namespace {{`{{$labels.namespace}}`}}. @@ -43,8 +41,8 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - namespace: {{ $release.Namespace }} - {{- with $values.defaults.additionalRuleLabels}} + namespace: {{ $.Release.Namespace }} + {{- with $.Values.defaults.additionalRuleLabels}} {{ toYaml . | nindent 8}} {{- end }} {{- end }} @@ -55,7 +53,7 @@ spec: annotations: summary: >- {{`{{$labels.destination_service_name}}`}} avg request latencies are above {{ .threshold }}s! - runbook_url: {{ $values.defaults.runbookUrl}}#HighRequestLatency + runbook_url: {{ $.Values.defaults.runbookUrl}}#HighRequestLatency description: >- Average request latency of {{`{{ $value | humanizePercentage }}`}} is above threshold ({{ .threshold }}s) in namespace {{`{{ $labels.namespace }}`}} for pod {{`{{ $labels.pod }}`}} (container: {{`{{ $labels.container }}`}}). @@ -78,8 +76,8 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - namespace: {{ $release.Namespace }} - {{- with $values.defaults.additionalRuleLabels}} + namespace: {{ $.Release.Namespace }} + {{- with $.Values.defaults.additionalRuleLabels}} {{ toYaml . | nindent 8}} {{- end }} {{- end }} @@ -90,13 +88,13 @@ spec: annotations: summary: >- DestinationServiceSelector for istio-alerts is invalid - runbook_url: {{ $values.defaults.runbookUrl}}#Alert-Rules-Selectors-Validity + runbook_url: {{ $.Values.defaults.runbookUrl}}#Alert-Rules-Selectors-Validity description: >- The DestinationServiceSelector used for service level alerts did not return any data. Please check the DestinationServiceSelector applied in your istio-alerts chart is correct to ensure you are properly selecting your service so that you will be alerted for service issues. The current selector is - `{destination_service_namespace="{{ $release.Namespace }}", destination_service_name="{{ $.Values.serviceRules.destinationServiceName }}"}`. + `{destination_service_namespace="{{ $.Release.Namespace }}", destination_service_name="{{ $.Values.serviceRules.destinationServiceName }}"}`. expr: >- ( count( @@ -108,8 +106,8 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - namespace: {{ $release.Namespace }} - {{- with $values.defaults.additionalRuleLabels}} + namespace: {{ $.Release.Namespace }} + {{- with $.Values.defaults.additionalRuleLabels}} {{ toYaml . | nindent 8}} {{- end }} {{- end }} diff --git a/charts/istio-endpoints/Chart.yaml b/charts/istio-endpoints/Chart.yaml index 6eeab496..d25f0da8 100644 --- a/charts/istio-endpoints/Chart.yaml +++ b/charts/istio-endpoints/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: istio-endpoints description: Per-Namespace Istio Configuration Chart type: application -version: 0.4.0 +version: 0.4.1 appVersion: latest maintainers: - name: diranged diff --git a/charts/istio-endpoints/README.md b/charts/istio-endpoints/README.md index 267d1a7a..77db71aa 100644 --- a/charts/istio-endpoints/README.md +++ b/charts/istio-endpoints/README.md @@ -2,7 +2,7 @@ Per-Namespace Istio Configuration Chart -![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) [elasticache]: https://aws.amazon.com/elasticache/ [serviceentry]: https://istio.io/latest/docs/reference/config/networking/service-entry/ @@ -77,7 +77,7 @@ the cluster, you must specify those namespaces and services in the + dependencies: + - name: istio-endpoints + repository: https://k8s-charts.nextdoor.com -+ version: 0.4.0 ++ version: 0.4.1 maintainers: - name: diranged email: matt@nextdoor.com diff --git a/charts/istio-endpoints/templates/sidecar.yaml b/charts/istio-endpoints/templates/sidecar.yaml index 8cd0cc4d..1191f52d 100644 --- a/charts/istio-endpoints/templates/sidecar.yaml +++ b/charts/istio-endpoints/templates/sidecar.yaml @@ -1,5 +1,4 @@ {{- if .Values.sidecar.enabled }} -{{- $global := . }} apiVersion: networking.istio.io/v1beta1 kind: Sidecar metadata: @@ -29,7 +28,7 @@ spec: can be customized though. */}} - # Default CatchAll - captureMode: {{ $global.Values.sidecar.catchAllCaptureMode }} + captureMode: {{ $.Values.sidecar.catchAllCaptureMode }} hosts: - {{- toYaml $global.Values.sidecar.catchAllHosts | nindent 8 }} + {{- toYaml $.Values.sidecar.catchAllHosts | nindent 8 }} {{- end }} diff --git a/charts/rollout-app/Chart.yaml b/charts/rollout-app/Chart.yaml index 087b9f1f..996ab1ef 100644 --- a/charts/rollout-app/Chart.yaml +++ b/charts/rollout-app/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: rollout-app description: Argo Rollout-based Application Helm Chart type: application -version: 1.0.0 +version: 1.0.1 appVersion: latest maintainers: - name: diranged diff --git a/charts/rollout-app/README.md b/charts/rollout-app/README.md index 86e6d80b..48f68305 100644 --- a/charts/rollout-app/README.md +++ b/charts/rollout-app/README.md @@ -2,7 +2,7 @@ Argo Rollout-based Application Helm Chart -![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) [analysistemplate]: https://argoproj.github.io/argo-rollouts/features/analysis/?query=AnalysisTemplate#background-analysis [argo_rollouts]: https://argoproj.github.io/argo-rollouts/ diff --git a/charts/rollout-app/templates/prometheusrules.yaml b/charts/rollout-app/templates/prometheusrules.yaml index 9a3f85a1..32651e92 100644 --- a/charts/rollout-app/templates/prometheusrules.yaml +++ b/charts/rollout-app/templates/prometheusrules.yaml @@ -1,5 +1,3 @@ -{{- $values := .Values }} -{{- $global := . }} {{- $targetNamespace := .Release.Namespace }} {{- $runbookUrl := required "Values.runbookUrl can not be blank!" .Values.runbookUrl }} {{- $appName := include "nd-common.fullname" . }} @@ -38,7 +36,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -65,7 +63,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -95,7 +93,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -136,7 +134,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -155,7 +153,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -196,7 +194,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -219,7 +217,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} diff --git a/charts/simple-app/Chart.yaml b/charts/simple-app/Chart.yaml index ab6045df..8129cfa0 100644 --- a/charts/simple-app/Chart.yaml +++ b/charts/simple-app/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: simple-app description: Default Microservice Helm Chart type: application -version: 1.7.1 +version: 1.7.2 appVersion: latest maintainers: - name: diranged diff --git a/charts/simple-app/README.md b/charts/simple-app/README.md index 09a8c14b..0a92e6c5 100644 --- a/charts/simple-app/README.md +++ b/charts/simple-app/README.md @@ -2,7 +2,7 @@ Default Microservice Helm Chart -![Version: 1.7.1](https://img.shields.io/badge/Version-1.7.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 1.7.2](https://img.shields.io/badge/Version-1.7.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) [deployments]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ [hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ diff --git a/charts/simple-app/templates/prometheusrules.yaml b/charts/simple-app/templates/prometheusrules.yaml index 5205fc33..cf5cf951 100644 --- a/charts/simple-app/templates/prometheusrules.yaml +++ b/charts/simple-app/templates/prometheusrules.yaml @@ -1,5 +1,3 @@ -{{- $values := .Values }} -{{- $global := . }} {{- $targetNamespace := .Release.Namespace }} {{- $runbookUrl := required "Values.runbookUrl can not be blank!" .Values.runbookUrl }} {{- $appName := include "nd-common.fullname" . }} @@ -38,7 +36,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -65,7 +63,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -95,7 +93,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -136,7 +134,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -155,7 +153,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -182,7 +180,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -220,7 +218,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -243,7 +241,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} diff --git a/charts/stateful-app/Chart.yaml b/charts/stateful-app/Chart.yaml index 510cbdf0..22a72334 100644 --- a/charts/stateful-app/Chart.yaml +++ b/charts/stateful-app/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: stateful-app description: Default StatefulSet Helm Chart type: application -version: 1.0.0 +version: 1.0.1 appVersion: latest maintainers: - name: diranged diff --git a/charts/stateful-app/README.md b/charts/stateful-app/README.md index a8233eca..bc41c7d2 100644 --- a/charts/stateful-app/README.md +++ b/charts/stateful-app/README.md @@ -2,7 +2,7 @@ Default StatefulSet Helm Chart -![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) [statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ [hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ diff --git a/charts/stateful-app/templates/prometheusrules.yaml b/charts/stateful-app/templates/prometheusrules.yaml index 471844d7..68b63528 100644 --- a/charts/stateful-app/templates/prometheusrules.yaml +++ b/charts/stateful-app/templates/prometheusrules.yaml @@ -1,5 +1,3 @@ -{{- $values := .Values }} -{{- $global := . }} {{- $targetNamespace := .Release.Namespace }} {{- $runbookUrl := required "Values.runbookUrl can not be blank!" .Values.runbookUrl }} {{- $appName := include "nd-common.fullname" . }} @@ -39,7 +37,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -66,7 +64,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -96,7 +94,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -137,7 +135,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -156,7 +154,7 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- with $values.prometheusRules.additionalRuleLabels }} + {{- with $.Values.prometheusRules.additionalRuleLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- end }} @@ -186,8 +184,8 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- if $values.prometheusRules.additionalRuleLabels }} - {{ toYaml $values.prometheusRules.additionalRuleLabels | nindent 8 }} + {{- if $.Values.prometheusRules.additionalRuleLabels }} + {{ toYaml $.Values.prometheusRules.additionalRuleLabels | nindent 8 }} {{- end }} {{- end }} @@ -208,8 +206,8 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- if $values.prometheusRules.additionalRuleLabels }} - {{ toYaml $values.prometheusRules.additionalRuleLabels | nindent 8 }} + {{- if $.Values.prometheusRules.additionalRuleLabels }} + {{ toYaml $.Values.prometheusRules.additionalRuleLabels | nindent 8 }} {{- end }} {{- end }} @@ -242,8 +240,8 @@ spec: for: {{ .for }} labels: severity: {{ .severity }} - {{- if $values.prometheusRules.additionalRuleLabels }} - {{ toYaml $values.prometheusRules.additionalRuleLabels | nindent 8 }} + {{- if $.Values.prometheusRules.additionalRuleLabels }} + {{ toYaml $.Values.prometheusRules.additionalRuleLabels | nindent 8 }} {{- end }} {{- end }}