From 11af42a61ce8ab0c050977dcf4512f4675cb11fb Mon Sep 17 00:00:00 2001 From: Tomas Pizarro Date: Thu, 17 Jan 2019 10:50:28 +0100 Subject: [PATCH] [stable/mongodb] Add option to disable mongodb system log (#10721) Signed-off-by: tompizmor --- stable/mongodb/Chart.yaml | 2 +- stable/mongodb/README.md | 143 +++++++++--------- .../templates/deployment-standalone.yaml | 8 +- .../templates/statefulset-arbiter-rs.yaml | 8 +- .../templates/statefulset-primary-rs.yaml | 8 +- .../templates/statefulset-secondary-rs.yaml | 8 +- stable/mongodb/values-production.yaml | 5 +- stable/mongodb/values.yaml | 5 +- 8 files changed, 107 insertions(+), 80 deletions(-) diff --git a/stable/mongodb/Chart.yaml b/stable/mongodb/Chart.yaml index 5a7e347f16..e4ad9b1817 100644 --- a/stable/mongodb/Chart.yaml +++ b/stable/mongodb/Chart.yaml @@ -1,5 +1,5 @@ name: mongodb -version: 5.1.4 +version: 5.2.0 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 f7c8d53b0f..73547fe192 100644 --- a/stable/mongodb/README.md +++ b/stable/mongodb/README.md @@ -45,77 +45,78 @@ The command removes all the Kubernetes components associated with the chart and The following table lists the configurable parameters of the MongoDB chart and their default values. -| Parameter | Description | Default | -| --------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------- | -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `image.registry` | MongoDB image registry | `docker.io` | -| `image.repository` | MongoDB Image name | `bitnami/mongodb` | -| `image.tag` | MongoDB Image tag | `{VERSION}` | -| `image.pullPolicy` | Image pull policy | `Always` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `usePassword` | Enable password authentication | `true` | -| `existingSecret` | Existing secret with MongoDB credentials | `nil` | -| `mongodbRootPassword` | MongoDB admin password | `random alphanumeric string (10)` | -| `mongodbUsername` | MongoDB custom user | `nil` | -| `mongodbPassword` | MongoDB custom user password | `random alphanumeric string (10)` | -| `mongodbDatabase` | Database to create | `nil` | -| `mongodbEnableIPv6` | Switch to enable/disable IPv6 on MongoDB | `true` | -| `mongodbSystemLogVerbosity` | MongoDB systen log verbosity level | `0` | -| `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` | -| `replicaSet.name` | Name of the replica set | `rs0` | -| `replicaSet.useHostnames` | Enable DNS hostnames in the replica set config | `true` | -| `replicaSet.key` | Key used for authentication in the replica set | `nil` | -| `replicaSet.replicas.secondary` | Number of secondary nodes in the replica set | `1` | -| `replicaSet.replicas.arbiter` | Number of arbiter nodes in the replica set | `1` | -| `replicaSet.pdb.minAvailable.primary` | PDB for the MongoDB Primary nodes | `1` | -| `replicaSet.pdb.minAvailable.secondary` | PDB for the MongoDB Secondary nodes | `1` | -| `replicaSet.pdb.minAvailable.arbiter` | PDB for the MongoDB Arbiter nodes | `1` | -| `podAnnotations` | Annotations to be added to pods | {} | -| `podLabels` | Additional labels for the pod(s). | {} | -| `resources` | Pod resources | {} | -| `nodeSelector` | Node labels for pod assignment | {} | -| `affinity` | Affinity for pod assignment | {} | -| `tolerations` | Toleration labels for pod assignment | {} | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `persistence.enabled` | Use a PVC to persist data | `true` | -| `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) | -| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` | -| `persistence.size` | Size of data volume | `8Gi` | -| `persistence.annotations` | Persistent Volume annotations | `{}` | -| `persistence.existingClaim` | Name of an existing PVC to use (avoids creating one if this is given) | `nil` | -| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `30` | -| `livenessProbe.periodSeconds` | How often to perform the probe | `10` | -| `livenessProbe.timeoutSeconds` | When the probe times out | `5` | -| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` | -| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` | -| `readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | `5` | -| `readinessProbe.periodSeconds` | How often to perform the probe | `10` | -| `readinessProbe.timeoutSeconds` | When the probe times out | `5` | -| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` | -| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` | -| `configmap` | MongoDB configuration file to be used | `nil` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | MongoDB exporter image registry | `docker.io` | -| `metrics.image.repository` | MongoDB exporter image name | `forekshub/percona-mongodb-exporter` | -| `metrics.image.tag` | MongoDB exporter image tag | `latest` | -| `metrics.image.pullPolicy` | Image pull policy | `IfNotPresent` | -| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `metrics.podAnnotations` | Additional annotations for Metrics exporter pod | {} | -| `metrics.resources` | Exporter resource requests/limit | Memory: `256Mi`, CPU: `100m` | -| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator | `false` | -| `metrics.serviceMonitor.additionalLabels` | Used to pass Labels that are required by the Installed Prometheus Operator | {} | -| `metrics.serviceMonitor.relabellings` | Specify Metric Relabellings to add to the scrape endpoint | `nil` | -| `metrics.serviceMonitor.alerting.rules` | Define individual alerting rules as required | {} | -| `metrics.serviceMonitor.alerting.additionalLabels` | Used to pass Labels that are required by the Installed Prometheus Operator | {} | +| Parameter | Description | Default | +| -------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------- | +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `image.registry` | MongoDB image registry | `docker.io` | +| `image.repository` | MongoDB Image name | `bitnami/mongodb` | +| `image.tag` | MongoDB Image tag | `{VERSION}` | +| `image.pullPolicy` | Image pull policy | `Always` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `usePassword` | Enable password authentication | `true` | +| `existingSecret` | Existing secret with MongoDB credentials | `nil` | +| `mongodbRootPassword` | MongoDB admin password | `random alphanumeric string (10)` | +| `mongodbUsername` | MongoDB custom user | `nil` | +| `mongodbPassword` | MongoDB custom user password | `random alphanumeric string (10)` | +| `mongodbDatabase` | Database to create | `nil` | +| `mongodbEnableIPv6` | Switch to enable/disable IPv6 on MongoDB | `true` | +| `mongodbSystemLogVerbosity` | MongoDB systen log verbosity level | `0` | +| `mongodbDisableSystemLog` | Whether to disable MongoDB system log or not | `false` | +| `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` | +| `replicaSet.name` | Name of the replica set | `rs0` | +| `replicaSet.useHostnames` | Enable DNS hostnames in the replica set config | `true` | +| `replicaSet.key` | Key used for authentication in the replica set | `nil` | +| `replicaSet.replicas.secondary` | Number of secondary nodes in the replica set | `1` | +| `replicaSet.replicas.arbiter` | Number of arbiter nodes in the replica set | `1` | +| `replicaSet.pdb.minAvailable.primary` | PDB for the MongoDB Primary nodes | `1` | +| `replicaSet.pdb.minAvailable.secondary` | PDB for the MongoDB Secondary nodes | `1` | +| `replicaSet.pdb.minAvailable.arbiter` | PDB for the MongoDB Arbiter nodes | `1` | +| `podAnnotations` | Annotations to be added to pods | {} | +| `podLabels` | Additional labels for the pod(s). | {} | +| `resources` | Pod resources | {} | +| `nodeSelector` | Node labels for pod assignment | {} | +| `affinity` | Affinity for pod assignment | {} | +| `tolerations` | Toleration labels for pod assignment | {} | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `persistence.enabled` | Use a PVC to persist data | `true` | +| `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) | +| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` | +| `persistence.size` | Size of data volume | `8Gi` | +| `persistence.annotations` | Persistent Volume annotations | `{}` | +| `persistence.existingClaim` | Name of an existing PVC to use (avoids creating one if this is given) | `nil` | +| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `30` | +| `livenessProbe.periodSeconds` | How often to perform the probe | `10` | +| `livenessProbe.timeoutSeconds` | When the probe times out | `5` | +| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` | +| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` | +| `readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | `5` | +| `readinessProbe.periodSeconds` | How often to perform the probe | `10` | +| `readinessProbe.timeoutSeconds` | When the probe times out | `5` | +| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` | +| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` | +| `configmap` | MongoDB configuration file to be used | `nil` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | MongoDB exporter image registry | `docker.io` | +| `metrics.image.repository` | MongoDB exporter image name | `forekshub/percona-mongodb-exporter` | +| `metrics.image.tag` | MongoDB exporter image tag | `latest` | +| `metrics.image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `metrics.podAnnotations` | Additional annotations for Metrics exporter pod | {} | +| `metrics.resources` | Exporter resource requests/limit | Memory: `256Mi`, CPU: `100m` | +| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator | `false` | +| `metrics.serviceMonitor.additionalLabels` | Used to pass Labels that are required by the Installed Prometheus Operator | {} | +| `metrics.serviceMonitor.relabellings` | Specify Metric Relabellings to add to the scrape endpoint | `nil` | +| `metrics.serviceMonitor.alerting.rules` | Define individual alerting rules as required | {} | +| `metrics.serviceMonitor.alerting.additionalLabels` | Used to pass Labels that are required by the Installed Prometheus Operator | {} | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/stable/mongodb/templates/deployment-standalone.yaml b/stable/mongodb/templates/deployment-standalone.yaml index 2047c2aaa1..7daf1042f0 100644 --- a/stable/mongodb/templates/deployment-standalone.yaml +++ b/stable/mongodb/templates/deployment-standalone.yaml @@ -83,7 +83,13 @@ spec: key: mongodb-password {{- end }} - name: MONGODB_SYSTEM_LOG_VERBOSITY - value: {{ .Values.mongodbSystemLogVerbosity | quote}} + value: {{ .Values.mongodbSystemLogVerbosity | quote }} + - name: MONGODB_DISABLE_SYSTEM_LOG + {{- if .Values.mongodbDisableSystemLog }} + value: "yes" + {{- else }} + value: "no" + {{- end }} {{- if .Values.mongodbDatabase }} - name: MONGODB_DATABASE value: {{ .Values.mongodbDatabase | quote }} diff --git a/stable/mongodb/templates/statefulset-arbiter-rs.yaml b/stable/mongodb/templates/statefulset-arbiter-rs.yaml index d4b7d524c5..91a91a23cd 100644 --- a/stable/mongodb/templates/statefulset-arbiter-rs.yaml +++ b/stable/mongodb/templates/statefulset-arbiter-rs.yaml @@ -67,7 +67,13 @@ spec: value: "1" {{- end }} - name: MONGODB_SYSTEM_LOG_VERBOSITY - value: {{ .Values.mongodbSystemLogVerbosity | quote}} + value: {{ .Values.mongodbSystemLogVerbosity | quote }} + - name: MONGODB_DISABLE_SYSTEM_LOG + {{- if .Values.mongodbDisableSystemLog }} + value: "yes" + {{- else }} + value: "no" + {{- end }} - name: MONGODB_POD_NAME valueFrom: fieldRef: diff --git a/stable/mongodb/templates/statefulset-primary-rs.yaml b/stable/mongodb/templates/statefulset-primary-rs.yaml index 15320750cb..653bc40144 100644 --- a/stable/mongodb/templates/statefulset-primary-rs.yaml +++ b/stable/mongodb/templates/statefulset-primary-rs.yaml @@ -72,7 +72,13 @@ spec: value: "1" {{- end }} - name: MONGODB_SYSTEM_LOG_VERBOSITY - value: {{ .Values.mongodbSystemLogVerbosity | quote}} + value: {{ .Values.mongodbSystemLogVerbosity | quote }} + - name: MONGODB_DISABLE_SYSTEM_LOG + {{- if .Values.mongodbDisableSystemLog }} + value: "yes" + {{- else }} + value: "no" + {{- end }} - name: MONGODB_POD_NAME valueFrom: fieldRef: diff --git a/stable/mongodb/templates/statefulset-secondary-rs.yaml b/stable/mongodb/templates/statefulset-secondary-rs.yaml index c846303846..1956844129 100644 --- a/stable/mongodb/templates/statefulset-secondary-rs.yaml +++ b/stable/mongodb/templates/statefulset-secondary-rs.yaml @@ -73,7 +73,13 @@ spec: value: "1" {{- end }} - name: MONGODB_SYSTEM_LOG_VERBOSITY - value: {{ .Values.mongodbSystemLogVerbosity | quote}} + value: {{ .Values.mongodbSystemLogVerbosity | quote }} + - name: MONGODB_DISABLE_SYSTEM_LOG + {{- if .Values.mongodbDisableSystemLog }} + value: "yes" + {{- else }} + value: "no" + {{- end }} - name: MONGODB_POD_NAME valueFrom: fieldRef: diff --git a/stable/mongodb/values-production.yaml b/stable/mongodb/values-production.yaml index da6ad0542e..42e073d740 100644 --- a/stable/mongodb/values-production.yaml +++ b/stable/mongodb/values-production.yaml @@ -55,10 +55,11 @@ usePassword: true ## mongodbEnableIPv6: true -## MongoDB System Log Verbosity Level -## ref: https://github.com/bitnami/bitnami-docker-mongodb#increase-system-log-verbosity-level +## MongoDB System Log configuration +## ref: https://github.com/bitnami/bitnami-docker-mongodb#configuring-system-log-verbosity-level ## mongodbSystemLogVerbosity: 0 +mongodbDisableSystemLog: false ## MongoDB additional command line flags ## diff --git a/stable/mongodb/values.yaml b/stable/mongodb/values.yaml index 23c3233b77..aa1acf0b0b 100644 --- a/stable/mongodb/values.yaml +++ b/stable/mongodb/values.yaml @@ -56,10 +56,11 @@ usePassword: true ## mongodbEnableIPv6: true -## MongoDB System Log Verbosity Level -## ref: https://github.com/bitnami/bitnami-docker-mongodb#increase-system-log-verbosity-level +## MongoDB System Log configuration +## ref: https://github.com/bitnami/bitnami-docker-mongodb#configuring-system-log-verbosity-level ## mongodbSystemLogVerbosity: 0 +mongodbDisableSystemLog: false ## MongoDB additional command line flags ##