Browse Source

[bitnami/rabbitmq] Chart standardised (#9817)

* [bitnami/rabbitmq] Chart standardised

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update bitnami/rabbitmq/templates/networkpolicy.yaml

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

Co-authored-by: Francisco de Paz Galán <fdepaz@vmware.com>

* Update bitnami/rabbitmq/templates/secrets.yaml

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

Co-authored-by: Francisco de Paz Galán <fdepaz@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* Apply suggestions

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* Update VIB parameters

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/rabbitmq] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Francisco de Paz Galán <fdepaz@vmware.com>
Co-authored-by: Bitnami Containers <containers@bitnami.com>
Miguel Ruiz 3 năm trước cách đây
mục cha
commit
3315cbd9f3

+ 1 - 1
.vib/rabbitmq/vib-verify.json

@@ -22,7 +22,7 @@
           "url": "{SHA_ARCHIVE}",
           "path": "/bitnami/rabbitmq"
         },
-        "runtime_parameters": "ImF1dGgiOgogICJlcmxhbmdDb29raWUiOiAiUmpzcENDM25tNGtMdjRMaldGTmZGSFczeEx4Yjd6VEMiCiAgInBhc3N3b3JkIjogIlBIVkhkcXpyTWI5cyIKICAidXNlcm5hbWUiOiAidXNlciIKInNlcnZpY2UiOgogICJtYW5hZ2VyUG9ydCI6IDgwCiAgInR5cGUiOiAiTG9hZEJhbGFuY2VyIg==",
+        "runtime_parameters": "ImF1dGgiOgogICJlcmxhbmdDb29raWUiOiAiUmpzcENDM25tNGtMdjRMaldGTmZGSFczeEx4Yjd6VEMiCiAgInBhc3N3b3JkIjogIlBIVkhkcXpyTWI5cyIKICAidXNlcm5hbWUiOiAidXNlciIKInNlcnZpY2UiOgogICJwb3J0cyI6CiAgICAibWFuYWdlciI6IDgwCiAgInR5cGUiOiAiTG9hZEJhbGFuY2VyIgo=",
         "target_platform": {
           "target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
           "size": {

+ 1 - 1
bitnami/rabbitmq/Chart.yaml

@@ -23,4 +23,4 @@ name: rabbitmq
 sources:
   - https://github.com/bitnami/bitnami-docker-rabbitmq
   - https://www.rabbitmq.com
-version: 8.32.2
+version: 9.0.0

+ 152 - 94
bitnami/rabbitmq/README.md

@@ -66,7 +66,7 @@ The command removes all the Kubernetes components associated with the chart and
 | ------------------- | -------------------------------------------------------------- | --------------------- |
 | `image.registry`    | RabbitMQ image registry                                        | `docker.io`           |
 | `image.repository`  | RabbitMQ image repository                                      | `bitnami/rabbitmq`    |
-| `image.tag`         | RabbitMQ image tag (immutable tags are recommended)            | `3.9.15-debian-10-r6` |
+| `image.tag`         | RabbitMQ image tag (immutable tags are recommended)            | `3.9.16-debian-10-r0` |
 | `image.pullPolicy`  | RabbitMQ 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`               |
@@ -78,14 +78,16 @@ The command removes all the Kubernetes components associated with the chart and
 | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
 | `nameOverride`                     | String to partially override rabbitmq.fullname template (will maintain the release name)                                                 | `""`                                              |
 | `fullnameOverride`                 | String to fully override rabbitmq.fullname template                                                                                      | `""`                                              |
+| `namespaceOverride`                | String to fully override common.names.namespace                                                                                          | `""`                                              |
 | `kubeVersion`                      | Force target Kubernetes version (using Helm capabilities if not set)                                                                     | `""`                                              |
 | `clusterDomain`                    | Kubernetes Cluster Domain                                                                                                                | `cluster.local`                                   |
 | `extraDeploy`                      | Array of extra objects to deploy with the release                                                                                        | `[]`                                              |
+| `commonAnnotations`                | Annotations to add to all deployed objects                                                                                               | `{}`                                              |
+| `commonLabels`                     | Labels to add to all deployed objects                                                                                                    | `{}`                                              |
 | `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 deployment                                                                                     | `["sleep"]`                                       |
 | `diagnosticMode.args`              | Args to override all containers in the deployment                                                                                        | `["infinity"]`                                    |
 | `hostAliases`                      | Deployment pod host aliases                                                                                                              | `[]`                                              |
-| `commonAnnotations`                | Annotations to add to all deployed objects                                                                                               | `{}`                                              |
 | `dnsPolicy`                        | DNS Policy for pod                                                                                                                       | `""`                                              |
 | `dnsConfig`                        | DNS Configuration pod                                                                                                                    | `{}`                                              |
 | `auth.username`                    | RabbitMQ application username                                                                                                            | `user`                                            |
@@ -122,10 +124,17 @@ The command removes all the Kubernetes components associated with the chart and
 | `loadDefinition.existingSecret`    | Existing secret with the load definitions file                                                                                           | `""`                                              |
 | `command`                          | Override default container command (useful when using custom images)                                                                     | `[]`                                              |
 | `args`                             | Override default container args (useful when using custom images)                                                                        | `[]`                                              |
+| `lifecycleHooks`                   | Overwrite livecycle for the RabbitMQ container(s) to automate configuration before or after startup                                      | `{}`                                              |
 | `terminationGracePeriodSeconds`    | Default duration in seconds k8s waits for container to exit before sending kill signal.                                                  | `120`                                             |
 | `extraEnvVars`                     | Extra environment variables to add to RabbitMQ pods                                                                                      | `[]`                                              |
 | `extraEnvVarsCM`                   | Name of existing ConfigMap containing extra environment variables                                                                        | `""`                                              |
 | `extraEnvVarsSecret`               | Name of existing Secret containing extra environment variables (in case of sensitive data)                                               | `""`                                              |
+| `containerPorts.amqp`              |                                                                                                                                          | `5672`                                            |
+| `containerPorts.amqpTls`           |                                                                                                                                          | `5671`                                            |
+| `containerPorts.dist`              |                                                                                                                                          | `25672`                                           |
+| `containerPorts.manager`           |                                                                                                                                          | `15672`                                           |
+| `containerPorts.epmd`              |                                                                                                                                          | `4369`                                            |
+| `containerPorts.metrics`           |                                                                                                                                          | `9419`                                            |
 | `extraContainerPorts`              | Extra ports to be included in container spec, primarily informational                                                                    | `[]`                                              |
 | `configuration`                    | RabbitMQ Configuration file content: required cluster configuration                                                                      | `""`                                              |
 | `extraConfiguration`               | Configuration file content: extra configuration to be appended to RabbitMQ configuration                                                 | `""`                                              |
@@ -143,61 +152,69 @@ The command removes all the Kubernetes components associated with the chart and
 
 ### Statefulset parameters
 
-| Name                                 | Description                                                                                                              | Value           |
-| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | --------------- |
-| `replicaCount`                       | Number of RabbitMQ replicas to deploy                                                                                    | `1`             |
-| `schedulerName`                      | Use an alternate scheduler, e.g. "stork".                                                                                | `""`            |
-| `podManagementPolicy`                | Pod management policy                                                                                                    | `OrderedReady`  |
-| `podLabels`                          | RabbitMQ Pod labels. Evaluated as a template                                                                             | `{}`            |
-| `podAnnotations`                     | RabbitMQ Pod annotations. Evaluated as a template                                                                        | `{}`            |
-| `updateStrategyType`                 | Update strategy type for RabbitMQ statefulset                                                                            | `RollingUpdate` |
-| `statefulsetLabels`                  | RabbitMQ statefulset labels. Evaluated as a template                                                                     | `{}`            |
-| `priorityClassName`                  | Name of the priority class to be used by RabbitMQ pods, priority class needs to be created beforehand                    | `""`            |
-| `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                                                                  | `[]`            |
-| `topologySpreadConstraints`          | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]`            |
-| `podSecurityContext.enabled`         | Enable RabbitMQ pods' Security Context                                                                                   | `true`          |
-| `podSecurityContext.fsGroup`         | Group ID for the filesystem used by the containers                                                                       | `1001`          |
-| `podSecurityContext.runAsUser`       | User ID for the service user running the pod                                                                             | `1001`          |
-| `containerSecurityContext`           | RabbitMQ containers' Security Context                                                                                    | `{}`            |
-| `resources.limits`                   | The resources limits for RabbitMQ containers                                                                             | `{}`            |
-| `resources.requests`                 | The requested resources for RabbitMQ containers                                                                          | `{}`            |
-| `livenessProbe.enabled`              | Enable livenessProbe                                                                                                     | `true`          |
-| `livenessProbe.initialDelaySeconds`  | Initial delay seconds for livenessProbe                                                                                  | `120`           |
-| `livenessProbe.periodSeconds`        | Period seconds for livenessProbe                                                                                         | `30`            |
-| `livenessProbe.timeoutSeconds`       | Timeout seconds for livenessProbe                                                                                        | `20`            |
-| `livenessProbe.failureThreshold`     | Failure threshold for livenessProbe                                                                                      | `6`             |
-| `livenessProbe.successThreshold`     | Success threshold for livenessProbe                                                                                      | `1`             |
-| `readinessProbe.enabled`             | Enable readinessProbe                                                                                                    | `true`          |
-| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe                                                                                 | `10`            |
-| `readinessProbe.periodSeconds`       | Period seconds for readinessProbe                                                                                        | `30`            |
-| `readinessProbe.timeoutSeconds`      | Timeout seconds for readinessProbe                                                                                       | `20`            |
-| `readinessProbe.failureThreshold`    | Failure threshold for readinessProbe                                                                                     | `3`             |
-| `readinessProbe.successThreshold`    | Success threshold for readinessProbe                                                                                     | `1`             |
-| `customLivenessProbe`                | Override default liveness probe                                                                                          | `{}`            |
-| `customReadinessProbe`               | Override default readiness probe                                                                                         | `{}`            |
-| `customStartupProbe`                 | Define a custom startup probe                                                                                            | `{}`            |
-| `initContainers`                     | Add init containers to the RabbitMQ pod                                                                                  | `[]`            |
-| `sidecars`                           | Add sidecar containers to the RabbitMQ pod                                                                               | `[]`            |
-| `pdb.create`                         | Enable/disable a Pod Disruption Budget creation                                                                          | `false`         |
-| `pdb.minAvailable`                   | Minimum number/percentage of pods that should remain scheduled                                                           | `1`             |
-| `pdb.maxUnavailable`                 | Maximum number/percentage of pods that may be made unavailable                                                           | `""`            |
+| Name                                    | Description                                                                                                              | Value           |
+| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------- |
+| `replicaCount`                          | Number of RabbitMQ replicas to deploy                                                                                    | `1`             |
+| `schedulerName`                         | Use an alternate scheduler, e.g. "stork".                                                                                | `""`            |
+| `podManagementPolicy`                   | Pod management policy                                                                                                    | `OrderedReady`  |
+| `podLabels`                             | RabbitMQ Pod labels. Evaluated as a template                                                                             | `{}`            |
+| `podAnnotations`                        | RabbitMQ Pod annotations. Evaluated as a template                                                                        | `{}`            |
+| `updateStrategy.type`                   | Update strategy type for RabbitMQ statefulset                                                                            | `RollingUpdate` |
+| `statefulsetLabels`                     | RabbitMQ statefulset labels. Evaluated as a template                                                                     | `{}`            |
+| `priorityClassName`                     | Name of the priority class to be used by RabbitMQ pods, priority class needs to be created beforehand                    | `""`            |
+| `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                                                                  | `[]`            |
+| `topologySpreadConstraints`             | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]`            |
+| `podSecurityContext.enabled`            | Enable RabbitMQ pods' Security Context                                                                                   | `true`          |
+| `podSecurityContext.fsGroup`            | Set RabbitMQ pod's Security Context fsGroup                                                                              | `1001`          |
+| `containerSecurityContext.enabled`      | Enabled RabbitMQ containers' Security Context                                                                            | `true`          |
+| `containerSecurityContext.runAsUser`    | Set RabbitMQ containers' Security Context runAsUser                                                                      | `1001`          |
+| `containerSecurityContext.runAsNonRoot` | Set RabbitMQ container's Security Context runAsNonRoot                                                                   | `true`          |
+| `resources.limits`                      | The resources limits for RabbitMQ containers                                                                             | `{}`            |
+| `resources.requests`                    | The requested resources for RabbitMQ containers                                                                          | `{}`            |
+| `livenessProbe.enabled`                 | Enable livenessProbe                                                                                                     | `true`          |
+| `livenessProbe.initialDelaySeconds`     | Initial delay seconds for livenessProbe                                                                                  | `120`           |
+| `livenessProbe.periodSeconds`           | Period seconds for livenessProbe                                                                                         | `30`            |
+| `livenessProbe.timeoutSeconds`          | Timeout seconds for livenessProbe                                                                                        | `20`            |
+| `livenessProbe.failureThreshold`        | Failure threshold for livenessProbe                                                                                      | `6`             |
+| `livenessProbe.successThreshold`        | Success threshold for livenessProbe                                                                                      | `1`             |
+| `readinessProbe.enabled`                | Enable readinessProbe                                                                                                    | `true`          |
+| `readinessProbe.initialDelaySeconds`    | Initial delay seconds for readinessProbe                                                                                 | `10`            |
+| `readinessProbe.periodSeconds`          | Period seconds for readinessProbe                                                                                        | `30`            |
+| `readinessProbe.timeoutSeconds`         | Timeout seconds for readinessProbe                                                                                       | `20`            |
+| `readinessProbe.failureThreshold`       | Failure threshold for readinessProbe                                                                                     | `3`             |
+| `readinessProbe.successThreshold`       | Success threshold for readinessProbe                                                                                     | `1`             |
+| `startupProbe.enabled`                  | Enable startupProbe                                                                                                      | `false`         |
+| `startupProbe.initialDelaySeconds`      | Initial delay seconds for startupProbe                                                                                   | `10`            |
+| `startupProbe.periodSeconds`            | Period seconds for startupProbe                                                                                          | `30`            |
+| `startupProbe.timeoutSeconds`           | Timeout seconds for startupProbe                                                                                         | `20`            |
+| `startupProbe.failureThreshold`         | Failure threshold for startupProbe                                                                                       | `3`             |
+| `startupProbe.successThreshold`         | Success threshold for startupProbe                                                                                       | `1`             |
+| `customLivenessProbe`                   | Override default liveness probe                                                                                          | `{}`            |
+| `customReadinessProbe`                  | Override default readiness probe                                                                                         | `{}`            |
+| `customStartupProbe`                    | Define a custom startup probe                                                                                            | `{}`            |
+| `initContainers`                        | Add init containers to the RabbitMQ pod                                                                                  | `[]`            |
+| `sidecars`                              | Add sidecar containers to the RabbitMQ pod                                                                               | `[]`            |
+| `pdb.create`                            | Enable/disable a Pod Disruption Budget creation                                                                          | `false`         |
+| `pdb.minAvailable`                      | Minimum number/percentage of pods that should remain scheduled                                                           | `1`             |
+| `pdb.maxUnavailable`                    | Maximum number/percentage of pods that may be made unavailable                                                           | `""`            |
 
 
 ### RBAC parameters
 
-| Name                                          | Description                                         | Value  |
-| --------------------------------------------- | --------------------------------------------------- | ------ |
-| `serviceAccount.create`                       | Enable creation of ServiceAccount for RabbitMQ pods | `true` |
-| `serviceAccount.name`                         | Name of the created serviceAccount                  | `""`   |
-| `serviceAccount.automountServiceAccountToken` | Auto-mount the service account token in the pod     | `true` |
-| `rbac.create`                                 | Whether RBAC rules should be created                | `true` |
+| Name                                          | Description                                                                                | Value  |
+| --------------------------------------------- | ------------------------------------------------------------------------------------------ | ------ |
+| `serviceAccount.create`                       | Enable creation of ServiceAccount for RabbitMQ pods                                        | `true` |
+| `serviceAccount.name`                         | Name of the created serviceAccount                                                         | `""`   |
+| `serviceAccount.automountServiceAccountToken` | Auto-mount the service account token in the pod                                            | `true` |
+| `serviceAccount.annotations`                  | Annotations for service account. Evaluated as a template. Only used if `create` is `true`. | `{}`   |
+| `rbac.create`                                 | Whether RBAC rules should be created                                                       | `true` |
 
 
 ### Persistence parameters
@@ -207,12 +224,11 @@ The command removes all the Kubernetes components associated with the chart and
 | `persistence.enabled`       | Enable RabbitMQ data persistence using PVC       | `true`                     |
 | `persistence.storageClass`  | PVC Storage Class for RabbitMQ data volume       | `""`                       |
 | `persistence.selector`      | Selector to match an existing Persistent Volume  | `{}`                       |
-| `persistence.accessMode`    | PVC Access Mode for RabbitMQ data volume         | `ReadWriteOnce`            |
+| `persistence.accessModes`   | PVC Access Modes for RabbitMQ data volume        | `["ReadWriteOnce"]`        |
 | `persistence.existingClaim` | Provide an existing PersistentVolumeClaims       | `""`                       |
 | `persistence.mountPath`     | The path the volume will be mounted at           | `/bitnami/rabbitmq/mnesia` |
 | `persistence.subPath`       | The subdirectory of the volume to mount to       | `""`                       |
 | `persistence.size`          | PVC Storage Request for RabbitMQ data volume     | `8Gi`                      |
-| `persistence.volumes`       | Additional volumes without creating PVC          | `[]`                       |
 | `persistence.annotations`   | Persistence annotations. Evaluated as a template | `{}`                       |
 
 
@@ -222,34 +238,38 @@ The command removes all the Kubernetes components associated with the chart and
 | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
 | `service.type`                     | Kubernetes Service type                                                                                                          | `ClusterIP`              |
 | `service.portEnabled`              | Amqp port. Cannot be disabled when `auth.tls.enabled` is `false`. Listener can be disabled with `listeners.tcp = none`.          | `true`                   |
-| `service.port`                     | Amqp port                                                                                                                        | `5672`                   |
-| `service.portName`                 | Amqp service port name                                                                                                           | `amqp`                   |
-| `service.tlsPort`                  | Amqp TLS port                                                                                                                    | `5671`                   |
-| `service.tlsPortName`              | Amqp TLS service port name                                                                                                       | `amqp-ssl`               |
-| `service.nodePort`                 | Node port override for `amqp` port, if serviceType is `NodePort` or `LoadBalancer`                                               | `""`                     |
-| `service.tlsNodePort`              | Node port override for `amqp-ssl` port, if serviceType is `NodePort` or `LoadBalancer`                                           | `""`                     |
 | `service.distPortEnabled`          | Erlang distribution server port                                                                                                  | `true`                   |
-| `service.distPort`                 | Erlang distribution server port                                                                                                  | `25672`                  |
-| `service.distPortName`             | Erlang distribution service port name                                                                                            | `dist`                   |
-| `service.distNodePort`             | Node port override for `dist` port, if serviceType is `NodePort`                                                                 | `""`                     |
 | `service.managerPortEnabled`       | RabbitMQ Manager port                                                                                                            | `true`                   |
-| `service.managerPort`              | RabbitMQ Manager port                                                                                                            | `15672`                  |
-| `service.managerPortName`          | RabbitMQ Manager service port name                                                                                               | `http-stats`             |
-| `service.managerNodePort`          | Node port override for `http-stats` port, if serviceType `NodePort`                                                              | `""`                     |
-| `service.metricsPort`              | RabbitMQ Prometheues metrics port                                                                                                | `9419`                   |
-| `service.metricsPortName`          | RabbitMQ Prometheues metrics service port name                                                                                   | `metrics`                |
-| `service.metricsNodePort`          | Node port override for `metrics` port, if serviceType is `NodePort`                                                              | `""`                     |
 | `service.epmdPortEnabled`          | RabbitMQ EPMD Discovery service port                                                                                             | `true`                   |
-| `service.epmdNodePort`             | Node port override for `epmd` port, if serviceType is `NodePort`                                                                 | `""`                     |
-| `service.epmdPortName`             | EPMD Discovery service port name                                                                                                 | `epmd`                   |
+| `service.ports.amqp`               | Amqp service port                                                                                                                | `5672`                   |
+| `service.ports.amqpTls`            | Amqp TLS service port                                                                                                            | `5671`                   |
+| `service.ports.dist`               | Erlang distribution service port                                                                                                 | `25672`                  |
+| `service.ports.manager`            | RabbitMQ Manager service port                                                                                                    | `15672`                  |
+| `service.ports.metrics`            | RabbitMQ Prometheues metrics service port                                                                                        | `9419`                   |
+| `service.ports.epmd`               | EPMD Discovery service port                                                                                                      | `4369`                   |
+| `service.portNames.amqp`           | Amqp service port name                                                                                                           | `amqp`                   |
+| `service.portNames.amqpTls`        | Amqp TLS service port name                                                                                                       | `amqp-ssl`               |
+| `service.portNames.dist`           | Erlang distribution service port name                                                                                            | `dist`                   |
+| `service.portNames.manager`        | RabbitMQ Manager service port name                                                                                               | `http-stats`             |
+| `service.portNames.metrics`        | RabbitMQ Prometheues metrics service port name                                                                                   | `metrics`                |
+| `service.portNames.epmd`           | EPMD Discovery service port name                                                                                                 | `epmd`                   |
+| `service.nodePorts.amqp`           | Node port for Ampq                                                                                                               | `""`                     |
+| `service.nodePorts.amqpTls`        | Node port for Ampq TLS                                                                                                           | `""`                     |
+| `service.nodePorts.dist`           | Node port for Erlang distribution                                                                                                | `""`                     |
+| `service.nodePorts.manager`        | Node port for RabbitMQ Manager                                                                                                   | `""`                     |
+| `service.nodePorts.epmd`           | Node port for EPMD Discovery                                                                                                     | `""`                     |
+| `service.nodePorts.metrics`        | Node port for RabbitMQ Prometheues metrics                                                                                       | `""`                     |
 | `service.extraPorts`               | Extra ports to expose in the service                                                                                             | `[]`                     |
 | `service.loadBalancerSourceRanges` | Address(es) that are allowed when service is `LoadBalancer`                                                                      | `[]`                     |
 | `service.externalIPs`              | Set the ExternalIPs                                                                                                              | `[]`                     |
 | `service.externalTrafficPolicy`    | Enable client source IP preservation                                                                                             | `Cluster`                |
 | `service.loadBalancerIP`           | Set the LoadBalancerIP                                                                                                           | `""`                     |
+| `service.clusterIP`                | Kubernetes service Cluster IP                                                                                                    | `""`                     |
 | `service.labels`                   | Service labels. Evaluated as a template                                                                                          | `{}`                     |
 | `service.annotations`              | Service annotations. Evaluated as a template                                                                                     | `{}`                     |
 | `service.annotationsHeadless`      | Headless Service annotations. Evaluated as a template                                                                            | `{}`                     |
+| `service.sessionAffinity`          | Session Affinity for Kubernetes service, can be "None" or "ClientIP"                                                             | `None`                   |
+| `service.sessionAffinityConfig`    | Additional settings for the sessionAffinity                                                                                      | `{}`                     |
 | `ingress.enabled`                  | Enable ingress resource for Management console                                                                                   | `false`                  |
 | `ingress.path`                     | Path for the default host. You may need to set this to '/*' in order to use this with ALB ingress controllers.                   | `/`                      |
 | `ingress.pathType`                 | Ingress path type                                                                                                                | `ImplementationSpecific` |
@@ -258,6 +278,7 @@ The command removes all the Kubernetes components associated with the chart and
 | `ingress.tls`                      | Enable TLS configuration for the hostname defined at `ingress.hostname` parameter                                                | `false`                  |
 | `ingress.selfSigned`               | Set this to true in order to create a TLS secret for this ingress record                                                         | `false`                  |
 | `ingress.extraHosts`               | The list of additional hostnames to be covered with this ingress record.                                                         | `[]`                     |
+| `ingress.extraPaths`               | An array with additional arbitrary paths that may need to be added to the ingress under the main host                            | `[]`                     |
 | `ingress.extraRules`               | The list of additional rules to be added to this ingress record. Evaluated as a template                                         | `[]`                     |
 | `ingress.extraTls`                 | The tls configuration for additional hostnames to be covered with this ingress record.                                           | `[]`                     |
 | `ingress.secrets`                  | Custom TLS certificates as secrets                                                                                               | `[]`                     |
@@ -269,27 +290,29 @@ The command removes all the Kubernetes components associated with the chart and
 
 ### Metrics Parameters
 
-| Name                                       | Description                                                                                            | Value                 |
-| ------------------------------------------ | ------------------------------------------------------------------------------------------------------ | --------------------- |
-| `metrics.enabled`                          | Enable exposing RabbitMQ metrics to be gathered by Prometheus                                          | `false`               |
-| `metrics.plugins`                          | Plugins to enable Prometheus metrics in RabbitMQ                                                       | `rabbitmq_prometheus` |
-| `metrics.podAnnotations`                   | Annotations for enabling prometheus to access the metrics endpoint                                     | `{}`                  |
-| `metrics.serviceMonitor.enabled`           | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator                           | `false`               |
-| `metrics.serviceMonitor.namespace`         | Specify the namespace in which the serviceMonitor resource will be created                             | `""`                  |
-| `metrics.serviceMonitor.interval`          | Specify the interval at which metrics should be scraped                                                | `30s`                 |
-| `metrics.serviceMonitor.scrapeTimeout`     | Specify the timeout after which the scrape is ended                                                    | `""`                  |
-| `metrics.serviceMonitor.relabellings`      | MetricsRelabelConfigs to apply to samples before ingestion. DEPRECATED: Will be removed in next major. | `[]`                  |
-| `metrics.serviceMonitor.relabelings`       | RelabelConfigs to apply to samples before scraping.                                                    | `[]`                  |
-| `metrics.serviceMonitor.metricRelabelings` | MetricsRelabelConfigs to apply to samples before ingestion.                                            | `[]`                  |
-| `metrics.serviceMonitor.honorLabels`       | honorLabels chooses the metric's labels on collisions with target labels                               | `false`               |
-| `metrics.serviceMonitor.additionalLabels`  | Used to pass Labels that are required by the installed Prometheus Operator                             | `{}`                  |
-| `metrics.serviceMonitor.targetLabels`      | Used to keep given service's labels in target                                                          | `{}`                  |
-| `metrics.serviceMonitor.podTargetLabels`   | Used to keep given pod's labels in target                                                              | `{}`                  |
-| `metrics.serviceMonitor.path`              | Define the path used by ServiceMonitor to scrap metrics                                                | `""`                  |
-| `metrics.prometheusRule.enabled`           | Set this to true to create prometheusRules for Prometheus operator                                     | `false`               |
-| `metrics.prometheusRule.additionalLabels`  | Additional labels that can be used so prometheusRules will be discovered by Prometheus                 | `{}`                  |
-| `metrics.prometheusRule.namespace`         | namespace where prometheusRules resource should be created                                             | `""`                  |
-| `metrics.prometheusRule.rules`             | List of rules, used as template by Helm.                                                               | `[]`                  |
+| Name                                       | Description                                                                            | Value                 |
+| ------------------------------------------ | -------------------------------------------------------------------------------------- | --------------------- |
+| `metrics.enabled`                          | Enable exposing RabbitMQ metrics to be gathered by Prometheus                          | `false`               |
+| `metrics.plugins`                          | Plugins to enable Prometheus metrics in RabbitMQ                                       | `rabbitmq_prometheus` |
+| `metrics.podAnnotations`                   | Annotations for enabling prometheus to access the metrics endpoint                     | `{}`                  |
+| `metrics.serviceMonitor.enabled`           | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator           | `false`               |
+| `metrics.serviceMonitor.namespace`         | Specify the namespace in which the serviceMonitor resource will be created             | `""`                  |
+| `metrics.serviceMonitor.interval`          | Specify the interval at which metrics should be scraped                                | `30s`                 |
+| `metrics.serviceMonitor.scrapeTimeout`     | Specify the timeout after which the scrape is ended                                    | `""`                  |
+| `metrics.serviceMonitor.jobLabel`          | The name of the label on the target service to use as the job name in prometheus.      | `""`                  |
+| `metrics.serviceMonitor.relabelings`       | RelabelConfigs to apply to samples before scraping.                                    | `[]`                  |
+| `metrics.serviceMonitor.metricRelabelings` | MetricsRelabelConfigs to apply to samples before ingestion.                            | `[]`                  |
+| `metrics.serviceMonitor.honorLabels`       | honorLabels chooses the metric's labels on collisions with target labels               | `false`               |
+| `metrics.serviceMonitor.targetLabels`      | Used to keep given service's labels in target                                          | `{}`                  |
+| `metrics.serviceMonitor.podTargetLabels`   | Used to keep given pod's labels in target                                              | `{}`                  |
+| `metrics.serviceMonitor.path`              | Define the path used by ServiceMonitor to scrap metrics                                | `""`                  |
+| `metrics.serviceMonitor.selector`          | ServiceMonitor selector labels                                                         | `{}`                  |
+| `metrics.serviceMonitor.labels`            | Extra labels for the ServiceMonitor                                                    | `{}`                  |
+| `metrics.serviceMonitor.annotations`       | Extra annotations for the ServiceMonitor                                               | `{}`                  |
+| `metrics.prometheusRule.enabled`           | Set this to true to create prometheusRules for Prometheus operator                     | `false`               |
+| `metrics.prometheusRule.additionalLabels`  | Additional labels that can be used so prometheusRules will be discovered by Prometheus | `{}`                  |
+| `metrics.prometheusRule.namespace`         | namespace where prometheusRules resource should be created                             | `""`                  |
+| `metrics.prometheusRule.rules`             | List of rules, used as template by Helm.                                               | `[]`                  |
 
 
 ### Init Container Parameters
@@ -299,7 +322,7 @@ The command removes all the Kubernetes components associated with the chart and
 | `volumePermissions.enabled`            | Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup` | `false`                 |
 | `volumePermissions.image.registry`     | Init container volume-permissions image registry                                                                     | `docker.io`             |
 | `volumePermissions.image.repository`   | Init container volume-permissions image repository                                                                   | `bitnami/bitnami-shell` |
-| `volumePermissions.image.tag`          | Init container volume-permissions image tag                                                                          | `10-debian-10-r400`     |
+| `volumePermissions.image.tag`          | Init container volume-permissions image tag                                                                          | `10-debian-10-r408`     |
 | `volumePermissions.image.pullPolicy`   | Init container volume-permissions image pull policy                                                                  | `IfNotPresent`          |
 | `volumePermissions.image.pullSecrets`  | Specify docker-registry secret names as an array                                                                     | `[]`                    |
 | `volumePermissions.resources.limits`   | Init container volume-permissions resource limits                                                                    | `{}`                    |
@@ -518,6 +541,41 @@ $ helm upgrade my-release bitnami/rabbitmq --set auth.password=[PASSWORD] --set
 
 | Note: you need to substitute the placeholders [PASSWORD] and [RABBITMQ_ERLANG_COOKIE] with the values obtained in the installation notes.
 
+### To 9.0.0
+
+This major release renames several values in this chart and adds missing features, in order to be aligned with the rest of the assets in the Bitnami charts repository.
+
+  .dist
+  .manager
+  .metrics
+  .epmd
+
+- `service.port` has been renamed as `service.ports.amqp`.
+- `service.portName` has been renamed as `service.portNames.amqp`.
+- `service.nodePort`has been renamed as `service.nodePorts.amqp`.
+- `service.tlsPort` has been renamed as `service.ports.amqpTls`.
+- `service.tlsPortName` has been renamed as `service.portNames.amqpTls`.
+- `service.tlsNodePort` has been renamed as `service.nodePorts.amqpTls`.
+- `service.epmdPortName` has been renamed as `service.portNames.epmd`.
+- `service.epmdNodePort` has been renamed as `service.nodePorts.epmd`.
+- `service.distPort` has been renamed as `service.ports.dist`.
+- `service.distPortName` has been renamed as `service.portNames.dist`.
+- `service.distNodePort` has been renamed as `service.nodePorts.dist`.
+- `service.managerPort` has been renamed as `service.ports.manager`.
+- `service.managerPortName` has been renamed as `service.portNames.manager`.
+- `service.managerNodePort` has been renamed as `service.nodePorts.manager`.
+- `service.metricsPort` has been renamed as `service.ports.metrics`.
+- `service.metricsPortName` has been renamed as `service.portNames.metrics`.
+- `service.metricsNodePort` has been renamed as `service.nodePorts.metrics`.
+- `persistence.volumes` has been removed, as it duplicates the parameter `extraVolumes`.
+- `ingress.certManager` has been removed.
+- `metrics.serviceMonitor.relabellings` has been replaced with `metrics.serviceMonitor.relabelings`, and it sets the field `relabelings` instead of `metricRelabelings`.
+- `metrics.serviceMonitor.additionalLabels` has been renamed as `metrics.serviceMonitor.labels`
+- `updateStrategyType` has been removed, use the field `updateStrategy` instead, which is interpreted as a template.
+- The content of `podSecurityContext` and `containerSecurityContext` have been modified.
+- The behavior of VolumePermissions has been modified to not change ownership of '.snapshot' and 'lost+found'
+- Introduced the values `ContainerPorts.*`, separating the service and container ports configuration.
+
 ### To 8.21.0
 
 This new version of the chart bumps the RabbitMQ version to `3.9.1`. It is considered a minor release, and no breaking changes are expected. Additionally, RabbitMQ `3.9.X` nodes can run alongside `3.8.X` nodes.

+ 17 - 17
bitnami/rabbitmq/templates/NOTES.txt

@@ -2,8 +2,8 @@ CHART NAME: {{ .Chart.Name }}
 CHART VERSION: {{ .Chart.Version }}
 APP VERSION: {{ .Chart.AppVersion }}
 
-{{- $servicePort := or (.Values.service.portEnabled) (not .Values.auth.tls.enabled) | ternary .Values.service.port .Values.service.tlsPort -}}
-{{- $serviceNodePort := or (.Values.service.portEnabled) (not .Values.auth.tls.enabled) | ternary .Values.service.nodePort .Values.service.tlsNodePort -}}
+{{- $servicePort := or (.Values.service.portEnabled) (not .Values.auth.tls.enabled) | ternary .Values.service.ports.amqp .Values.service.ports.amqpTls -}}
+{{- $serviceNodePort := or (.Values.service.portEnabled) (not .Values.auth.tls.enabled) | ternary .Values.service.nodePorts.amqp .Values.service.nodePorts.amqpTls -}}
 
 ** Please be patient while the chart is being deployed **
 
@@ -39,7 +39,7 @@ Note that the credentials are saved in persistent volume claims and will not be
 This is applicable when no passwords are set and therefore the random password is autogenerated. In case of using a fixed password, you should specify it when upgrading.
 More information about the credentials may be found at https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues/#credential-errors-while-upgrading-chart-releases.
 
-RabbitMQ can be accessed within the cluster on port {{ $serviceNodePort }} at {{ include "rabbitmq.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clustering.k8s_domain }}
+RabbitMQ can be accessed within the cluster on port {{ $serviceNodePort }} at {{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
 
 To access for outside the cluster, perform the following steps:
 
@@ -51,7 +51,7 @@ To Access the RabbitMQ AMQP port:
 1. Obtain the NodePort IP and ports:
 
     export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
-    export NODE_PORT_AMQP=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[?(@.name=='amqp')].nodePort}" services {{ include "rabbitmq.fullname" . }})
+    export NODE_PORT_AMQP=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[?(@.name=='amqp')].nodePort}" services {{ include "common.names.fullname" . }})
     echo "URL : amqp://$NODE_IP:$NODE_PORT_AMQP/"
 
 {{- else if contains "LoadBalancer" .Values.service.type }}
@@ -61,9 +61,9 @@ To Access the RabbitMQ AMQP port:
 1. Obtain the LoadBalancer IP:
 
 NOTE: It may take a few minutes for the LoadBalancer IP to be available.
-      Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ include "rabbitmq.fullname" . }}'
+      Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ include "common.names.fullname" . }}'
 
-    export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "rabbitmq.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
+    export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
     echo "URL : amqp://$SERVICE_IP:{{ $servicePort }}/"
 
 {{- else if contains "ClusterIP"  .Values.service.type }}
@@ -72,7 +72,7 @@ To Access the RabbitMQ AMQP port:
 
 1. Create a port-forward to the AMQP port:
 
-    kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "rabbitmq.fullname" . }} {{ $servicePort }}:{{ $servicePort }} &
+    kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "common.names.fullname" . }} {{ $servicePort }}:{{ $servicePort }} &
     echo "URL : amqp://127.0.0.1:{{ $servicePort }}/"
 
 {{- end }}
@@ -95,8 +95,8 @@ To Access the RabbitMQ Management interface:
 Obtain the NodePort IP and ports:
 
     export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
-    export NODE_PORT_AMQP=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[?(@.name=='amqp')].nodePort}" services {{ include "rabbitmq.fullname" . }})
-    export NODE_PORT_STATS=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[?(@.name=='http-stats')].nodePort}" services {{ include "rabbitmq.fullname" . }})
+    export NODE_PORT_AMQP=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[?(@.name=='amqp')].nodePort}" services {{ include "common.names.fullname" . }})
+    export NODE_PORT_STATS=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[?(@.name=='http-stats')].nodePort}" services {{ include "common.names.fullname" . }})
 
 To Access the RabbitMQ AMQP port:
 
@@ -111,9 +111,9 @@ To Access the RabbitMQ Management interface:
 Obtain the LoadBalancer IP:
 
 NOTE: It may take a few minutes for the LoadBalancer IP to be available.
-      Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ include "rabbitmq.fullname" . }}'
+      Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ include "common.names.fullname" . }}'
 
-    export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "rabbitmq.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
+    export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
 
 To Access the RabbitMQ AMQP port:
 
@@ -121,19 +121,19 @@ To Access the RabbitMQ AMQP port:
 
 To Access the RabbitMQ Management interface:
 
-    echo "URL : http://$SERVICE_IP:{{ .Values.service.managerPort }}/"
+    echo "URL : http://$SERVICE_IP:{{ .Values.service.ports.manager }}/"
 
 {{- else if contains "ClusterIP"  .Values.service.type }}
 
 To Access the RabbitMQ AMQP port:
 
     echo "URL : amqp://127.0.0.1:{{ $servicePort }}/"
-    kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "rabbitmq.fullname" . }} {{ $servicePort }}:{{ $servicePort }}
+    kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "common.names.fullname" . }} {{ $servicePort }}:{{ $servicePort }}
 
 To Access the RabbitMQ Management interface:
 
-    echo "URL : http://127.0.0.1:{{ .Values.service.managerPort }}/"
-    kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "rabbitmq.fullname" . }} {{ .Values.service.managerPort }}:{{ .Values.service.managerPort }}
+    echo "URL : http://127.0.0.1:{{ .Values.service.ports.manager }}/"
+    kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "common.names.fullname" . }} {{ .Values.service.ports.manager }}:{{ .Values.service.ports.manager }}
 
 {{- end }}
 {{- end }}
@@ -142,8 +142,8 @@ To Access the RabbitMQ Management interface:
 
 To access the RabbitMQ Prometheus metrics, get the RabbitMQ Prometheus URL by running:
 
-    kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "rabbitmq.fullname" . }} {{ .Values.service.metricsPort }}:{{ .Values.service.metricsPort }} &
-    echo "Prometheus Metrics URL: http://127.0.0.1:{{ .Values.service.metricsPort }}/metrics"
+    kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "common.names.fullname" . }} {{ .Values.service.ports.metrics }}:{{ .Values.service.ports.metrics }} &
+    echo "Prometheus Metrics URL: http://127.0.0.1:{{ .Values.service.ports.metrics }}/metrics"
 
 Then, open the obtained URL in a browser.
 

+ 4 - 31
bitnami/rabbitmq/templates/_helpers.tpl

@@ -1,19 +1,4 @@
 {{/* vim: set filetype=mustache: */}}
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "rabbitmq.name" -}}
-{{- include "common.names.name" . -}}
-{{- end -}}
-
-{{/*
-Create a default fully qualified app name.
-We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "rabbitmq.fullname" -}}
-{{- include "common.names.fullname" . -}}
-{{- end -}}
 
 {{/*
 Return the proper RabbitMQ image name
@@ -36,24 +21,12 @@ Return the proper Docker Image Registry Secret Names
 {{ include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.volumePermissions.image) "global" .Values.global) }}
 {{- end -}}
 
-{{/*
-Return podAnnotations
-*/}}
-{{- define "rabbitmq.podAnnotations" -}}
-{{- if .Values.podAnnotations }}
-{{ include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) }}
-{{- end }}
-{{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }}
-{{ include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) }}
-{{- end }}
-{{- end -}}
-
 {{/*
  Create the name of the service account to use
  */}}
 {{- define "rabbitmq.serviceAccountName" -}}
 {{- if .Values.serviceAccount.create -}}
-    {{ default (include "rabbitmq.fullname" .) .Values.serviceAccount.name }}
+    {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
 {{- else -}}
     {{ default "default" .Values.serviceAccount.name }}
 {{- end -}}
@@ -66,7 +39,7 @@ Get the password secret.
     {{- if .Values.auth.existingPasswordSecret -}}
         {{- printf "%s" (tpl .Values.auth.existingPasswordSecret $) -}}
     {{- else -}}
-        {{- printf "%s" (include "rabbitmq.fullname" .) -}}
+        {{- printf "%s" (include "common.names.fullname" .) -}}
     {{- end -}}
 {{- end -}}
 
@@ -77,7 +50,7 @@ Get the erlang secret.
     {{- if .Values.auth.existingErlangSecret -}}
         {{- printf "%s" (tpl .Values.auth.existingErlangSecret $) -}}
     {{- else -}}
-        {{- printf "%s" (include "rabbitmq.fullname" .) -}}
+        {{- printf "%s" (include "common.names.fullname" .) -}}
     {{- end -}}
 {{- end -}}
 
@@ -88,7 +61,7 @@ Get the TLS secret.
     {{- if .Values.auth.tls.existingSecret -}}
         {{- printf "%s" (tpl .Values.auth.tls.existingSecret $) -}}
     {{- else -}}
-        {{- printf "%s-certs" (include "rabbitmq.fullname" .) -}}
+        {{- printf "%s-certs" (include "common.names.fullname" .) -}}
     {{- end -}}
 {{- end -}}
 

+ 5 - 2
bitnami/rabbitmq/templates/configuration.yaml

@@ -1,9 +1,12 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ template "rabbitmq.fullname" . }}-config
-  namespace: {{ .Release.Namespace | quote }}
+  name: {{ printf "%s-config" (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 }}

+ 9 - 9
bitnami/rabbitmq/templates/ingress.yaml

@@ -2,19 +2,19 @@
 apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
 kind: Ingress
 metadata:
-  name: {{ include "rabbitmq.fullname" . }}
-  namespace: {{ .Release.Namespace | quote }}
+  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"
+    {{- if .Values.ingress.annotations }}
+    {{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
     {{- end }}
     {{- if .Values.commonAnnotations }}
     {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
     {{- end }}
-    {{- if .Values.ingress.annotations }}
-    {{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
-    {{- end }}
 spec:
   {{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
   ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
@@ -31,7 +31,7 @@ spec:
             {{- if eq "true" (include "common.ingress.supportsPathType" .) }}
             pathType: {{ .Values.ingress.pathType }}
             {{- end }}
-            backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" .Values.service.managerPortName "context" $)  | nindent 14 }}
+            backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" .Values.service.portNames.manager "context" $)  | nindent 14 }}
     {{- end }}
     {{- range .Values.ingress.extraHosts }}
     - host: {{ include "common.tplvalues.render" ( dict "value" .name "context" $ ) }}
@@ -41,7 +41,7 @@ spec:
             {{- if eq "true" (include "common.ingress.supportsPathType" $) }}
             pathType: {{ default "ImplementationSpecific" .pathType }}
             {{- end }}
-            backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" $.Values.service.managerPortName "context" $) | nindent 14 }}
+            backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" $.Values.service.portNames.manager "context" $) | nindent 14 }}
     {{- end }}
     {{- if .Values.ingress.extraRules }}
     {{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}

+ 12 - 9
bitnami/rabbitmq/templates/networkpolicy.yaml

@@ -2,9 +2,12 @@
 kind: NetworkPolicy
 apiVersion: networking.k8s.io/v1
 metadata:
-  name: {{ include "rabbitmq.fullname" . }}
-  namespace: {{ .Release.Namespace | quote }}
+  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 }}
   {{- if .Values.commonAnnotations }}
   annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
   {{- end }}
@@ -14,16 +17,16 @@ spec:
   ingress:
     # Allow inbound connections
     - ports:
-        - port: 4369  # EPMD
-        - port: {{ .Values.service.port }}
-        - port: {{ .Values.service.tlsPort }}
-        - port: {{ .Values.service.distPort }}
-        - port: {{ .Values.service.managerPort }}
+        - port: {{ .Values.service.ports.epmd }}  # EPMD
+        - port: {{ .Values.service.ports.amqp }}
+        - port: {{ .Values.service.ports.amqpTls }}
+        - port: {{ .Values.service.ports.dist }}
+        - port: {{ .Values.service.ports.manager }}
       {{- if not .Values.networkPolicy.allowExternal }}
       from:
         - podSelector:
             matchLabels:
-              {{ template "rabbitmq.fullname" . }}-client: "true"
+              {{ printf "%s-client" (include "common.names.fullname" .) }}: "true"
         - podSelector:
             matchLabels:
               {{- include "common.labels.matchLabels" . | nindent 14 }}
@@ -33,5 +36,5 @@ spec:
       {{- end }}
     # Allow prometheus scrapes
     - ports:
-        - port: {{ .Values.service.metricsPort }}
+        - port: {{ .Values.service.ports.metrics }}
 {{- end }}

+ 5 - 2
bitnami/rabbitmq/templates/pdb.yaml

@@ -2,9 +2,12 @@
 apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
 kind: PodDisruptionBudget
 metadata:
-  name: {{ include "rabbitmq.fullname" . }}
-  namespace: {{ .Release.Namespace | quote }}
+  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 }}
   {{- if .Values.commonAnnotations }}
   annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
   {{- end }}

+ 6 - 7
bitnami/rabbitmq/templates/prometheusrule.yaml

@@ -2,13 +2,12 @@
 apiVersion: monitoring.coreos.com/v1
 kind: PrometheusRule
 metadata:
-  name: {{ include "rabbitmq.fullname" . }}
-  {{- if .Values.metrics.prometheusRule.namespace }}
-  namespace: {{ .Values.metrics.prometheusRule.namespace }}
-  {{- else }}
-  namespace: {{ .Release.Namespace | quote }}
-  {{- end }}
+  name: {{ include "common.names.fullname" . }}
+  namespace: {{ default (include "common.names.namespace" .) .Values.metrics.prometheusRule.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.metrics.prometheusRule.additionalLabels }}
     {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $) | nindent 4 }}
     {{- end }}
@@ -18,7 +17,7 @@ metadata:
 spec:
   groups:
   {{- with .Values.metrics.prometheusRule.rules }}
-    - name: {{ template "rabbitmq.name" $ }}
+    - name: {{ template "common.names.name" $ }}
       rules: {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
   {{- end }}
 {{- end }}

+ 5 - 2
bitnami/rabbitmq/templates/role.yaml

@@ -2,9 +2,12 @@
 kind: Role
 apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
 metadata:
-  name: {{ template "rabbitmq.fullname" . }}-endpoint-reader
-  namespace: {{ .Release.Namespace | quote }}
+  name: {{ printf "%s-endpoint-reader" (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 }}

+ 6 - 3
bitnami/rabbitmq/templates/rolebinding.yaml

@@ -2,9 +2,12 @@
 kind: RoleBinding
 apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
 metadata:
-  name: {{ template "rabbitmq.fullname" . }}-endpoint-reader
-  namespace: {{ .Release.Namespace | quote }}
+  name: {{ printf "%s-endpoint-reader" (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 }}
@@ -14,5 +17,5 @@ subjects:
 roleRef:
   apiGroup: rbac.authorization.k8s.io
   kind: Role
-  name: {{ template "rabbitmq.fullname" . }}-endpoint-reader
+  name: {{ printf "%s-endpoint-reader" (include "common.names.fullname" .) }}
 {{- end }}

+ 10 - 9
bitnami/rabbitmq/templates/secrets.yaml

@@ -2,9 +2,12 @@
 apiVersion: v1
 kind: Secret
 metadata:
-  name: {{ include "rabbitmq.fullname" . }}
-  namespace: {{ .Release.Namespace | quote }}
+  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 }}
   {{- if .Values.commonAnnotations }}
   annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
   {{- end }}
@@ -25,19 +28,17 @@ data:
   {{- end }}
   {{- end }}
 {{- end }}
-{{- $extraSecretsPrependReleaseName := .Values.extraSecretsPrependReleaseName }}
 {{- range $key, $value := .Values.extraSecrets }}
 ---
 apiVersion: v1
 kind: Secret
 metadata:
-  {{- if $extraSecretsPrependReleaseName }}
-  name: {{ $.Release.Name }}-{{ $key }}
-  {{- else }}
-  name: {{ $key }}
-  {{- end }}
-  namespace: {{ $.Release.Namespace | quote }}
+  name: {{ ternary (printf "%s-%s" (include "common.names.namespace" $) $key) $key $.Values.extraSecretsPrependReleaseName }}
+  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 }}

+ 13 - 4
bitnami/rabbitmq/templates/serviceaccount.yaml

@@ -3,13 +3,22 @@ apiVersion: v1
 kind: ServiceAccount
 metadata:
   name: {{ include "rabbitmq.serviceAccountName" . }}
-  namespace: {{ .Release.Namespace | quote }}
+  namespace: {{ include "common.names.namespace" . | quote }}
   labels: {{- include "common.labels.standard" . | nindent 4 }}
-  {{- if .Values.commonAnnotations }}
-  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+    {{- if .Values.commonLabels }}
+    {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
+    {{- end }}
+  {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
+  annotations:
+    {{- if .Values.commonAnnotations }}
+    {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+    {{- end }}
+    {{- if .Values.serviceAccount.annotations }}
+    {{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.annotations "context" $) | nindent 4 }}
+    {{- end }}
   {{- end }}
 automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
 secrets:
-  - name: {{ include "rabbitmq.fullname" . }}
+  - name: {{ include "common.names.fullname" . }}
 {{- end }}
 

+ 29 - 26
bitnami/rabbitmq/templates/servicemonitor.yaml

@@ -2,22 +2,29 @@
 apiVersion: monitoring.coreos.com/v1
 kind: ServiceMonitor
 metadata:
-  name: {{ include "rabbitmq.fullname" . }}
-  {{- if .Values.metrics.serviceMonitor.namespace }}
-  namespace: {{ .Values.metrics.serviceMonitor.namespace }}
-  {{- else }}
-  namespace: {{ .Release.Namespace | quote }}
-  {{- end }}
+  name: {{ include "common.names.fullname" . }}
+  namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace | quote }}
   labels: {{- include "common.labels.standard" . | nindent 4 }}
-    {{- if .Values.metrics.serviceMonitor.additionalLabels }}
-    {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }}
+    {{- if .Values.metrics.serviceMonitor.labels }}
+    {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }}
+    {{- end }}
+    {{- if .Values.commonLabels }}
+    {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
+    {{- end }}
+  annotations:
+    {{- if .Values.commonAnnotations }}
+    {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+    {{- end }}
+    {{- if .Values.metrics.serviceMonitor.annotations }}
+    {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }}
     {{- end }}
-  {{- if .Values.commonAnnotations }}
-  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
-  {{- end }}
 spec:
+  jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }}
   endpoints:
     - port: metrics
+      {{- if .Values.metrics.serviceMonitor.path }}
+      path: {{ .Values.metrics.serviceMonitor.path }}
+      {{- end }}
       {{- if .Values.metrics.serviceMonitor.interval }}
       interval: {{ .Values.metrics.serviceMonitor.interval }}
       {{- end }}
@@ -28,27 +35,23 @@ spec:
       honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
       {{- end }}
       {{- if .Values.metrics.serviceMonitor.relabelings }}
-      relabelings: {{- toYaml .Values.metrics.serviceMonitor.relabelings | nindent 6 }}
-      {{- end }}
-      {{- if .Values.metrics.serviceMonitor.relabellings }}
-      metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.relabellings | nindent 6 }}
-      {{- else if .Values.metrics.serviceMonitor.metricRelabelings }}
-      metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6 }}
+      relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
       {{- end }}
-      {{- if .Values.metrics.serviceMonitor.path }}
-      path: {{ .Values.metrics.serviceMonitor.path }}
+      {{- if .Values.metrics.serviceMonitor.metricRelabelings }}
+      metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
       {{- end }}
   namespaceSelector:
     matchNames:
-      - {{ .Release.Namespace | quote }}
-  {{- with .Values.metrics.serviceMonitor.podTargetLabels }}
-  podTargetLabels:
-  {{- toYaml . | nindent 4 }}
+      - {{ include "common.names.namespace" . | quote }}
+  {{- if .Values.metrics.serviceMonitor.podTargetLabels }}
+  podTargetLabels: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.podTargetLabels "context" $) | nindent 4 }}
   {{- end }}
-  {{- with .Values.metrics.serviceMonitor.targetLabels }}
-  targetLabels:
-  {{- toYaml . | nindent 4 }}
+  {{- if .Values.metrics.serviceMonitor.targetLabels }}
+  targetLabels: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.targetLabels "context" $) | nindent 4 }}
   {{- end }}
   selector:
     matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
+      {{- if .Values.metrics.serviceMonitor.selector }}
+      {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
+      {{- end }}
 {{- end }}

+ 61 - 67
bitnami/rabbitmq/templates/statefulset.yaml

@@ -1,24 +1,25 @@
 apiVersion: apps/v1
 kind: StatefulSet
 metadata:
-  name: {{ include "rabbitmq.fullname" . }}
-  namespace: {{ .Release.Namespace | quote }}
+  name: {{ include "common.names.fullname" . }}
+  namespace: {{ include "common.names.namespace" . | quote }}
   labels: {{- include "common.labels.standard" . | nindent 4 }}
     {{- if .Values.statefulsetLabels }}
     {{- include "common.tplvalues.render" (dict "value" .Values.statefulsetLabels "context" $) | nindent 4 }}
     {{- end }}
+    {{- 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 }}
 spec:
-  serviceName: {{ template "rabbitmq.fullname" . }}-headless
+  serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) }}
   podManagementPolicy: {{ .Values.podManagementPolicy }}
   replicas: {{ .Values.replicaCount }}
-  updateStrategy:
-    type: {{ .Values.updateStrategyType }}
-    {{- if (eq "OnDelete" .Values.updateStrategyType) }}
-    rollingUpdate: null
-    {{- end }}
+  {{- if .Values.updateStrategy }}
+  updateStrategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
+  {{- end }}
   selector:
     matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
   template:
@@ -35,8 +36,11 @@ spec:
         {{- if or (not .Values.auth.existingErlangSecret) (not .Values.auth.existingPasswordSecret) .Values.extraSecrets }}
         checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
         {{- end }}
-        {{- if or .Values.podAnnotations .Values.metrics.enabled }}
-        {{- include "rabbitmq.podAnnotations" . | nindent 8 }}
+        {{- if .Values.podAnnotations }}
+        {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
+        {{- end }}
+        {{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }}
+        {{- include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) | nindent 8 }}
         {{- end }}
     spec:
       {{- include "rabbitmq.imagePullSecrets" . | nindent 6 }}
@@ -77,9 +81,8 @@ spec:
       dnsConfig: {{- include "common.tplvalues.render" (dict "value" .Values.dnsConfig "context" .) | nindent 8 }}
       {{- end }}
       terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
-      {{- if or (.Values.initContainers) (and .Values.volumePermissions.enabled .Values.persistence.enabled .Values.podSecurityContext) }}
       initContainers:
-        {{- if and .Values.volumePermissions.enabled .Values.persistence.enabled .Values.podSecurityContext }}
+        {{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
         - name: volume-permissions
           image: {{ include "rabbitmq.volumePermissions.image" . }}
           imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
@@ -89,7 +92,8 @@ spec:
             - -ec
             - |
               mkdir -p "{{ .Values.persistence.mountPath }}"
-              chown -R "{{ .Values.podSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }}" "{{ .Values.persistence.mountPath }}"
+              chown "{{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }}" "{{ .Values.persistence.mountPath }}"
+              find "{{ .Values.persistence.mountPath }}" -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | xargs chown -R "{{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }}"
           securityContext:
             runAsUser: 0
           {{- if .Values.volumePermissions.resources }}
@@ -105,13 +109,12 @@ spec:
         {{- if .Values.initContainers }}
         {{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
         {{- end }}
-      {{- end }}
       containers:
         - name: rabbitmq
           image: {{ template "rabbitmq.image" . }}
           imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
-          {{- if .Values.containerSecurityContext }}
-          securityContext: {{- toYaml .Values.containerSecurityContext | nindent 12 }}
+          {{- if .Values.containerSecurityContext.enabled }}
+          securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
           {{- end }}
           {{- if .Values.diagnosticMode.enabled }}
           command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
@@ -123,6 +126,22 @@ spec:
           {{- else if .Values.args }}
           args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
           {{- end }}
+          {{- if .Values.lifecycleHooks }}
+          lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
+          {{- else }}
+          lifecycle:
+            preStop:
+              exec:
+                command:
+                  - /bin/bash
+                  - -ec
+                  - |
+                    if [[ -f /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh ]]; then
+                        /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh -t {{ .Values.terminationGracePeriodSeconds | quote }} -d {{ ternary "true" "false" .Values.image.debug | quote }}
+                    else
+                        rabbitmqctl stop_app
+                    fi
+          {{- end }}
           env:
             - name: BITNAMI_DEBUG
               value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }}
@@ -139,7 +158,7 @@ spec:
                 fieldRef:
                   fieldPath: metadata.namespace
             - name: K8S_SERVICE_NAME
-              value: "{{ template "rabbitmq.fullname" . }}-headless"
+              value: {{ printf "%s-headless" (include "common.names.fullname" .) }}
             - name: K8S_ADDRESS_TYPE
               value: {{ .Values.clustering.addressType }}
             - name: RABBITMQ_FORCE_BOOT
@@ -208,85 +227,63 @@ spec:
             {{- if .Values.extraEnvVars }}
             {{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
             {{- end }}
-          {{- if or .Values.extraEnvVarsCM .Values.extraEnvVarsSecret }}
           envFrom:
             {{- if .Values.extraEnvVarsCM }}
             - configMapRef:
-                name: {{ tpl .Values.extraEnvVarsCM . | quote }}
+                name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
             {{- end }}
             {{- if .Values.extraEnvVarsSecret }}
             - secretRef:
-                name: {{ tpl .Values.extraEnvVarsSecret . | quote }}
+                name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
             {{- end }}
-          {{- end }}
           ports:
-            {{- if or (.Values.service.portEnabled) (not .Values.auth.tls.enabled) }}
             - name: amqp
-              containerPort: 5672
-            {{- end }}
-            {{- if .Values.auth.tls.enabled }}
-            - name: amqp-ssl
-              containerPort: {{ .Values.service.tlsPort }}
-            {{- end }}
+              containerPort: {{ .Values.containerPorts.amqp }}
             - name: dist
-              containerPort: 25672
+              containerPort: {{ .Values.containerPorts.dist }}
             - name: stats
-              containerPort: 15672
+              containerPort: {{ .Values.containerPorts.manager }}
             - name: epmd
-              containerPort: 4369
+              containerPort: {{ .Values.containerPorts.epmd }}
             {{- if .Values.metrics.enabled }}
             - name: metrics
-              containerPort: 9419
+              containerPort: {{ .Values.containerPorts.metrics }}
+            {{- end }}
+            {{- if .Values.auth.tls.enabled }}
+            - name: amqp-ssl
+              containerPort: {{ .Values.containerPorts.amqpTls }}
             {{- end }}
             {{- if .Values.extraContainerPorts }}
-            {{- toYaml .Values.extraContainerPorts | nindent 12 }}
+            {{- include "common.tplvalues.render" (dict "value" .Values.extraContainerPorts "context" $) | nindent 12 }}
             {{- end }}
           {{- if not .Values.diagnosticMode.enabled }}
           {{- if .Values.livenessProbe.enabled }}
-          livenessProbe:
+          livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }}
             exec:
               command:
                 - /bin/bash
                 - -ec
                 - rabbitmq-diagnostics -q ping
-            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 .Values.readinessProbe "enabled") "context" $) | nindent 12 }}
             exec:
               command:
                 - /bin/bash
                 - -ec
                 - rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics -q check_local_alarms
-            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.customStartupProbe }}
+          {{- if .Values.startupProbe.enabled }}
+          startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.startupProbe "enabled") "context" $) | nindent 12 }}
+            tcpSocket:
+              port: {{ternary "amqp-ssl" "amqp" .Values.auth.tls.enabled }}
+          {{- else if .Values.customStartupProbe }}
           startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
           {{- end }}
-          lifecycle:
-            preStop:
-              exec:
-                command:
-                  - /bin/bash
-                  - -ec
-                  - |
-                    if [[ -f /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh ]]; then
-                        /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh -t {{ .Values.terminationGracePeriodSeconds | quote }} -d  {{ ternary "true" "false" .Values.image.debug | quote }}
-                    else
-                        rabbitmqctl stop_app
-                    fi
           {{- end }}
           {{- if .Values.resources }}
           resources: {{- toYaml .Values.resources | nindent 12 }}
@@ -309,15 +306,12 @@ spec:
               readOnly: true
             {{- end }}
             {{- if .Values.extraVolumeMounts }}
-            {{- toYaml .Values.extraVolumeMounts | nindent 12 }}
+            {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
             {{- end }}
         {{- if .Values.sidecars }}
         {{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
         {{- end }}
       volumes:
-        {{- if .Values.persistence.volumes }}
-        {{- toYaml .Values.persistence.volumes | nindent 8 }}
-        {{- end }}
         {{- if .Values.auth.tls.enabled }}
         - name: certs
           secret:
@@ -332,7 +326,7 @@ spec:
         {{- end }}
         - name: configuration
           configMap:
-            name: {{ template "rabbitmq.fullname" . }}-config
+            name: {{ printf "%s-config" (include "common.names.fullname" .) }}
             items:
               - key: rabbitmq.conf
                 path: rabbitmq.conf
@@ -346,9 +340,8 @@ spec:
             secretName: {{ tpl .Values.loadDefinition.existingSecret . | quote }}
         {{- end }}
         {{- if .Values.extraVolumes }}
-        {{- toYaml .Values.extraVolumes | nindent 8 }}
+        {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $)  | nindent 8 }}
         {{- end }}
-  {{- if not (contains "data" (quote .Values.persistence.volumes)) }}
   {{- if not .Values.persistence.enabled }}
         - name: data
           emptyDir: {}
@@ -369,7 +362,9 @@ spec:
         {{- end }}
       spec:
         accessModes:
-          - {{ .Values.persistence.accessMode | quote }}
+          {{- range .Values.persistence.accessModes }}
+            - {{ . | quote }}
+          {{- end }}
         resources:
           requests:
             storage: {{ .Values.persistence.size | quote }}
@@ -378,4 +373,3 @@ spec:
         selector: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.selector "context" $) | nindent 10 }}
         {{- end -}}
   {{- end }}
-  {{- end }}

+ 17 - 14
bitnami/rabbitmq/templates/svc-headless.yaml

@@ -1,10 +1,13 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "rabbitmq.fullname" . }}-headless
-  namespace: {{ .Release.Namespace | quote }}
+  name: {{ include "common.names.fullname" . }}-headless
+  namespace: {{ include "common.names.namespace" . | quote }}
   labels: {{- include "common.labels.standard" . | nindent 4 }}
-  {{- if or (.Values.service.annotationsHeadless) (.Values.commonAnnotations) }}
+    {{- if .Values.commonLabels }}
+    {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
+    {{- end }}
+  {{- if or .Values.service.annotationsHeadless .Values.commonAnnotations }}
   annotations:
     {{- if .Values.commonAnnotations }}
     {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
@@ -16,25 +19,25 @@ metadata:
 spec:
   clusterIP: None
   ports:
-    - name: {{ .Values.service.epmdPortName }}
-      port: 4369
+    - name: {{ .Values.service.portNames.epmd }}
+      port: {{ .Values.service.ports.epmd }}
       targetPort: epmd
     {{- if or (.Values.service.portEnabled) (not .Values.auth.tls.enabled) }}
-    - name: amqp
-      port: {{ .Values.service.port }}
-      targetPort: {{ .Values.service.portName }}
+    - name: {{ .Values.service.portNames.amqp }}
+      port: {{ .Values.service.ports.amqp }}
+      targetPort: amqp
     {{- end }}
     {{- if .Values.auth.tls.enabled }}
-    - name: {{ .Values.service.tlsPortName }}
-      port: {{ .Values.service.tlsPort }}
+    - name: {{ .Values.service.portNames.amqpTls }}
+      port: {{ .Values.service.ports.amqpTls }}
       targetPort: amqp-tls
     {{- end }}
-    - name: {{ .Values.service.distPortName }}
-      port: {{ .Values.service.distPort }}
+    - name: {{ .Values.service.portNames.dist }}
+      port: {{ .Values.service.ports.dist }}
       targetPort: dist
     {{- if .Values.service.managerPortEnabled }}
-    - name: {{ .Values.service.managerPortName }}
-      port: {{ .Values.service.managerPort }}
+    - name: {{ .Values.service.portNames.manager }}
+      port: {{ .Values.service.ports.manager  }}
       targetPort: stats
     {{- end }}
   selector: {{ include "common.labels.matchLabels" . | nindent 4 }}

+ 39 - 27
bitnami/rabbitmq/templates/svc.yaml

@@ -1,9 +1,12 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "rabbitmq.fullname" . }}
-  namespace: {{ .Release.Namespace | quote }}
+  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 }}
     {{- if .Values.service.labels }}
     {{- include "common.tplvalues.render" (dict "value" .Values.service.labels "context" $) | nindent 4 }}
     {{- end }}
@@ -18,6 +21,9 @@ metadata:
   {{- end }}
 spec:
   type: {{ .Values.service.type }}
+  {{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }}
+  clusterIP: {{ .Values.service.clusterIP }}
+  {{- end }}
   {{- if eq .Values.service.type "LoadBalancer" }}
   {{- if not (empty .Values.service.loadBalancerIP) }}
   loadBalancerIP: {{ .Values.service.loadBalancerIP }}
@@ -26,71 +32,77 @@ spec:
   loadBalancerSourceRanges: {{- toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }}
   {{- end }}
   {{- end }}
-  {{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
+  {{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }}
   externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
   {{- end }}
+  {{- if .Values.service.sessionAffinity }}
+  sessionAffinity: {{ .Values.service.sessionAffinity }}
+  {{- end }}
+  {{- if .Values.service.sessionAffinityConfig }}
+  sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }}
+  {{- end }}
   {{- if .Values.service.externalIPs }}
   externalIPs: {{- toYaml .Values.service.externalIPs | nindent 4 }}
   {{- end }}
   ports:
     {{- if or (.Values.service.portEnabled) (not .Values.auth.tls.enabled) }}
-    - name: {{ .Values.service.portName }}
-      port: {{ .Values.service.port }}
+    - name: {{ .Values.service.portNames.amqp }}
+      port: {{ .Values.service.ports.amqp }}
       targetPort: amqp
       {{- if (eq .Values.service.type "ClusterIP") }}
       nodePort: null
-      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort)) }}
-      nodePort: {{ .Values.service.nodePort }}
+      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.amqp)) }}
+      nodePort: {{ .Values.service.nodePorts.amqp }}
       {{- end }}
     {{- end }}
     {{- if .Values.auth.tls.enabled }}
-    - name: {{ .Values.service.tlsPortName }}
-      port: {{ .Values.service.tlsPort }}
+    - name: {{ .Values.service.portNames.amqpTls }}
+      port: {{ .Values.service.ports.amqpTls }}
       targetPort: amqp-ssl
       {{- if (eq .Values.service.type "ClusterIP") }}
       nodePort: null
-      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.tlsNodePort)) }}
-      nodePort: {{ .Values.service.tlsNodePort }}
+      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.amqpTls)) }}
+      nodePort: {{ .Values.service.nodePorts.amqpTls }}
       {{- end }}
     {{- end }}
     {{- if .Values.service.epmdPortEnabled }}
-    - name: {{ .Values.service.epmdPortName }}
-      port: 4369
+    - name: {{ .Values.service.portNames.epmd }}
+      port: {{ .Values.service.ports.epmd }}
       targetPort: epmd
       {{- if (eq .Values.service.type "ClusterIP") }}
       nodePort: null
-      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.epmdNodePort)) }}
-      nodePort: {{ .Values.service.epmdNodePort }}
+      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.epmd)) }}
+      nodePort: {{ .Values.service.nodePorts.epmd }}
       {{- end }}
     {{- end }}
     {{- if .Values.service.distPortEnabled }}
-    - name: {{ .Values.service.distPortName }}
-      port: {{ .Values.service.distPort }}
+    - name: {{ .Values.service.portNames.dist }}
+      port: {{ .Values.service.ports.dist }}
       targetPort: dist
       {{- if eq .Values.service.type "ClusterIP" }}
       nodePort: null
-      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.distNodePort)) }}
-      nodePort: {{ .Values.service.distNodePort }}
+      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.dist)) }}
+      nodePort: {{ .Values.service.nodePorts.dist }}
       {{- end }}
     {{- end }}
     {{- if .Values.service.managerPortEnabled }}
-    - name: {{ .Values.service.managerPortName }}
-      port: {{ .Values.service.managerPort }}
+    - name: {{ .Values.service.portNames.manager }}
+      port: {{ .Values.service.ports.manager  }}
       targetPort: stats
       {{- if eq .Values.service.type "ClusterIP" }}
       nodePort: null
-      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.managerNodePort)) }}
-      nodePort: {{ .Values.service.managerNodePort }}
+      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.manager)) }}
+      nodePort: {{ .Values.service.nodePorts.manager }}
       {{- end }}
     {{- end }}
     {{- if .Values.metrics.enabled }}
-    - name: {{ .Values.service.metricsPortName }}
-      port: {{ .Values.service.metricsPort }}
+    - name: {{ .Values.service.portNames.metrics }}
+      port: {{ .Values.service.ports.metrics.metrics }}
       targetPort: metrics
       {{- if eq .Values.service.type "ClusterIP" }}
       nodePort: null
-      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.metricsNodePort)) }}
-      nodePort: {{ .Values.service.metricsNodePort }}
+      {{- else if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.metrics)) }}
+      nodePort: {{ .Values.service.nodePorts.metrics }}
       {{- end }}
     {{- end }}
     {{- if .Values.service.extraPorts }}

+ 9 - 6
bitnami/rabbitmq/templates/tls-secrets.yaml

@@ -5,7 +5,7 @@ apiVersion: v1
 kind: Secret
 metadata:
   name: {{ .name }}
-  namespace: {{ $.Release.Namespace | quote }}
+  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 }}
@@ -27,7 +27,7 @@ apiVersion: v1
 kind: Secret
 metadata:
   name: {{ printf "%s-tls" .Values.ingress.hostname }}
-  namespace: {{ .Release.Namespace | quote }}
+  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 }}
@@ -47,9 +47,12 @@ data:
 apiVersion: v1
 kind: Secret
 metadata:
-  name: {{ include "rabbitmq.fullname" . }}-certs
-  namespace: {{ .Release.Namespace | quote }}
+  name: {{ include "common.names.fullname" . }}-certs
+  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 }}
@@ -61,10 +64,10 @@ data:
   tls.key: {{ required "A valid .Values.auth.tls.serverKey entry required!" .Values.auth.tls.serverKey | b64enc | quote }}
   {{- else }}
   {{- $ca := genCA "rabbitmq-internal-ca" 365 }}
-  {{- $fullname := include "rabbitmq.fullname" . }}
+  {{- $fullname := include "common.names.fullname" . }}
   {{- $releaseNamespace := .Release.Namespace }}
   {{- $clusterDomain := .Values.clusterDomain }}
-  {{- $serviceName := include "rabbitmq.fullname" . }}
+  {{- $serviceName := include "common.names.fullname" . }}
   {{- $altNames := list (printf "*.%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) $fullname }}
   {{- $crt := genSignedCert $fullname nil $altNames 365 $ca }}
   ca.crt: {{ $ca.Cert | b64enc | quote }}

+ 160 - 181
bitnami/rabbitmq/values.yaml

@@ -30,13 +30,11 @@ global:
 image:
   registry: docker.io
   repository: bitnami/rabbitmq
-  tag: 3.9.16-debian-10-r0
-
+  tag: 3.9.16-debian-10-r1
   ## set to true if you would like to see extra information on logs
   ## It turns BASH and/or NAMI debugging in the image
   ##
   debug: false
-
   ## 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
@@ -57,23 +55,27 @@ image:
 ## @param nameOverride String to partially override rabbitmq.fullname template (will maintain the release name)
 ##
 nameOverride: ""
-
 ## @param fullnameOverride String to fully override rabbitmq.fullname template
 ##
 fullnameOverride: ""
-
+## @param namespaceOverride String to fully override common.names.namespace
+##
+namespaceOverride: ""
 ## @param kubeVersion Force target Kubernetes version (using Helm capabilities if not set)
 ##
 kubeVersion: ""
-
 ## @param clusterDomain Kubernetes Cluster Domain
 ##
 clusterDomain: cluster.local
-
 ## @param extraDeploy Array of extra objects to deploy with the release
 ##
 extraDeploy: []
-
+## @param commonAnnotations Annotations to add to all deployed objects
+##
+commonAnnotations: {}
+## @param commonLabels Labels to add to all deployed objects
+##
+commonLabels: {}
 ## Enable diagnostic mode in the deployment
 ##
 diagnosticMode:
@@ -93,9 +95,6 @@ diagnosticMode:
 ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
 ##
 hostAliases: []
-## @param commonAnnotations Annotations to add to all deployed objects
-##
-commonAnnotations: {}
 ## @param dnsPolicy DNS Policy for pod
 ## ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
 ## E.g.
@@ -116,7 +115,6 @@ auth:
   ## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
   ##
   username: user
-
   ## @param auth.password RabbitMQ application password
   ## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
   ##
@@ -126,7 +124,6 @@ auth:
   ## existingPasswordSecret: name-of-existing-secret
   ##
   existingPasswordSecret: ""
-
   ## @param auth.erlangCookie Erlang cookie to determine whether different nodes are allowed to communicate with each other
   ## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
   ##
@@ -164,13 +161,11 @@ auth:
 ## ref: https://www.rabbitmq.com/logging.html#log-file-location
 ##
 logs: "-"
-
 ## @param ulimitNofiles RabbitMQ Max File Descriptors
 ## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
 ## ref: https://www.rabbitmq.com/install-debian.html#kernel-resource-limits
 ##
 ulimitNofiles: "65536"
-
 ## RabbitMQ maximum available scheduler threads and online scheduler threads. By default it will create a thread per CPU detected, with the following parameters you can tune it manually.
 ## ref: https://hamidreza-s.github.io/erlang/scheduling/real-time/preemptive/migration/2016/02/09/erlang-scheduler-details.html#scheduler-threads
 ## ref: https://github.com/bitnami/charts/issues/2189
@@ -202,12 +197,10 @@ memoryHighWatermark:
 ## @param plugins List of default plugins to enable (should only be altered to remove defaults; for additional plugins use `extraPlugins`)
 ##
 plugins: "rabbitmq_management rabbitmq_peer_discovery_k8s"
-
 ## @param communityPlugins List of Community plugins (URLs) to be downloaded during container initialization
 ## Combine it with extraPlugins to also enable them.
 ##
 communityPlugins: ""
-
 ## @param extraPlugins Extra plugins to enable (single string containing a space-separated list)
 ## Use this instead of `plugins` to add new plugins
 ##
@@ -226,13 +219,11 @@ clustering:
   ## ref: https://www.rabbitmq.com/rabbitmq-queues.8.html#rebalance
   ##
   rebalance: false
-
   ## @param clustering.forceBoot Force boot of an unexpectedly shut down cluster (in an unexpected order).
   ## forceBoot executes 'rabbitmqctl force_boot' to force boot cluster shut down unexpectedly in an unknown order
   ## ref: https://www.rabbitmq.com/rabbitmqctl.8.html#force_boot
   ##
   forceBoot: false
-
   ## @param clustering.partitionHandling Switch Partition Handling Strategy. Either `autoheal` or `pause-minority` or `pause-if-all-down` or `ignore`
   ## ref: https://www.rabbitmq.com/partitions.html#automatic-handling
   ##
@@ -259,12 +250,13 @@ command: []
 ## @param args Override default container args (useful when using custom images)
 ##
 args: []
-
+## @param lifecycleHooks Overwrite livecycle for the RabbitMQ container(s) to automate configuration before or after startup
+##
+lifecycleHooks: {}
 ## @param terminationGracePeriodSeconds Default duration in seconds k8s waits for container to exit before sending kill signal.
 ## Any time in excess of 10 seconds will be spent waiting for any synchronization necessary for cluster not to lose data.
 ##
 terminationGracePeriodSeconds: 120
-
 ## @param extraEnvVars Extra environment variables to add to RabbitMQ pods
 ## E.g:
 ## extraEnvVars:
@@ -272,15 +264,28 @@ terminationGracePeriodSeconds: 120
 ##     value: BAR
 ##
 extraEnvVars: []
-
 ## @param extraEnvVarsCM Name of existing ConfigMap containing extra environment variables
 ##
 extraEnvVarsCM: ""
-
 ## @param extraEnvVarsSecret Name of existing Secret containing extra environment variables (in case of sensitive data)
 ##
 extraEnvVarsSecret: ""
 
+## Container Ports
+## @param containerPorts.amqp
+## @param containerPorts.amqpTls
+## @param containerPorts.dist
+## @param containerPorts.manager
+## @param containerPorts.epmd
+## @param containerPorts.metrics
+containerPorts:
+  amqp: 5672
+  amqpTls: 5671
+  dist: 25672
+  manager: 15672
+  epmd: 4369
+  metrics: 9419
+
 ## @param extraContainerPorts Extra ports to be included in container spec, primarily informational
 ## E.g:
 ## extraContainerPorts:
@@ -288,7 +293,6 @@ extraEnvVarsSecret: ""
 ##   containerPort: 1234
 ##
 extraContainerPorts: []
-
 ## @param configuration [string] RabbitMQ Configuration file content: required cluster configuration
 ## Do not override unless you know what you are doing.
 ## To add more configuration, use `extraConfiguration` of `advancedConfiguration` instead
@@ -317,7 +321,7 @@ configuration: |-
   {{ tpl .Values.extraConfiguration . }}
   {{- if .Values.auth.tls.enabled }}
   ssl_options.verify = {{ .Values.auth.tls.sslOptionsVerify }}
-  listeners.ssl.default = {{ .Values.service.tlsPort }}
+  listeners.ssl.default = {{ .Values.service.ports.amqpTls }}
   ssl_options.fail_if_no_peer_cert = {{ .Values.auth.tls.failIfNoPeerCert }}
   ssl_options.cacertfile = /opt/bitnami/rabbitmq/certs/ca_certificate.pem
   ssl_options.certfile = /opt/bitnami/rabbitmq/certs/server_certificate.pem
@@ -411,7 +415,6 @@ extraVolumeMounts: []
 ##     emptyDir: {}
 ##
 extraVolumes: []
-
 ## @param extraSecrets Optionally specify extra secrets to be created by the chart.
 ## This can be useful when combined with load_definitions to automatically create the secret containing the definitions to be loaded.
 ## Example:
@@ -433,12 +436,10 @@ extraSecretsPrependReleaseName: false
 ## @param replicaCount Number of RabbitMQ replicas to deploy
 ##
 replicaCount: 1
-
 ## @param schedulerName Use an alternate scheduler, e.g. "stork".
 ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
 ##
 schedulerName: ""
-
 ## RabbitMQ should be initialized one by one when building cluster for the first time.
 ## Therefore, the default value of podManagementPolicy is 'OrderedReady'
 ## Once the RabbitMQ participates in the cluster, it waits for a response from another
@@ -451,37 +452,34 @@ schedulerName: ""
 ## @param podManagementPolicy Pod management policy
 ##
 podManagementPolicy: OrderedReady
-
 ## @param podLabels RabbitMQ Pod labels. Evaluated as a template
 ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
 ##
 podLabels: {}
-
 ## @param podAnnotations RabbitMQ Pod annotations. Evaluated as a template
 ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
 ##
 podAnnotations: {}
-
-## @param updateStrategyType Update strategy type for RabbitMQ statefulset
+## @param updateStrategy.type Update strategy type for RabbitMQ statefulset
 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
 ##
-updateStrategyType: RollingUpdate
-
+updateStrategy:
+  ## StrategyType
+  ## Can be set to RollingUpdate or OnDelete
+  ##
+  type: RollingUpdate
 ## @param statefulsetLabels RabbitMQ statefulset labels. Evaluated as a template
 ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
 ##
 statefulsetLabels: {}
-
 ## @param priorityClassName Name of the priority class to be used by RabbitMQ pods, priority class needs to be created beforehand
 ## Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
 ##
 priorityClassName: ""
-
 ## @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
 ##
 podAffinityPreset: ""
-
 ## @param podAntiAffinityPreset Pod anti-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
 ##
@@ -512,17 +510,14 @@ nodeAffinityPreset:
 ## Note: podAffinityPreset, podAntiAffinityPreset, and  nodeAffinityPreset will be ignored when it's set
 ##
 affinity: {}
-
 ## @param nodeSelector Node labels for pod assignment. Evaluated as a template
 ## ref: https://kubernetes.io/docs/user-guide/node-selection/
 ##
 nodeSelector: {}
-
 ## @param tolerations Tolerations for pod assignment. Evaluated as a template
 ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
 ##
 tolerations: []
-
 ## @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
 ##
@@ -531,15 +526,15 @@ topologySpreadConstraints: []
 ## RabbitMQ pods' Security Context
 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
 ## @param podSecurityContext.enabled Enable RabbitMQ pods' Security Context
-## @param podSecurityContext.fsGroup Group ID for the filesystem used by the containers
-## @param podSecurityContext.runAsUser User ID for the service user running the pod
+## @param podSecurityContext.fsGroup Set RabbitMQ pod's Security Context fsGroup
 ##
 podSecurityContext:
   enabled: true
   fsGroup: 1001
-  runAsUser: 1001
 
-## @param containerSecurityContext RabbitMQ containers' Security Context
+## @param containerSecurityContext.enabled Enabled RabbitMQ containers' Security Context
+## @param containerSecurityContext.runAsUser Set RabbitMQ containers' Security Context runAsUser
+## @param containerSecurityContext.runAsNonRoot Set RabbitMQ container's Security Context runAsNonRoot
 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
 ## Example:
 ##   containerSecurityContext:
@@ -547,7 +542,10 @@ podSecurityContext:
 ##       drop: ["NET_RAW"]
 ##     readOnlyRootFilesystem: true
 ##
-containerSecurityContext: {}
+containerSecurityContext:
+  enabled: true
+  runAsUser: 1001
+  runAsNonRoot: true
 
 ## RabbitMQ containers' resource requests and limits
 ## ref: https://kubernetes.io/docs/user-guide/compute-resources/
@@ -605,19 +603,33 @@ readinessProbe:
   failureThreshold: 3
   successThreshold: 1
 
+## Configure RabbitMQ containers' extra options for startup probe
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
+## @param startupProbe.enabled Enable startupProbe
+## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
+## @param startupProbe.periodSeconds Period seconds for startupProbe
+## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe
+## @param startupProbe.failureThreshold Failure threshold for startupProbe
+## @param startupProbe.successThreshold Success threshold for startupProbe
+##
+startupProbe:
+  enabled: false
+  initialDelaySeconds: 10
+  timeoutSeconds: 20
+  periodSeconds: 30
+  failureThreshold: 3
+  successThreshold: 1
+
 ## @param customLivenessProbe Override default liveness probe
 ##
 customLivenessProbe: {}
-
 ## @param customReadinessProbe Override default readiness probe
 ##
 customReadinessProbe: {}
-
 ## @param customStartupProbe Define a custom startup probe
 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes
 ##
 customStartupProbe: {}
-
 ## @param initContainers Add init containers to the RabbitMQ pod
 ## Example:
 ## initContainers:
@@ -629,7 +641,6 @@ customStartupProbe: {}
 ##         containerPort: 1234
 ##
 initContainers: []
-
 ## @param sidecars Add sidecar containers to the RabbitMQ pod
 ## Example:
 ## sidecars:
@@ -673,6 +684,9 @@ serviceAccount:
   ## @param serviceAccount.automountServiceAccountToken Auto-mount the service account token in the pod
   ##
   automountServiceAccountToken: true
+  ## @param serviceAccount.annotations Annotations for service account. Evaluated as a template. Only used if `create` is `true`.
+  ##
+  annotations: {}
 
 ## Role Based Access
 ## ref: https://kubernetes.io/docs/admin/authorization/rbac/
@@ -691,7 +705,6 @@ persistence:
   ## @param persistence.enabled Enable RabbitMQ data persistence using PVC
   ##
   enabled: true
-
   ## @param persistence.storageClass PVC Storage Class for RabbitMQ data volume
   ## If defined, storageClassName: <storageClass>
   ## If set to "-", storageClassName: "", which disables dynamic provisioning
@@ -706,10 +719,10 @@ persistence:
   ##     app: my-app
   ##
   selector: {}
-  ## @param persistence.accessMode PVC Access Mode for RabbitMQ data volume
+  ## @param persistence.accessModes PVC Access Modes for RabbitMQ data volume
   ##
-  accessMode: ReadWriteOnce
-
+  accessModes:
+    - ReadWriteOnce
   ## @param persistence.existingClaim Provide an existing PersistentVolumeClaims
   ## The value is evaluated as a template
   ## So, for example, the name can depend on .Release or .Chart
@@ -727,12 +740,6 @@ persistence:
   ## If you change this value, you might have to adjust `rabbitmq.diskFreeLimit` as well
   ##
   size: 8Gi
-
-  ## @param persistence.volumes Additional volumes without creating PVC
-  ##  - name: volume_name
-  ##    emptyDir: {}
-  ##
-  volumes: []
   ## @param persistence.annotations Persistence annotations. Evaluated as a template
   ## Example:
   ## annotations:
@@ -753,103 +760,62 @@ service:
   ## @param service.portEnabled Amqp port. Cannot be disabled when `auth.tls.enabled` is `false`. Listener can be disabled with `listeners.tcp = none`.
   ##
   portEnabled: true
-
-  ## @param service.port Amqp port
-  ## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
-  ##
-  port: 5672
-
-  ## @param service.portName Amqp service port name
-  ##
-  portName: amqp
-
-  ## @param service.tlsPort Amqp TLS port
-  ##
-  tlsPort: 5671
-
-  ## @param service.tlsPortName Amqp TLS service port name
-  ##
-  tlsPortName: amqp-ssl
-
-  ## @param service.nodePort Node port override for `amqp` port, if serviceType is `NodePort` or `LoadBalancer`
-  ## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
-  ## e.g:
-  ## nodePort: 30672
-  ##
-  nodePort: ""
-
-  ## @param service.tlsNodePort Node port override for `amqp-ssl` port, if serviceType is `NodePort` or `LoadBalancer`
-  ## e.g:
-  ## tlsNodePort: 30671
-  ##
-  tlsNodePort: ""
-
   ## @param service.distPortEnabled Erlang distribution server port
   ##
   distPortEnabled: true
-
-  ## @param service.distPort Erlang distribution server port
-  ## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
-  ##
-  distPort: 25672
-
-  ## @param service.distPortName Erlang distribution service port name
-  ##
-  distPortName: dist
-
-  ## @param service.distNodePort Node port override for `dist` port, if serviceType is `NodePort`
-  ## e.g:
-  ## distNodePort: 30676
-  ##
-  distNodePort: ""
-
   ## @param service.managerPortEnabled RabbitMQ Manager port
   ## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
   ##
   managerPortEnabled: true
-
-  ## @param service.managerPort RabbitMQ Manager port
-  ##
-  managerPort: 15672
-
-  ## @param service.managerPortName RabbitMQ Manager service port name
-  ##
-  managerPortName: http-stats
-
-  ## @param service.managerNodePort Node port override for `http-stats` port, if serviceType `NodePort`
-  ## e.g:
-  ## managerNodePort: 30673
-  ##
-  managerNodePort: ""
-
-  ## @param service.metricsPort RabbitMQ Prometheues metrics port
-  ##
-  metricsPort: 9419
-
-  ## @param service.metricsPortName RabbitMQ Prometheues metrics service port name
-  ##
-  metricsPortName: metrics
-
-  ## @param service.metricsNodePort Node port override for `metrics` port, if serviceType is `NodePort`
-  ## e.g:
-  ## metricsNodePort: 30674
-  ##
-  metricsNodePort: ""
-
   ## @param service.epmdPortEnabled RabbitMQ EPMD Discovery service port
   ##
   epmdPortEnabled: true
-
-  ## @param service.epmdNodePort Node port override for `epmd` port, if serviceType is `NodePort`
-  ## e.g:
-  ## epmdNodePort: 30675
-  ##
-  epmdNodePort: ""
-
-  ## @param service.epmdPortName EPMD Discovery service port name
-  ##
-  epmdPortName: epmd
-
+  ## Service ports
+  ## @param service.ports.amqp Amqp service port
+  ## @param service.ports.amqpTls Amqp TLS service port
+  ## @param service.ports.dist Erlang distribution service port
+  ## @param service.ports.manager RabbitMQ Manager service port
+  ## @param service.ports.metrics RabbitMQ Prometheues metrics service port
+  ## @param service.ports.epmd EPMD Discovery service port
+  ##
+  ports:
+    amqp: 5672
+    amqpTls: 5671
+    dist: 25672
+    manager: 15672
+    metrics: 9419
+    epmd: 4369
+  ## Service ports name
+  ## @param service.portNames.amqp Amqp service port name
+  ## @param service.portNames.amqpTls Amqp TLS service port name
+  ## @param service.portNames.dist Erlang distribution service port name
+  ## @param service.portNames.manager RabbitMQ Manager service port name
+  ## @param service.portNames.metrics RabbitMQ Prometheues metrics service port name
+  ## @param service.portNames.epmd EPMD Discovery service port name
+  ##
+  portNames:
+    amqp: "amqp"
+    amqpTls: "amqp-ssl"
+    dist: "dist"
+    manager: "http-stats"
+    metrics: "metrics"
+    epmd: "epmd"
+
+  ## Node ports to expose
+  ## @param service.nodePorts.amqp Node port for Ampq
+  ## @param service.nodePorts.amqpTls Node port for Ampq TLS
+  ## @param service.nodePorts.dist Node port for Erlang distribution
+  ## @param service.nodePorts.manager Node port for RabbitMQ Manager
+  ## @param service.nodePorts.epmd Node port for EPMD Discovery
+  ## @param service.nodePorts.metrics Node port for RabbitMQ Prometheues metrics
+  ##
+  nodePorts:
+    amqp: ""
+    amqpTls: ""
+    dist: ""
+    manager: ""
+    epmd: ""
+    metrics: ""
   ## @param service.extraPorts Extra ports to expose in the service
   ## E.g.:
   ## extraPorts:
@@ -858,7 +824,6 @@ service:
   ##   targetPort: 1234
   ##
   extraPorts: []
-
   ## @param service.loadBalancerSourceRanges Address(es) that are allowed when service is `LoadBalancer`
   ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
   ## e.g:
@@ -866,24 +831,24 @@ service:
   ## - 10.10.10.0/24
   ##
   loadBalancerSourceRanges: []
-
   ## @param service.externalIPs Set the ExternalIPs
   ##
   externalIPs: []
-
   ## @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.loadBalancerIP Set the LoadBalancerIP
   ##
   loadBalancerIP: ""
-
+  ## @param service.clusterIP Kubernetes service Cluster IP
+  ## e.g.:
+  ## clusterIP: None
+  ##
+  clusterIP: ""
   ## @param service.labels Service labels. Evaluated as a template
   ##
   labels: {}
-
   ## @param service.annotations Service annotations. Evaluated as a template
   ## Example:
   ## annotations:
@@ -896,6 +861,17 @@ service:
   ##   external-dns.alpha.kubernetes.io/internal-hostname: rabbitmq.example.com
   ##
   annotationsHeadless: {}
+  ## @param service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
+  ## If "ClientIP", consecutive client requests will be directed to the same Pod
+  ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+  ##
+  sessionAffinity: None
+  ## @param service.sessionAffinityConfig Additional settings for the sessionAffinity
+  ## sessionAffinityConfig:
+  ##   clientIP:
+  ##     timeoutSeconds: 300
+  ##
+  sessionAffinityConfig: {}
 
 ## Configure the ingress resource that allows you to access the
 ## RabbitMQ installation. Set up the URL
@@ -913,11 +889,9 @@ ingress:
   ## @param ingress.pathType Ingress path type
   ##
   pathType: ImplementationSpecific
-
   ## @param ingress.hostname Default host for the ingress resource
   ##
   hostname: rabbitmq.local
-
   ## @param ingress.annotations Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.
   ## For a full list of possible ingress annotations, please see
   ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
@@ -930,7 +904,6 @@ ingress:
   ##   cert-manager.io/cluster-issuer: cluster-issuer-name
   ##
   annotations: {}
-
   ## @param ingress.tls Enable TLS configuration for the hostname defined at `ingress.hostname` parameter
   ## TLS certificates will be retrieved from a TLS secret with name: {{- printf "%s-tls" .Values.ingress.hostname }}
   ## You can:
@@ -939,16 +912,10 @@ ingress:
   ##   - Relay on Helm to create self-signed certificates by setting `ingress.selfSigned=true`
   ##
   tls: false
-
-  ## DEPRECATED: Use ingress.annotations instead of ingress.certManager
-  ## certManager: false
-  ##
-
   ## @param ingress.selfSigned Set this to true in order to 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
   ## e.g:
@@ -957,12 +924,19 @@ ingress:
   ##     path: /
   ##
   extraHosts: []
-
+  ## @param ingress.extraPaths An array with additional arbitrary paths that may need to be added to the ingress under the main host
+  ## e.g:
+  ## extraPaths:
+  ## - path: /*
+  ##   backend:
+  ##     serviceName: ssl-redirect
+  ##     servicePort: use-annotation
+  ##
+  extraPaths: []
   ## @param ingress.extraRules The list of additional rules to be added to this ingress record. Evaluated as a template
   ## Useful when looking for additional customization, such as using different backend
   ##
   extraRules: []
-
   ## @param ingress.extraTls The tls configuration for additional hostnames to be covered with this ingress record.
   ## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
   ## e.g:
@@ -972,7 +946,6 @@ ingress:
   ##     secretName: rabbitmq.local-tls
   ##
   extraTls: []
-
   ## @param ingress.secrets Custom TLS certificates as secrets
   ## NOTE: 'key' and 'certificate' are expected in PEM format
   ## NOTE: 'name' should line up with a 'secretName' set further up
@@ -993,7 +966,6 @@ ingress:
   ##       -----END CERTIFICATE-----
   ##
   secrets: []
-
   ## @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/
@@ -1036,7 +1008,6 @@ metrics:
   ## @param metrics.enabled Enable exposing RabbitMQ metrics to be gathered by Prometheus
   ##
   enabled: false
-
   ## @param metrics.plugins Plugins to enable Prometheus metrics in RabbitMQ
   ##
   plugins: "rabbitmq_prometheus"
@@ -1046,8 +1017,7 @@ metrics:
   ##
   podAnnotations:
     prometheus.io/scrape: "true"
-    prometheus.io/port: "{{ .Values.service.metricsPort }}"
-
+    prometheus.io/port: "{{ .Values.service.ports.metrics }}"
   ## Prometheus Service Monitor
   ## ref: https://github.com/coreos/prometheus-operator
   ##
@@ -1066,9 +1036,9 @@ metrics:
     ## scrapeTimeout: 30s
     ##
     scrapeTimeout: ""
-    ## @param metrics.serviceMonitor.relabellings MetricsRelabelConfigs to apply to samples before ingestion. DEPRECATED: Will be removed in next major.
+    ## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
     ##
-    relabellings: []
+    jobLabel: ""
     ## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping.
     ##
     relabelings: []
@@ -1078,10 +1048,6 @@ metrics:
     ## @param metrics.serviceMonitor.honorLabels honorLabels chooses the metric's labels on collisions with target labels
     ##
     honorLabels: false
-    ## @param metrics.serviceMonitor.additionalLabels Used to pass Labels that are required by the installed Prometheus Operator
-    ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
-    ##
-    additionalLabels: {}
     ## @param metrics.serviceMonitor.targetLabels Used to keep given service's labels in target
     ## e.g:
     ## - app.kubernetes.io/name
@@ -1096,6 +1062,19 @@ metrics:
     ## Could be /metrics for aggregated metrics or /metrics/per-object for more details
     ##
     path: ""
+    ## @param metrics.serviceMonitor.selector ServiceMonitor selector labels
+    ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
+    ##
+    ## selector:
+    ##   prometheus: my-prometheus
+    ##
+    selector: {}
+    ## @param metrics.serviceMonitor.labels Extra labels for the ServiceMonitor
+    ##
+    labels: {}
+    ## @param metrics.serviceMonitor.annotations Extra annotations for the ServiceMonitor
+    ##
+    annotations: {}
 
   ## Custom PrometheusRule to be defined
   ## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart
@@ -1116,7 +1095,7 @@ metrics:
     ## These are just examples rules inspired from https://awesome-prometheus-alerts.grep.to/rules.html
     ## rules:
     ##   - alert: RabbitmqDown
-    ##     expr: rabbitmq_up{service="{{ template "rabbitmq.fullname" . }}"} == 0
+    ##     expr: rabbitmq_up{service="{{ template "common.names.fullname" . }}"} == 0
     ##     for: 5m
     ##     labels:
     ##       severity: error
@@ -1125,7 +1104,7 @@ metrics:
     ##       description: RabbitMQ node down
     ##   - alert: ClusterDown
     ##     expr: |
-    ##       sum(rabbitmq_running{service="{{ template "rabbitmq.fullname" . }}"})
+    ##       sum(rabbitmq_running{service="{{ template "common.names.fullname" . }}"})
     ##       < {{ .Values.replicaCount }}
     ##     for: 5m
     ##     labels:
@@ -1136,7 +1115,7 @@ metrics:
     ##           Less than {{ .Values.replicaCount }} nodes running in RabbitMQ cluster
     ##           VALUE = {{ "{{ $value }}" }}
     ##   - alert: ClusterPartition
-    ##     expr: rabbitmq_partitions{service="{{ template "rabbitmq.fullname" . }}"} > 0
+    ##     expr: rabbitmq_partitions{service="{{ template "common.names.fullname" . }}"} > 0
     ##     for: 5m
     ##     labels:
     ##       severity: error
@@ -1147,8 +1126,8 @@ metrics:
     ##           VALUE = {{ "{{ $value }}" }}
     ##   - alert: OutOfMemory
     ##     expr: |
-    ##       rabbitmq_node_mem_used{service="{{ template "rabbitmq.fullname" . }}"}
-    ##       / rabbitmq_node_mem_limit{service="{{ template "rabbitmq.fullname" . }}"}
+    ##       rabbitmq_node_mem_used{service="{{ template "common.names.fullname" . }}"}
+    ##       / rabbitmq_node_mem_limit{service="{{ template "common.names.fullname" . }}"}
     ##       * 100 > 90
     ##     for: 5m
     ##     labels:
@@ -1159,7 +1138,7 @@ metrics:
     ##           Memory available for RabbmitMQ is low (< 10%)\n  VALUE = {{ "{{ $value }}" }}
     ##           LABELS: {{ "{{ $labels }}" }}
     ##   - alert: TooManyConnections
-    ##     expr: rabbitmq_connectionsTotal{service="{{ template "rabbitmq.fullname" . }}"} > 1000
+    ##     expr: rabbitmq_connectionsTotal{service="{{ template "common.names.fullname" . }}"} > 1000
     ##     for: 5m
     ##     labels:
     ##       severity: warning
@@ -1191,7 +1170,7 @@ volumePermissions:
   image:
     registry: docker.io
     repository: bitnami/bitnami-shell
-    tag: 10-debian-10-r408
+    tag: 10-debian-10-r409
     ## 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