From 44ef3e6f35eb61481a7f77911787fdca1a405b8c Mon Sep 17 00:00:00 2001 From: guptaarvindk Date: Tue, 23 Oct 2018 11:01:31 -0700 Subject: [PATCH] Mongodb/ipv6 (#7674) * suport for: - headless services and static clusterIP - option to disable the IPV6 even in standalone deploymnet. Signed-off-by: Arvind Gupta * documentation for previous commit (clusterIP, headless service, ipv6 disable) Signed-off-by: Arvind Gupta * bumped chart version. fixed typo in values.yaml Signed-off-by: Arvind Gupta --- stable/mongodb/Chart.yaml | 2 +- stable/mongodb/README.md | 1 + stable/mongodb/templates/deployment-standalone.yaml | 6 ++++++ stable/mongodb/templates/svc-primary-rs.yaml | 3 +++ stable/mongodb/templates/svc-standalone.yaml | 3 +++ 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 318bdfde69..4362747e0f 100644 --- a/stable/mongodb/Chart.yaml +++ b/stable/mongodb/Chart.yaml @@ -1,5 +1,5 @@ name: mongodb -version: 4.6.1 +version: 4.6.2 appVersion: 4.0.3 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 1b9d003d2c..eedbb64797 100644 --- a/stable/mongodb/README.md +++ b/stable/mongodb/README.md @@ -63,6 +63,7 @@ The following table lists the configurable parameters of the MongoDB chart and t | `mongodbExtraFlags` | MongoDB additional command line flags | [] | | `service.annotations` | Kubernetes service annotations | `{}` | | `service.type` | Kubernetes Service type | `ClusterIP` | +| `service.clusterIP` | Static clusterIP or None for headless services | `nil` | | `service.nodePort` | Port to bind to for NodePort service type | `nil` | | `port` | MongoDB service port | `27017` | | `replicaSet.enabled` | Switch to enable/disable replica set configuration | `false` | diff --git a/stable/mongodb/templates/deployment-standalone.yaml b/stable/mongodb/templates/deployment-standalone.yaml index d8ff01be35..6311ddd33a 100644 --- a/stable/mongodb/templates/deployment-standalone.yaml +++ b/stable/mongodb/templates/deployment-standalone.yaml @@ -78,6 +78,12 @@ spec: {{- end }} - name: MONGODB_EXTRA_FLAGS value: {{ default "" .Values.mongodbExtraFlags | join " " }} + - name: MONGODB_ENABLE_IPV6 + {{- if .Values.mongodbEnableIPv6 }} + value: "yes" + {{- else }} + value: "no" + {{- end }} ports: - name: mongodb containerPort: 27017 diff --git a/stable/mongodb/templates/svc-primary-rs.yaml b/stable/mongodb/templates/svc-primary-rs.yaml index fd440c839d..ccc73ecb35 100644 --- a/stable/mongodb/templates/svc-primary-rs.yaml +++ b/stable/mongodb/templates/svc-primary-rs.yaml @@ -14,6 +14,9 @@ metadata: {{- end }} spec: type: {{ .Values.service.type }} + {{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }} + clusterIP: {{ .Values.service.clusterIP }} + {{- end }} ports: - name: mongodb port: 27017 diff --git a/stable/mongodb/templates/svc-standalone.yaml b/stable/mongodb/templates/svc-standalone.yaml index 4ca9443179..00eecc6b1e 100644 --- a/stable/mongodb/templates/svc-standalone.yaml +++ b/stable/mongodb/templates/svc-standalone.yaml @@ -14,6 +14,9 @@ metadata: {{- end }} spec: type: {{ .Values.service.type }} + {{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }} + clusterIP: {{ .Values.service.clusterIP }} + {{- end }} ports: - name: mongodb port: 27017 diff --git a/stable/mongodb/values-production.yaml b/stable/mongodb/values-production.yaml index 4f86e27c4f..9437401ec9 100644 --- a/stable/mongodb/values-production.yaml +++ b/stable/mongodb/values-production.yaml @@ -73,6 +73,7 @@ clusterDomain: cluster.local service: annotations: {} type: ClusterIP + # clusterIP: None port: 27017 ## Specify the nodePort value for the LoadBalancer and NodePort service types. diff --git a/stable/mongodb/values.yaml b/stable/mongodb/values.yaml index 3f496731c9..b602fc13dc 100644 --- a/stable/mongodb/values.yaml +++ b/stable/mongodb/values.yaml @@ -74,6 +74,7 @@ clusterDomain: cluster.local service: annotations: {} type: ClusterIP + # clusterIP: None port: 27017 ## Specify the nodePort value for the LoadBalancer and NodePort service types.