diff --git a/.vib/node/vib-verify.json b/.vib/node/vib-verify.json index ed47dc1734..9a5b1da21d 100644 --- a/.vib/node/vib-verify.json +++ b/.vib/node/vib-verify.json @@ -22,7 +22,7 @@ "url": "{SHA_ARCHIVE}", "path": "/bitnami/node" }, - "runtime_parameters": "Im1vbmdvZGIiOgogICJhdXRoIjoKICAgICJyb290UGFzc3dvcmQiOiAiQU9pWTlOZjEiCiJzZXJ2aWNlIjoKICAicG9ydCI6IDgwCiAgInR5cGUiOiAiTG9hZEJhbGFuY2VyIg==", + "runtime_parameters": "Im1vbmdvZGIiOgogICJhdXRoIjoKICAgICJyb290UGFzc3dvcmQiOiAiQU9pWTlOZjEiCiJzZXJ2aWNlIjoKICAicG9ydHMiOgogICAgImh0dHAiOiA4MAogICJ0eXBlIjogIkxvYWRCYWxhbmNlciIK", "target_platform": { "target_platform_id": "{VIB_ENV_ALTERNATIVE_TARGET_PLATFORM}", "size": { diff --git a/bitnami/node/Chart.lock b/bitnami/node/Chart.lock index 88ddfb3f1a..fdd13a0ef5 100644 --- a/bitnami/node/Chart.lock +++ b/bitnami/node/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: mongodb repository: https://charts.bitnami.com/bitnami - version: 11.2.0 + version: 12.0.0 - name: common repository: https://charts.bitnami.com/bitnami version: 1.13.1 -digest: sha256:dd11dd0c8c55d6ac164b4dcd804c87b91ca5dc993b67c0ddfa8c856c0cb07112 -generated: "2022-04-27T03:55:16.43353346Z" +digest: sha256:26cd58b8158347ebf7317fc67d2c0bd24516264c8f997ad3484256fa5b1221b6 +generated: "2022-04-29T17:34:40.386699+02:00" diff --git a/bitnami/node/Chart.yaml b/bitnami/node/Chart.yaml index 2d62b077af..7b414415ae 100644 --- a/bitnami/node/Chart.yaml +++ b/bitnami/node/Chart.yaml @@ -6,7 +6,7 @@ dependencies: - condition: mongodb.enabled name: mongodb repository: https://charts.bitnami.com/bitnami - version: 11.x.x + version: 12.x.x - name: common repository: https://charts.bitnami.com/bitnami tags: @@ -28,4 +28,4 @@ name: node sources: - https://github.com/bitnami/bitnami-docker-node - http://nodejs.org/ -version: 17.1.0 +version: 18.0.0 diff --git a/bitnami/node/README.md b/bitnami/node/README.md index 369c5a97f0..e56035ca94 100644 --- a/bitnami/node/README.md +++ b/bitnami/node/README.md @@ -73,6 +73,7 @@ The command removes all the Kubernetes components associated with the chart and | `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `""` | | `nameOverride` | String to partially override node.fullname template (will maintain the release name) | `""` | | `fullnameOverride` | String to fully override node.fullname template | `""` | +| `namespaceOverride` | Override namespace for resources | `""` | | `commonLabels` | Add labels to all the deployed resources | `{}` | | `commonAnnotations` | Add annotations to all the deployed resources | `{}` | @@ -103,82 +104,91 @@ The command removes all the Kubernetes components associated with the chart and ### Node deployment parameters -| Name | Description | Value | -| --------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------- | -| `image.registry` | NodeJS image registry | `docker.io` | -| `image.repository` | NodeJS image repository | `bitnami/node` | -| `image.tag` | NodeJS image tag (immutable tags are recommended) | `16.15.0-debian-10-r0` | -| `image.pullPolicy` | NodeJS image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | -| `replicaCount` | Specify the number of replicas for the application | `1` | -| `applicationPort` | Specify the port where your application will be running | `3000` | -| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` | -| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `nodeAffinityPreset.key` | Node label key to match Ignored if `affinity` is set. | `""` | -| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` | -| `affinity` | Affinity for pod assignment. Evaluated as a template. | `{}` | -| `nodeSelector` | Node labels for pod assignment. Evaluated as a template. | `{}` | -| `tolerations` | Tolerations for pod assignment. Evaluated as a template. | `{}` | -| `podAnnotations` | Additional pod annotations | `{}` | -| `podLabels` | Additional labels for Node pods | `{}` | -| `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template) | `[]` | -| `livenessProbe.enabled` | Enable livenessProbe | `true` | -| `livenessProbe.path` | Request path for livenessProbe | `/` | -| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `60` | -| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` | -| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | -| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` | -| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | -| `readinessProbe.enabled` | Enable readinessProbe | `true` | -| `readinessProbe.path` | Request path for readinessProbe | `/` | -| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` | -| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` | -| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` | -| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` | -| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | -| `startupProbe.enabled` | Enable startupProbe | `false` | -| `startupProbe.path` | Request path for startupProbe | `/` | -| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` | -| `startupProbe.periodSeconds` | Period seconds for startupProbe | `20` | -| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` | -| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `6` | -| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` | -| `customLivenessProbe` | Override default liveness probe | `{}` | -| `customReadinessProbe` | Override default readiness probe | `{}` | -| `customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | -| `priorityClassName` | Node priorityClassName | `""` | -| `lifecycleHooks` | lifecycleHooks for the Node container to automate configuration before or after startup. | `{}` | -| `sidecars` | Add sidecars to the Node pods | `[]` | -| `initContainers` | Add init containers to the Node pods | `[]` | -| `extraVolumes` | Extra volumes to add to the deployment | `[]` | -| `extraVolumeMounts` | Extra volume mounts to add to the container | `[]` | -| `serviceAccount.create` | Enable creation of ServiceAccount for node pod | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` | -| `serviceAccount.annotations` | Annotations for service account. Evaluated as a template. | `{}` | -| `serviceAccount.automountServiceAccountToken` | Whether to auto mount the service account token | `false` | -| `containerSecurityContext.enabled` | Node Container securityContext | `true` | -| `containerSecurityContext.runAsUser` | User ID for the Node container | `1001` | -| `containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` | -| `podSecurityContext.enabled` | Enable security context for Node pods | `true` | -| `podSecurityContext.fsGroup` | Group ID for the volumes of the pod | `1001` | -| `resources.limits` | The resources limits for the Node container | `{}` | -| `resources.requests` | The requested resources for the Node container | `{}` | +| Name | Description | Value | +| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------------- | +| `image.registry` | NodeJS image registry | `docker.io` | +| `image.repository` | NodeJS image repository | `bitnami/node` | +| `image.tag` | NodeJS image tag (immutable tags are recommended) | `16.15.0-debian-10-r0` | +| `image.pullPolicy` | NodeJS image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | +| `image.debug` | Set to true if you would like to see extra information on logs | `false` | +| `replicaCount` | Specify the number of replicas for the application | `1` | +| `updateStrategy.type` | Strategy to use to replace existing pods. | `RollingUpdate` | +| `containerPorts.http` | Specify the port where your application will be running | `3000` | +| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` | +| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `nodeAffinityPreset.key` | Node label key to match Ignored if `affinity` is set. | `""` | +| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` | +| `affinity` | Affinity for pod assignment. Evaluated as a template. | `{}` | +| `nodeSelector` | Node labels for pod assignment. Evaluated as a template. | `{}` | +| `tolerations` | Tolerations for pod assignment. Evaluated as a template. | `{}` | +| `podAnnotations` | Additional pod annotations | `{}` | +| `podLabels` | Additional labels for Node pods | `{}` | +| `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template) | `[]` | +| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` | +| `diagnosticMode.command` | Command to override all containers in the the deployment(s)/statefulset(s) | `["sleep"]` | +| `diagnosticMode.args` | Args to override all containers in the the deployment(s)/statefulset(s) | `["infinity"]` | +| `livenessProbe.enabled` | Enable livenessProbe | `true` | +| `livenessProbe.path` | Request path for livenessProbe | `/` | +| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `60` | +| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` | +| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | +| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` | +| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | +| `readinessProbe.enabled` | Enable readinessProbe | `true` | +| `readinessProbe.path` | Request path for readinessProbe | `/` | +| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` | +| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` | +| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` | +| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` | +| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `startupProbe.enabled` | Enable startupProbe | `false` | +| `startupProbe.path` | Request path for startupProbe | `/` | +| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `5` | +| `startupProbe.periodSeconds` | Period seconds for startupProbe | `3` | +| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` | +| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `15` | +| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` | +| `customLivenessProbe` | Override default liveness probe | `{}` | +| `customReadinessProbe` | Override default readiness probe | `{}` | +| `customStartupProbe` | Override default startup probe | `{}` | +| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `{}` | +| `priorityClassName` | Node priorityClassName | `""` | +| `schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` | +| `terminationGracePeriodSeconds` | Seconds Airflow web pod needs to terminate gracefully | `""` | +| `lifecycleHooks` | lifecycleHooks for the Node container to automate configuration before or after startup. | `{}` | +| `sidecars` | Add sidecars to the Node pods | `[]` | +| `initContainers` | Add init containers to the Node pods | `[]` | +| `extraVolumes` | Extra volumes to add to the deployment | `[]` | +| `extraVolumeMounts` | Extra volume mounts to add to the container | `[]` | +| `serviceAccount.create` | Enable creation of ServiceAccount for node pod | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` | +| `serviceAccount.annotations` | Annotations for service account. Evaluated as a template. | `{}` | +| `serviceAccount.automountServiceAccountToken` | Whether to auto mount the service account token | `false` | +| `containerSecurityContext.enabled` | Node Container securityContext | `true` | +| `containerSecurityContext.runAsUser` | User ID for the Node container | `1001` | +| `containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` | +| `podSecurityContext.enabled` | Enable security context for Node pods | `true` | +| `podSecurityContext.fsGroup` | Group ID for the volumes of the pod | `1001` | +| `resources.limits` | The resources limits for the Node container | `{}` | +| `resources.requests` | The requested resources for the Node container | `{}` | ### Node application parameters -| Name | Description | Value | -| ------------------------------ | --------------------------------------------------- | -------------------------------------------- | -| `git.image.registry` | Git image registry | `docker.io` | -| `git.image.repository` | Git image repository | `bitnami/git` | -| `git.image.tag` | Git image tag (immutable tags are recommended) | `2.36.0-debian-10-r8` | -| `git.image.pullPolicy` | Git image pull policy | `IfNotPresent` | -| `git.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | -| `git.extraVolumeMounts` | Add extra volume mounts for the Git container | `[]` | -| `getAppFromExternalRepository` | Enable to download app from external git repository | `true` | -| `repository` | Git repository http/https url | `https://github.com/bitnami/sample-mean.git` | -| `revision` | Git repository revision to checkout | `master` | +| Name | Description | Value | +| ------------------------------ | -------------------------------------------------------------- | -------------------------------------------- | +| `git.image.registry` | Git image registry | `docker.io` | +| `git.image.repository` | Git image repository | `bitnami/git` | +| `git.image.tag` | Git image tag (immutable tags are recommended) | `2.36.0-debian-10-r8` | +| `git.image.pullPolicy` | Git image pull policy | `IfNotPresent` | +| `git.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | +| `git.image.debug` | Set to true if you would like to see extra information on logs | `false` | +| `git.extraVolumeMounts` | Add extra volume mounts for the Git container | `[]` | +| `getAppFromExternalRepository` | Enable to download app from external git repository | `true` | +| `repository` | Git repository http/https url | `https://github.com/bitnami/sample-mean.git` | +| `revision` | Git repository revision to checkout | `master` | ### Volume permissions parameters @@ -197,13 +207,17 @@ The command removes all the Kubernetes components associated with the chart and ### Persistence parameters -| Name | Description | Value | -| -------------------------- | ------------------------------- | --------------- | -| `persistence.enabled` | Enable persistence using PVC | `false` | -| `persistence.path` | Path to persisted directory | `/app/data` | -| `persistence.storageClass` | Persistent Volume Storage Class | `""` | -| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` | -| `persistence.size` | PVC Storage Request | `1Gi` | +| Name | Description | Value | +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | +| `persistence.enabled` | Enable persistence using PVC | `false` | +| `persistence.mountPath` | Path where the volume will be mount at. | `/app/data` | +| `persistence.subPath` | Subdirectory of the volume to mount | `""` | +| `persistence.existingClaim` | Name of an existing PVC to use | `""` | +| `persistence.resourcePolicy` | Setting it to "keep" to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted | `""` | +| `persistence.storageClass` | Persistent Volume Storage Class | `""` | +| `persistence.accessModes` | PVC Access Modes | `["ReadWriteOnce"]` | +| `persistence.size` | PVC Storage Request | `1Gi` | +| `persistence.annotations` | Annotations for the PVC | `{}` | ### Traffic exposure parameters @@ -211,20 +225,25 @@ The command removes all the Kubernetes components associated with the chart and | Name | Description | Value | | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | | `service.type` | Kubernetes Service type | `ClusterIP` | -| `service.port` | Kubernetes Service port | `80` | +| `service.ports.http` | Kubernetes Service port | `80` | | `service.clusterIP` | Service Cluster IP | `""` | | `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` | -| `service.nodePort` | NodePort if Service type is `LoadBalancer` or `NodePort` | `""` | +| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | +| `service.nodePorts.http` | NodePort if Service type is `LoadBalancer` or `NodePort` | `""` | +| `service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` | | `service.loadBalancerIP` | LoadBalancer IP if Service type is `LoadBalancer` | `""` | | `service.loadBalancerSourceRanges` | In order to limit which client IP's can access the Network Load Balancer, specify loadBalancerSourceRanges | `[]` | +| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | | `service.annotations` | Annotations for the Service | `{}` | | `ingress.enabled` | Set to true to enable ingress record generation | `false` | +| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` | | `ingress.pathType` | Ingress path type | `ImplementationSpecific` | | `ingress.apiVersion` | Override API Version (automatically detected if not set) | `""` | | `ingress.hostname` | When the ingress is enabled, a host pointing to this will be created | `node.local` | | `ingress.path` | The Path to Node.js. You may need to set this to '/*' in order to use this with ALB ingress controllers. | `/` | | `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` | | `ingress.tls` | Enable TLS configuration for the hostname defined at ingress.hostname parameter | `false` | +| `ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` | | `ingress.extraHosts` | The list of additional hostnames to be covered with this ingress record. | `[]` | | `ingress.extraPaths` | Any additional arbitrary paths that may need to be added to the ingress under the main host. | `[]` | | `ingress.extraTls` | The tls configuration for additional hostnames to be covered with this ingress record. | `[]` | @@ -384,6 +403,22 @@ Find more information about how to deal with common errors related to Bitnami's ## Upgrading +### To 18.0.0 + +This major release renames several values in this chart and adds missing features, in order to be inline with the rest of assets in the Bitnami charts repository. + +Affected values: + +- `applicationPort` is replaced by `containerPorts.http` +- `service.port` is renamed to `service.ports.http` +- `service.nodePort` is renamed to `service.nodePorts.http` +- `accessMode` is replaced by `accessModes` (a list instead of a simple string) +- `persistence.path` is renamed to `persistence.mountPath` (a list instead of a simple string) + +Also MongoDB® subchart container images were updated to 5.0.x and it can affect compatibility with older versions of MongoDB®. + +- https://github.com/bitnami/charts/tree/master/bitnami/mongodb#to-1200 + ### To 17.0.0 In this version, the mongodb-exporter bundled as part of the bitnami/mongodb dependency was updated to a new version which, even it is not a major change, can contain breaking changes (from `0.11.X` to `0.30.X`). diff --git a/bitnami/node/templates/NOTES.txt b/bitnami/node/templates/NOTES.txt index ba9a1a19a4..9819d10acb 100644 --- a/bitnami/node/templates/NOTES.txt +++ b/bitnami/node/templates/NOTES.txt @@ -6,37 +6,45 @@ APP VERSION: {{ .Chart.AppVersion }} {{- $dbSecretName := include "node.mongodb.fullname" . -}} +{{- if .Values.diagnosticMode.enabled }} +The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with: + + command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }} + +Get the list of pods by executing: + + kubectl get pods --namespace {{ include "common.names.namespace" . }} -l app.kubernetes.io/instance={{ .Release.Name }} + +Access the pod you want to debug by executing + + kubectl exec --namespace {{ include "common.names.namespace" . }} -ti -- bash + +{{- else }} + 1. Get the URL of your Node app by running: {{- if eq .Values.service.type "NodePort" }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "common.names.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + export NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "common.names.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") echo "Node app URL: http://$NODE_IP:$NODE_PORT/" {{- else if eq .Values.service.type "LoadBalancer" }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - Watch the status with: 'kubectl get svc -w {{ template "common.names.fullname" . }} --namespace {{ .Release.Namespace }}' + Watch the status with: 'kubectl get svc -w {{ template "common.names.fullname" . }} --namespace {{ include "common.names.namespace" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . }} {{ template "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") echo "Node app URL: http://$SERVICE_IP/" {{- else if eq .Values.service.type "ClusterIP" }} - kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "common.names.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }} - echo "Node app URL: http://127.0.0.1:{{ .Values.service.port }}/" + kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ template "common.names.fullname" . }} {{ .Values.service.ports.http }}:{{ .Values.service.ports.http }} + echo "Node app URL: http://127.0.0.1:{{ .Values.service.ports.http }}/" {{- end }} +{{- end }} {{- include "node.checkRollingTags" . }} {{- include "node.validateValues" . }} - -{{- $passwordValidationErrors := list }} - -{{- if .Values.mongodb.enabled }} -{{- $dbPasswordValidationErrors := include "common.validations.values.mongodb.passwords" (dict "secret" $dbSecretName "subchart" true "context" $) -}} -{{- $passwordValidationErrors = append $passwordValidationErrors $dbPasswordValidationErrors -}} -{{- end }} - -{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $) -}} diff --git a/bitnami/node/templates/_helpers.tpl b/bitnami/node/templates/_helpers.tpl index a00a864dc8..544224b1c7 100644 --- a/bitnami/node/templates/_helpers.tpl +++ b/bitnami/node/templates/_helpers.tpl @@ -54,13 +54,6 @@ Return the proper image name (for the init container volume-permissions image) {{- include "common.images.image" ( dict "imageRoot" .Values.volumePermissions.image "global" .Values.global ) -}} {{- end -}} -{{/* -Return the proper Storage Class -*/}} -{{- define "node.storageClass" -}} -{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}} -{{- end -}} - {{/* Compile all warnings into a single message, and call fail. */}} diff --git a/bitnami/node/templates/deployment.yaml b/bitnami/node/templates/deployment.yaml index 26400bc0a2..f13cdf1c85 100644 --- a/bitnami/node/templates/deployment.yaml +++ b/bitnami/node/templates/deployment.yaml @@ -1,7 +1,8 @@ apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} kind: Deployment metadata: - name: {{ template "common.names.fullname" . }} + name: {{ include "common.names.fullname" . }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" . | nindent 4 }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} @@ -10,6 +11,9 @@ metadata: annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} replicas: {{ .Values.replicaCount }} @@ -23,7 +27,7 @@ spec: {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ template "node.serviceAccountName" . }} + serviceAccountName: {{ include "node.serviceAccountName" . }} {{- include "node.imagePullSecrets" . | nindent 6 }} {{- if .Values.hostAliases }} hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }} @@ -42,9 +46,18 @@ spec: {{- if .Values.tolerations }} tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }} {{- end }} + {{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }} + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName | quote }} {{- end }} + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + {{- if .Values.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- end }} {{- if .Values.podSecurityContext.enabled }} securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }} {{- end }} @@ -59,6 +72,9 @@ spec: - | [[ -f "/opt/bitnami/scripts/git/entrypoint.sh" ]] && source "/opt/bitnami/scripts/git/entrypoint.sh" git clone {{ .Values.repository }} --branch {{ .Values.revision }} /app + env: + - name: BITNAMI_DEBUG + value: {{ ternary "true" "false" .Values.git.image.debug | quote }} volumeMounts: - name: app mountPath: /app @@ -66,7 +82,7 @@ spec: {{- include "common.tplvalues.render" (dict "value" .Values.git.extraVolumeMounts "context" $) | nindent 12 }} {{- end }} - name: npm-install - image: {{ template "node.image" . }} + image: {{ include "node.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }} workingDir: /app {{- if .Values.installCommand }} @@ -89,7 +105,9 @@ spec: - /bin/bash - -ec - | - chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} {{ .Values.persistence.path }} + mkdir -p {{ printf "%s/%s" .Values.persistence.mountPath (default "" .Values.persistence.subPath) }} + chown {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} {{ printf "%s/%s" .Values.persistence.mountPath (default "" .Values.persistence.subPath) }} + find {{ printf "%s/%s" .Values.persistence.mountPath (default "" .Values.persistence.subPath) }} -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | xargs -r chown -R {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} securityContext: runAsUser: 0 {{- if .Values.volumePermissions.resources }} @@ -97,7 +115,10 @@ spec: {{- end }} volumeMounts: - name: data - mountPath: {{ .Values.persistence.path }} + mountPath: {{ .Values.persistence.mountPath | quote }} + {{- if .Values.persistence.subPath }} + subPath: {{ .Values.persistence.subPath | quote }} + {{- end }} {{- end }} {{- end }} {{- if .Values.initContainers }} @@ -105,7 +126,7 @@ spec: {{- end }} containers: - name: node - image: {{ template "node.image" . }} + image: {{ include "node.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }} {{- if .Values.containerSecurityContext.enabled }} securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }} @@ -113,7 +134,7 @@ spec: env: {{- if .Values.mongodb.enabled }} - name: DATABASE_HOST - value: {{ template "node.mongodb.fullname" . }} + value: {{ include "node.mongodb.fullname" . }} - name: DATABASE_PORT value: "27017" - name: DATABASE_USER @@ -121,7 +142,7 @@ spec: - name: DATABASE_PASSWORD valueFrom: secretKeyRef: - name: {{ template "node.mongodb.fullname" . }} + name: {{ include "node.mongodb.fullname" . }} key: mongodb-passwords - name: DATABASE_NAME value: {{ .Values.mongodb.auth.database | quote }} @@ -131,13 +152,13 @@ spec: - name: DATABASE_HOST valueFrom: secretKeyRef: - name: {{ template "node.secretName" . }} + name: {{ include "node.secretName" . }} key: host - name: DATABASE_NAME {{- if not .Values.externaldb.broker.serviceInstanceName }} valueFrom: secretKeyRef: - name: {{ template "node.secretName" . }} + name: {{ include "node.secretName" . }} key: database {{- else }} value: "" @@ -145,17 +166,17 @@ spec: - name: DATABASE_PORT valueFrom: secretKeyRef: - name: {{ template "node.secretName" . }} + name: {{ include "node.secretName" . }} key: port - name: DATABASE_USER valueFrom: secretKeyRef: - name: {{ template "node.secretName" . }} + name: {{ include "node.secretName" . }} key: username - name: DATABASE_PASSWORD valueFrom: secretKeyRef: - name: {{ template "node.secretName" . }} + name: {{ include "node.secretName" . }} key: password - name: DATABASE_CONNECTION_OPTIONS {{- if .Values.externaldb.ssl }} @@ -179,54 +200,45 @@ spec: name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }} {{- end }} workingDir: /app - {{- if .Values.command }} + {{- if .Values.diagnosticMode.enabled }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} + {{- else if .Values.command }} command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }} {{- end }} - {{- if .Values.args }} + {{- if .Values.diagnosticMode.enabled }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} + {{- else if .Values.args }} args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }} {{- end }} ports: - name: http - containerPort: {{ .Values.applicationPort }} + containerPort: {{ .Values.containerPorts.http }} + {{- if not .Values.diagnosticMode.enabled }} {{- if .Values.livenessProbe.enabled }} - livenessProbe: + livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit (omit .Values.livenessProbe "enabled") "path") "context" $) | nindent 12 }} httpGet: path: {{ .Values.livenessProbe.path }} port: http - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.livenessProbe.failureThreshold }} {{- else if .Values.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }} {{- end }} {{- if .Values.readinessProbe.enabled }} - readinessProbe: + readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit (omit .Values.readinessProbe "enabled") "path") "context" $) | nindent 12 }} httpGet: path: {{ .Values.readinessProbe.path }} port: http - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} {{- else if .Values.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }} {{- end }} {{- if .Values.startupProbe.enabled }} - startupProbe: + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit (omit .Values.startupProbe "enabled") "path") "context" $) | nindent 12 }} httpGet: path: {{ .Values.startupProbe.path }} port: http - initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.startupProbe.periodSeconds }} - timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }} - successThreshold: {{ .Values.startupProbe.successThreshold }} - failureThreshold: {{ .Values.startupProbe.failureThreshold }} {{- else if .Values.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }} {{- end }} + {{- end }} {{- if .Values.resources }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- end }} @@ -236,7 +248,10 @@ spec: mountPath: /app {{- end }} - name: data - mountPath: {{ .Values.persistence.path }} + mountPath: {{ .Values.persistence.mountPath | quote }} + {{- if .Values.persistence.subPath }} + subPath: {{ .Values.persistence.subPath | quote }} + {{- end }} {{- if .Values.extraVolumeMounts }} {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }} {{- end }} @@ -251,7 +266,7 @@ spec: - name: data {{- if .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ template "common.names.fullname" . }}-binding + claimName: {{ .Values.persistence.existingClaim | default (printf "%s-binding" (include "common.names.fullname" .)) }} {{- else }} emptyDir: {} {{- end }} diff --git a/bitnami/node/templates/ingress.yaml b/bitnami/node/templates/ingress.yaml index 38315c32e5..abde51f13c 100644 --- a/bitnami/node/templates/ingress.yaml +++ b/bitnami/node/templates/ingress.yaml @@ -3,14 +3,12 @@ apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }} kind: Ingress metadata: name: {{ include "common.names.fullname" . }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" . | nindent 4 }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- end }} annotations: - {{- if .Values.ingress.certManager }} - kubernetes.io/tls-acme: "true" - {{- end }} {{- if .Values.ingress.annotations }} {{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }} {{- end }} @@ -18,9 +16,12 @@ metadata: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: + {{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} + ingressClassName: {{ .Values.ingress.ingressClassName | quote }} + {{- end }} rules: {{- if .Values.ingress.hostname }} - - host: {{ .Values.ingress.hostname }} + - host: {{ .Values.ingress.hostname | quote }} http: paths: {{- if .Values.ingress.extraPaths }} @@ -42,18 +43,18 @@ spec: {{- end }} backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "http" "context" $) | nindent 14 }} {{- end }} - {{- if or .Values.ingress.tls .Values.ingress.extraTls }} + {{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned)) .Values.ingress.extraTls }} tls: - {{- if .Values.ingress.tls }} + {{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned) }} - hosts: - - {{ .Values.ingress.hostname }} + - {{ .Values.ingress.hostname | quote }} {{- range .Values.ingress.extraHosts }} - {{ .name }} {{- end }} secretName: {{ printf "%s-tls" .Values.ingress.hostname }} {{- end }} {{- if .Values.ingress.extraTls }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingress.extraTls "context" $ ) | nindent 4 }} + {{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" $) | nindent 4 }} {{- end }} {{- end }} {{- end }} diff --git a/bitnami/node/templates/mongodb-binding.yaml b/bitnami/node/templates/mongodb-binding.yaml index c1aeffd7ac..98fdb78cd1 100644 --- a/bitnami/node/templates/mongodb-binding.yaml +++ b/bitnami/node/templates/mongodb-binding.yaml @@ -2,7 +2,8 @@ apiVersion: servicecatalog.k8s.io/v1beta1 kind: ServiceBinding metadata: - name: {{ template "common.names.fullname" . }}-binding + name: {{ printf "%s-binding" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" . | nindent 4 }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} @@ -13,5 +14,5 @@ metadata: spec: instanceRef: name: {{ .Values.externaldb.broker.serviceInstanceName }} - secretName: {{ template "node.secretName" . }} + secretName: {{ include "node.secretName" . }} {{- end }} diff --git a/bitnami/node/templates/pvc.yaml b/bitnami/node/templates/pvc.yaml index 3e2e573451..7a36a217e4 100644 --- a/bitnami/node/templates/pvc.yaml +++ b/bitnami/node/templates/pvc.yaml @@ -1,22 +1,32 @@ -{{- if .Values.persistence.enabled }} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ template "common.names.fullname" . }}-binding + name: {{ printf "%s-binding" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" . | nindent 4 }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.persistence.annotations .Values.commonAnnotations .Values.persistence.resourcePolicy }} annotations: - volume.alpha.kubernetes.io/storage-class: {{ ternary "default" (trimPrefix "storageClassName: " (include "node.storageClass" .)) (empty (include "node.storageClass" .)) }} + {{- if .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} + {{- if .Values.persistence.annotations }} + {{- include "common.tplvalues.render" ( dict "value" .Values.persistence.annotations "context" $) | nindent 4 }} + {{- end }} + {{- if .Values.persistence.resourcePolicy }} + helm.sh/resource-policy: {{ .Values.persistence.resourcePolicy | quote }} + {{- end }} + {{- end }} spec: accessModes: - - {{ .Values.persistence.accessMode | quote }} + {{- range .Values.persistence.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: storage: {{ .Values.persistence.size | quote }} - {{ include "node.storageClass" . }} + {{ include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) }} {{- end }} diff --git a/bitnami/node/templates/serviceaccount.yaml b/bitnami/node/templates/serviceaccount.yaml index 6970136efe..341c96f8d2 100644 --- a/bitnami/node/templates/serviceaccount.yaml +++ b/bitnami/node/templates/serviceaccount.yaml @@ -4,6 +4,7 @@ kind: ServiceAccount automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} metadata: name: {{ include "node.serviceAccountName" . }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" . | nindent 4 }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} diff --git a/bitnami/node/templates/svc.yaml b/bitnami/node/templates/svc.yaml index f94e8e66a1..bb846a3a18 100644 --- a/bitnami/node/templates/svc.yaml +++ b/bitnami/node/templates/svc.yaml @@ -1,7 +1,8 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "common.names.fullname" . }} + name: {{ include "common.names.fullname" . }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" . | nindent 4 }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} @@ -18,19 +19,28 @@ spec: {{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }} clusterIP: {{ .Values.service.clusterIP }} {{- end }} + {{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }} + {{- end }} {{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }} loadBalancerIP: {{ .Values.service.loadBalancerIP }} {{- end }} {{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }} loadBalancerSourceRanges: {{- toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }} {{- end }} + {{- if .Values.service.sessionAffinityConfig }} + sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }} + {{- end }} ports: - name: http - port: {{ .Values.service.port }} + port: {{ .Values.service.ports.http }} targetPort: http - {{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort)) }} - nodePort: {{ .Values.service.nodePort }} + {{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }} + nodePort: {{ .Values.service.nodePorts.http }} {{- else if eq .Values.service.type "ClusterIP" }} nodePort: null {{- end }} + {{- if .Values.service.extraPorts }} + {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} + {{- end }} selector: {{- include "common.labels.matchLabels" . | nindent 4 }} diff --git a/bitnami/node/templates/tls-secrets.yaml b/bitnami/node/templates/tls-secrets.yaml new file mode 100644 index 0000000000..0239ed8bb6 --- /dev/null +++ b/bitnami/node/templates/tls-secrets.yaml @@ -0,0 +1,45 @@ +{{- if .Values.ingress.enabled }} +{{- if .Values.ingress.secrets }} +{{- range .Values.ingress.secrets }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ .name }} + namespace: {{ include "common.names.namespace" $ | quote }} + labels: {{- include "common.labels.standard" $ | nindent 4 }} + {{- if $.Values.commonLabels }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }} + {{- end }} + {{- if $.Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +type: kubernetes.io/tls +data: + tls.crt: {{ .certificate | b64enc }} + tls.key: {{ .key | b64enc }} +--- +{{- end }} +{{- end }} +{{- if and .Values.ingress.tls .Values.ingress.selfSigned }} +{{- $ca := genCA "node-ca" 365 }} +{{- $cert := genSignedCert .Values.ingress.hostname nil (list .Values.ingress.hostname) 365 $ca }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ printf "%s-tls" .Values.ingress.hostname }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +type: kubernetes.io/tls +data: + tls.crt: {{ $cert.Cert | b64enc | quote }} + tls.key: {{ $cert.Key | b64enc | quote }} + ca.crt: {{ $ca.Cert | b64enc | quote }} +--- +{{- end }} +{{- end }} diff --git a/bitnami/node/values.yaml b/bitnami/node/values.yaml index 7740cb8c98..f2ee661125 100644 --- a/bitnami/node/values.yaml +++ b/bitnami/node/values.yaml @@ -27,6 +27,10 @@ nameOverride: "" ## @param fullnameOverride String to fully override node.fullname template ## fullnameOverride: "" +## @param namespaceOverride Override namespace for resources +## Useful when including Node as a chart dependency, so it can be released into a different namespace than the parent +## +namespaceOverride: "" ## @param commonLabels Add labels to all the deployed resources ## commonLabels: {} @@ -124,11 +128,12 @@ externaldb: ## @param image.tag NodeJS image tag (immutable tags are recommended) ## @param image.pullPolicy NodeJS image pull policy ## @param image.pullSecrets Specify docker-registry secret names as an array +## @param image.debug Set to true if you would like to see extra information on logs ## image: registry: docker.io repository: bitnami/node - tag: 16.15.0-debian-10-r0 + tag: 16.15.0-debian-10-r7 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images @@ -142,12 +147,27 @@ image: ## - myRegistryKeySecretName ## pullSecrets: [] + ## Set to true if you would like to see extra information on logs + ## + debug: false ## @param replicaCount Specify the number of replicas for the application ## replicaCount: 1 -## @param applicationPort Specify the port where your application will be running +## @param updateStrategy.type Strategy to use to replace existing pods. +## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy +## Example: +## updateStrategy: +## type: RollingUpdate +## rollingUpdate: +## maxSurge: 25% +## maxUnavailable: 25% ## -applicationPort: 3000 +updateStrategy: + type: RollingUpdate +## @param containerPorts.http Specify the port where your application will be running +## +containerPorts: + http: 3000 ## @param podAffinityPreset Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## @@ -198,8 +218,22 @@ podLabels: {} ## @param extraDeploy Array of extra objects to deploy with the release (evaluated as a template) ## extraDeploy: [] +## Enable diagnostic mode in the deployment(s)/statefulset(s) +## +diagnosticMode: + ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden) + ## + enabled: false + ## @param diagnosticMode.command Command to override all containers in the the deployment(s)/statefulset(s) + ## + command: + - sleep + ## @param diagnosticMode.args Args to override all containers in the the deployment(s)/statefulset(s) + ## + args: + - infinity ## Configure extra options for liveness probe -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes ## @param livenessProbe.enabled Enable livenessProbe ## @param livenessProbe.path Request path for livenessProbe ## @param livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe @@ -217,7 +251,7 @@ livenessProbe: failureThreshold: 6 successThreshold: 1 ## Configure extra options for readiness probe -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes ## @param readinessProbe.enabled Enable readinessProbe ## @param readinessProbe.path Request path for readinessProbe ## @param readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe @@ -247,10 +281,10 @@ readinessProbe: startupProbe: enabled: false path: '/' - initialDelaySeconds: 10 + initialDelaySeconds: 5 + periodSeconds: 3 timeoutSeconds: 1 - periodSeconds: 20 - failureThreshold: 6 + failureThreshold: 15 successThreshold: 1 ## @param customLivenessProbe Override default liveness probe ## @@ -258,13 +292,25 @@ customLivenessProbe: {} ## @param customReadinessProbe Override default readiness probe ## customReadinessProbe: {} -## @param customStartupProbe Custom startupProbe that overrides the default one +## @param customStartupProbe Override default startup probe ## customStartupProbe: {} +## @param topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template +## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods +## +topologySpreadConstraints: {} ## @param priorityClassName Node priorityClassName ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ ## priorityClassName: "" +## @param schedulerName Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +schedulerName: "" +## @param terminationGracePeriodSeconds Seconds Airflow web pod needs to terminate gracefully +## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods +## +terminationGracePeriodSeconds: "" ## @param lifecycleHooks lifecycleHooks for the Node container to automate configuration before or after startup. ## lifecycleHooks: {} @@ -364,11 +410,12 @@ git: ## @param git.image.tag Git image tag (immutable tags are recommended) ## @param git.image.pullPolicy Git image pull policy ## @param git.image.pullSecrets Specify docker-registry secret names as an array + ## @param git.image.debug Set to true if you would like to see extra information on logs ## image: registry: docker.io repository: bitnami/git - tag: 2.36.0-debian-10-r8 + tag: 2.36.0-debian-10-r14 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images @@ -382,6 +429,9 @@ git: ## - myRegistryKeySecretName ## pullSecrets: [] + ## Set to true if you would like to see extra information on logs + ## + debug: false ## @param git.extraVolumeMounts Add extra volume mounts for the Git container ## Useful to mount keys to connect through ssh. (normally used with extraVolumes) ## E.g: @@ -419,7 +469,7 @@ volumePermissions: image: registry: docker.io repository: bitnami/bitnami-shell - tag: 10-debian-10-r408 + tag: 10-debian-10-r414 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -459,9 +509,17 @@ persistence: ## @param persistence.enabled Enable persistence using PVC ## enabled: false - ## @param persistence.path Path to persisted directory + ## @param persistence.mountPath Path where the volume will be mount at. ## - path: /app/data + mountPath: /app/data + ## @param persistence.subPath Subdirectory of the volume to mount + ## + subPath: "" + ## @param persistence.existingClaim Name of an existing PVC to use + ## + existingClaim: "" + ## @param persistence.resourcePolicy Setting it to "keep" to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted + resourcePolicy: "" ## @param persistence.storageClass Persistent Volume Storage Class ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning @@ -470,12 +528,16 @@ persistence: ## GKE, AWS & OpenStack) ## storageClass: "" - ## @param persistence.accessMode PVC Access Mode + ## @param persistence.accessModes PVC Access Modes ## - accessMode: ReadWriteOnce + accessModes: + - ReadWriteOnce ## @param persistence.size PVC Storage Request ## size: 1Gi + ## @param persistence.annotations Annotations for the PVC + ## + annotations: {} ## @section Traffic exposure parameters @@ -485,9 +547,10 @@ service: ## @param service.type Kubernetes Service type ## type: ClusterIP - ## @param service.port Kubernetes Service port + ## @param service.ports.http Kubernetes Service port ## - port: 80 + ports: + http: 80 ## @param service.clusterIP Service Cluster IP ## clusterIP: "" @@ -496,10 +559,20 @@ service: ## ref: https://kubernetes.io/docs/user-guide/services/ ## sessionAffinity: 'None' - ## @param service.nodePort NodePort if Service type is `LoadBalancer` or `NodePort` + ## @param service.sessionAffinityConfig Additional settings for the sessionAffinity + ## sessionAffinityConfig: + ## clientIP: + ## timeoutSeconds: 300 + ## + sessionAffinityConfig: {} + ## @param service.nodePorts.http NodePort if Service type is `LoadBalancer` or `NodePort` ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport ## - nodePort: "" + nodePorts: + http: "" + ## @param service.extraPorts Extra ports to expose (normally used with the `sidecar` value) + ## + extraPorts: [] ## @param service.loadBalancerIP LoadBalancer IP if Service type is `LoadBalancer` ## Set the LoadBalancer service type to internal only. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer @@ -509,6 +582,10 @@ service: ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#aws-nlb-support ## loadBalancerSourceRanges: [] + ## @param service.externalTrafficPolicy Enable client source IP preservation + ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip + ## + externalTrafficPolicy: Cluster ## @param service.annotations Annotations for the Service ## This can be used to set the LoadBalancer service type to internal only. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer @@ -522,10 +599,12 @@ ingress: ## @param ingress.enabled Set to true to enable ingress record generation ## enabled: false - ## DEPRECATED: Use ingress.annotations instead of ingress.certManager - ## certManager: false - ## + ## @param ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) + ## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster . + ## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/ + ## + ingressClassName: "" ## @param ingress.pathType Ingress path type ## pathType: ImplementationSpecific @@ -555,6 +634,9 @@ ingress: ## You can use the ingress.secrets parameter to create this TLS secret or relay on cert-manager to create it ## tls: false + ## @param ingress.selfSigned Create a TLS secret for this ingress record using self-signed certificates generated by Helm + ## + selfSigned: false ## @param ingress.extraHosts The list of additional hostnames to be covered with this ingress record. ## Most likely the hostname above will be enough, but in the event more hosts are needed, this is an array ## extraHosts: