From 7f4fef3b91d86d7560af04b789694fa5c85a5fa4 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Tue, 11 Jul 2023 15:35:45 +0400 Subject: [PATCH] charts/victoria-metrics-auth: add support of specifying extra labels --- charts/victoria-metrics-auth/README.md | 5 +++-- charts/victoria-metrics-auth/templates/deployment.yaml | 6 ++++++ charts/victoria-metrics-auth/values.yaml | 5 ++++- hack/helm/victoria-metrics-auth.yaml | 3 +++ hack/vmauth-lint-hack.yaml | 3 +++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/charts/victoria-metrics-auth/README.md b/charts/victoria-metrics-auth/README.md index d2e3e3e20..8dd7f67a2 100644 --- a/charts/victoria-metrics-auth/README.md +++ b/charts/victoria-metrics-auth/README.md @@ -1,6 +1,6 @@ # Helm Chart For Victoria Metrics Auth. - ![Version: 0.2.83](https://img.shields.io/badge/Version-0.2.83-informational?style=flat-square) + ![Version: 0.2.84](https://img.shields.io/badge/Version-0.2.84-informational?style=flat-square) Victoria Metrics Auth - is a simple auth proxy and router for VictoriaMetrics. @@ -108,12 +108,13 @@ Change the values according to the need of the environment in ``victoria-metrics | extraArgs.loggerFormat | string | `"json"` | | | extraContainers | list | `[]` | | | extraHostPathMounts | list | `[]` | Additional hostPath mounts | +| extraLabels | object | `{}` | Labels to be added to the deployment and pods | | extraVolumeMounts | list | `[]` | Extra Volume Mounts for the container | | extraVolumes | list | `[]` | Extra Volumes for the pod | | fullnameOverride | string | `""` | | | image.pullPolicy | string | `"IfNotPresent"` | Pull policy of Docker image | | image.repository | string | `"victoriametrics/vmauth"` | Victoria Metrics Auth Docker repository and image name | -| image.tag | string | `"v1.91.0"` | Tag of Docker image | +| image.tag | string | `"v1.91.3"` | Tag of Docker image | | imagePullSecrets | list | `[]` | | | ingress.annotations | object | `{}` | | | ingress.enabled | bool | `false` | | diff --git a/charts/victoria-metrics-auth/templates/deployment.yaml b/charts/victoria-metrics-auth/templates/deployment.yaml index 28ceb8dbe..3e2a53c2e 100644 --- a/charts/victoria-metrics-auth/templates/deployment.yaml +++ b/charts/victoria-metrics-auth/templates/deployment.yaml @@ -5,6 +5,9 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "chart.labels" . | nindent 4 }} + {{- with .Values.extraLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- with .Values.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -18,6 +21,9 @@ spec: metadata: labels: {{- include "chart.selectorLabels" . | nindent 8 }} + {{- with .Values.extraLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} annotations: checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} {{- range $key, $value := .Values.podAnnotations }} diff --git a/charts/victoria-metrics-auth/values.yaml b/charts/victoria-metrics-auth/values.yaml index c82f81109..24534ba99 100644 --- a/charts/victoria-metrics-auth/values.yaml +++ b/charts/victoria-metrics-auth/values.yaml @@ -158,6 +158,9 @@ annotations: {} # -- Annotations to be added to pod podAnnotations: {} +# -- Labels to be added to the deployment and pods +extraLabels: {} + # -- NodeSelector configurations. Ref: https://kubernetes.io/docs/user-guide/node-selection/ nodeSelector: {} @@ -172,7 +175,7 @@ tolerations: [] affinity: {} serviceMonitor: - enabled: false + enabled: false extraLabels: {} annotations: {} relabelings: [] diff --git a/hack/helm/victoria-metrics-auth.yaml b/hack/helm/victoria-metrics-auth.yaml index 9ac1538cb..e040c76ef 100644 --- a/hack/helm/victoria-metrics-auth.yaml +++ b/hack/helm/victoria-metrics-auth.yaml @@ -6,3 +6,6 @@ config: - username: "local-single-node" password: "ci" url_prefix: "http://localhost:8428" + +extraLabels: + some: test diff --git a/hack/vmauth-lint-hack.yaml b/hack/vmauth-lint-hack.yaml index cf6d1f5d2..a76087aae 100644 --- a/hack/vmauth-lint-hack.yaml +++ b/hack/vmauth-lint-hack.yaml @@ -1,2 +1,5 @@ podDisruptionBudget: enabled: true + +extraLabels: + some: test