From 225e67d1baa93ed7ac36131d2e591c83b0e656a2 Mon Sep 17 00:00:00 2001 From: Rafael Romero Date: Wed, 6 Sep 2023 12:42:53 +0100 Subject: [PATCH] Helm chart accepts now custom annotations for the Service --- k8s/helm-chart/redis-commander/Chart.yaml | 2 +- k8s/helm-chart/redis-commander/README.md | 3 ++- k8s/helm-chart/redis-commander/templates/service.yaml | 4 ++++ k8s/helm-chart/redis-commander/values.schema.json | 3 +++ k8s/helm-chart/redis-commander/values.yaml | 5 +++++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/k8s/helm-chart/redis-commander/Chart.yaml b/k8s/helm-chart/redis-commander/Chart.yaml index 1f1a0d71..5945f561 100644 --- a/k8s/helm-chart/redis-commander/Chart.yaml +++ b/k8s/helm-chart/redis-commander/Chart.yaml @@ -11,7 +11,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.0 +version: 0.4.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/k8s/helm-chart/redis-commander/README.md b/k8s/helm-chart/redis-commander/README.md index 0c95fe48..9b8dbb4b 100644 --- a/k8s/helm-chart/redis-commander/README.md +++ b/k8s/helm-chart/redis-commander/README.md @@ -2,7 +2,7 @@ A Helm chart for redis-commander -![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.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.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) ## Install @@ -50,6 +50,7 @@ helm -n myspace install redis-web-ui ./k8s/helm-chart/redis-commander --set redi | replicaCount | int | `1` | Number of replicas to create for deployment, should be 1 | | resources | object | `{}` | We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. If you do want to specify resources, uncomment the following lines, adjust them as necessary, and remove the curly braces after 'resources:'. | | securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":false,"runAsNonRoot":true}` | Configuration of the linux security context for the docker image. This restricts the rights of the running docker image as far as possible. "readOnlyRootFilesystem" must be set to false to auto-generate a config file with multiple redis hosts or sentinel hosts | +| service.annotations | object | `{}` | Add additional annotations for the service spec Example: 'my.custom.annotation: value' | | service.port | int | `80` | External port where service is available | | service.type | string | `"ClusterIP"` | Type of k8s service to export | | serviceAccount.annotations | object | `{}` | Annotations to add to the service account | diff --git a/k8s/helm-chart/redis-commander/templates/service.yaml b/k8s/helm-chart/redis-commander/templates/service.yaml index 9c30abdd..3de11eee 100644 --- a/k8s/helm-chart/redis-commander/templates/service.yaml +++ b/k8s/helm-chart/redis-commander/templates/service.yaml @@ -5,6 +5,10 @@ metadata: name: {{ include "redis-commander.fullname" . }} labels: {{- include "redis-commander.labels" . | nindent 4 }} + {{- with .Values.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.type }} ports: diff --git a/k8s/helm-chart/redis-commander/values.schema.json b/k8s/helm-chart/redis-commander/values.schema.json index 617c162c..d45b4d7e 100644 --- a/k8s/helm-chart/redis-commander/values.schema.json +++ b/k8s/helm-chart/redis-commander/values.schema.json @@ -167,6 +167,9 @@ }, "type": { "type": "string" + }, + "annotations": { + "type": "object" } } }, diff --git a/k8s/helm-chart/redis-commander/values.yaml b/k8s/helm-chart/redis-commander/values.yaml index 94f56710..3accc16f 100644 --- a/k8s/helm-chart/redis-commander/values.yaml +++ b/k8s/helm-chart/redis-commander/values.yaml @@ -85,6 +85,11 @@ service: type: ClusterIP # -- External port where service is available port: 80 + # -- Add additional annotations for the service spec + # Example: + # 'my.custom.annotation: value' + annotations: {} + # my.custom.annotation: value ingress: # -- Enable Ingress for the service