From fc0414e2cad960127eecf46cd0950c02f98ce7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Flod=C3=A9n?= Date: Fri, 10 Aug 2018 10:27:13 +0200 Subject: [PATCH] [stable/mongodb] Add service annotations (#7082) * mongodb: Add option to set service annotations Fixes #6941 * mongodb: Bump version to 4.1.1 --- stable/mongodb/Chart.yaml | 2 +- stable/mongodb/README.md | 1 + stable/mongodb/templates/headless-svc-rs.yaml | 4 ++++ stable/mongodb/templates/svc-primary-rs.yaml | 4 ++++ stable/mongodb/templates/svc-standalone.yaml | 4 ++++ stable/mongodb/values-production.yaml | 1 + stable/mongodb/values.yaml | 1 + 7 files changed, 16 insertions(+), 1 deletion(-) diff --git a/stable/mongodb/Chart.yaml b/stable/mongodb/Chart.yaml index fb4590b379..77c2656820 100644 --- a/stable/mongodb/Chart.yaml +++ b/stable/mongodb/Chart.yaml @@ -1,5 +1,5 @@ name: mongodb -version: 4.1.0 +version: 4.1.1 appVersion: 4.0.1 description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. keywords: diff --git a/stable/mongodb/README.md b/stable/mongodb/README.md index ca3d96d5f3..50d6063c32 100644 --- a/stable/mongodb/README.md +++ b/stable/mongodb/README.md @@ -57,6 +57,7 @@ The following table lists the configurable parameters of the MongoDB chart and t | `mongodbPassword` | MongoDB custom user password | `random alhpanumeric string (10)` | | `mongodbDatabase` | Database to create | `nil` | | `mongodbExtraFlags` | MongoDB additional command line flags | [] | +| `service.annotations` | Kubernetes service annotations | `{}` | | `service.type` | Kubernetes Service type | `ClusterIP` | | `service.nodePort` | Port to bind to for NodePort service type | `nil` | | `port` | MongoDB service port | `27017` | diff --git a/stable/mongodb/templates/headless-svc-rs.yaml b/stable/mongodb/templates/headless-svc-rs.yaml index cc0705df84..29fcf34cc1 100644 --- a/stable/mongodb/templates/headless-svc-rs.yaml +++ b/stable/mongodb/templates/headless-svc-rs.yaml @@ -8,6 +8,10 @@ metadata: chart: {{ template "mongodb.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} spec: type: ClusterIP clusterIP: None diff --git a/stable/mongodb/templates/svc-primary-rs.yaml b/stable/mongodb/templates/svc-primary-rs.yaml index 72fcfe31cb..fd440c839d 100644 --- a/stable/mongodb/templates/svc-primary-rs.yaml +++ b/stable/mongodb/templates/svc-primary-rs.yaml @@ -8,6 +8,10 @@ metadata: chart: {{ template "mongodb.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} spec: type: {{ .Values.service.type }} ports: diff --git a/stable/mongodb/templates/svc-standalone.yaml b/stable/mongodb/templates/svc-standalone.yaml index f286cef840..4ca9443179 100644 --- a/stable/mongodb/templates/svc-standalone.yaml +++ b/stable/mongodb/templates/svc-standalone.yaml @@ -8,6 +8,10 @@ metadata: chart: {{ template "mongodb.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} spec: type: {{ .Values.service.type }} ports: diff --git a/stable/mongodb/values-production.yaml b/stable/mongodb/values-production.yaml index 5fdb4bdb68..cd59680c1d 100644 --- a/stable/mongodb/values-production.yaml +++ b/stable/mongodb/values-production.yaml @@ -57,6 +57,7 @@ securityContext: ## Kubernetes service type service: + annotations: {} type: ClusterIP port: 27017 diff --git a/stable/mongodb/values.yaml b/stable/mongodb/values.yaml index 714c7965c3..0c67f1e687 100644 --- a/stable/mongodb/values.yaml +++ b/stable/mongodb/values.yaml @@ -57,6 +57,7 @@ securityContext: ## Kubernetes service type service: + annotations: {} type: ClusterIP port: 27017