diff --git a/stable/nats/Chart.yaml b/stable/nats/Chart.yaml index 9fb3e72f24..df824d91fb 100644 --- a/stable/nats/Chart.yaml +++ b/stable/nats/Chart.yaml @@ -1,5 +1,5 @@ name: nats -version: 0.0.2 +version: 0.0.3 appVersion: 1.1.0 description: An open-source, cloud-native messaging system keywords: diff --git a/stable/nats/README.md b/stable/nats/README.md index ee32830a3d..e3cfadf422 100644 --- a/stable/nats/README.md +++ b/stable/nats/README.md @@ -114,9 +114,11 @@ The following table lists the configurable parameters of the NATS chart and thei | `ingress.secrets[0].key` | TLS Secret Key | `nil` | | `networkPolicy.enabled` | Enable NetworkPolicy | `false` | | `networkPolicy.allowExternal` | Allow external connections | `true` | +| `sidecars` | Attach additional containers to the pod. | `nil` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + ```bash $ helm install --name my-release \ --set auth.enabled=true,auth.user=my-user,auth.password=T0pS3cr3t \ @@ -133,6 +135,20 @@ $ helm install --name my-release -f values.yaml stable/nats > **Tip**: You can use the default [values.yaml](values.yaml) +## Sidecars + +If you have a need for additional containers to run within the same pod as NATS (e.g. an additional metrics or logging exporter), you can do so via the `sidecars` config parameter. Simply define your container according to the Kubernetes container spec. + +```yaml +sidecars: +- name: your-image-name + image: your-image + imagePullPolicy: Always + ports: + - name: portname + containerPort: 1234 +``` + ## Production settings and horizontal scaling The [values-production.yaml](values-production.yaml) file consists a configuration to deploy a scalable and high-available NATS deployment for production environments. We recommend that you base your production configuration on this template and adjust the parameters appropriately. diff --git a/stable/nats/templates/statefulset.yaml b/stable/nats/templates/statefulset.yaml index b0b330c98f..4d7145b586 100644 --- a/stable/nats/templates/statefulset.yaml +++ b/stable/nats/templates/statefulset.yaml @@ -113,6 +113,9 @@ spec: - name: config mountPath: /opt/bitnami/nats/gnatsd.conf subPath: gnatsd.conf + {{- if .Values.sidecars }} +{{ toYaml .Values.sidecars | indent 6 }} + {{- end }} volumes: - name: config configMap: diff --git a/stable/nats/values-production.yaml b/stable/nats/values-production.yaml index ed4e07cb67..a55435ce22 100644 --- a/stable/nats/values-production.yaml +++ b/stable/nats/values-production.yaml @@ -239,3 +239,13 @@ ingress: # - name: nats.local-tls # key: # certificate: + +sidecars: +## Add sidecars to the pod. +## e.g. +# - name: your-image-name + # image: your-image + # imagePullPolicy: Always + # ports: + # - name: portname + # containerPort: 1234 diff --git a/stable/nats/values.yaml b/stable/nats/values.yaml index 039a068823..27a4610f10 100644 --- a/stable/nats/values.yaml +++ b/stable/nats/values.yaml @@ -243,3 +243,13 @@ ingress: # - name: nats.local-tls # key: # certificate: + +sidecars: +## Add sidecars to the pod. +## e.g. +# - name: your-image-name + # image: your-image + # imagePullPolicy: Always + # ports: + # - name: portname + # containerPort: 1234