1################################################################################
3################################################################################
6 # global image pull policy to use for all container images in the chart
7 # can be overridden by individual image pullPolicy
9 # global list of secret names to use as image pull secrets for all pod specs in the chart
10 # secrets must exist in the same namespace
11 # https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
13 # global registry to use for all container images in the chart
14 # can be overridden by individual image registry
16 # global labels will be applied to all resources deployed by the chart
18################################################################################
20################################################################################
21# override name of the chart
23# override full name of the chart+release
25# override the namespace that resources are installed into
27# reference a common CA Certificate or Bundle in all nats config `tls` blocks and nats-box contexts
28# note: `tls.verify` still must be set in the appropriate nats config `tls` blocks to require mTLS
31 # set configMapName in order to mount an existing configMap to dir
33 # set secretName in order to mount an existing secretName to dir
35 # directory to mount the configMap or secret to
36 dir: /etc/nats-ca-cert
37 # key in the configMap or secret that contains the CA Certificate or Bundle
39################################################################################
40# NATS Stateful Set and associated resources
41################################################################################
43############################################################
45############################################################
50 # must be 2 or higher when jetstream is enabled
52 # set to false to allow cluster nodes to advertise their addresses
53 # so that clients can reconnect without extra DNS lookups.
54 # Note: in case clients have external connectivity make sure to define the `advertise` section as well.
55 # If clients are behind a load balancer it is best to leave this as is.
57 # apply to generated route URLs that connect to other pods in the StatefulSet
59 # if both user and password are set, they will be added to route URLs
60 # and the cluster authorization block
63 # set to true to use FQDN in route URLs
65 k8sClusterDomain: cluster.local
68 # set secretName in order to mount an existing secret to dir
70 dir: /etc/nats-certs/cluster
73 # merge or patch the tls config
74 # https://docs.nats.io/running-a-nats-service/configuration/securing_nats/tls
77 # merge or patch the cluster config
78 # https://docs.nats.io/running-a-nats-service/configuration/clustering/cluster_config
86 ############################################################
87 # stateful set -> volume claim templates -> jetstream pvc
88 ############################################################
93 # merge or patch the jetstream pvc
94 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#persistentvolumeclaim-v1-core
97 # defaults to "{{ include "nats.fullname" $ }}-js"
99 # defaults to the PVC size
103 # ensure that container has a sufficient memory limit greater than maxSize
105 # merge or patch the jetstream config
106 # https://docs.nats.io/running-a-nats-service/configuration#jetstream
113 # set secretName in order to mount an existing secret to dir
115 dir: /etc/nats-certs/nats
118 # merge or patch the tls config
119 # https://docs.nats.io/running-a-nats-service/configuration/securing_nats/tls
127 # set secretName in order to mount an existing secret to dir
129 dir: /etc/nats-certs/leafnodes
132 # merge or patch the tls config
133 # https://docs.nats.io/running-a-nats-service/configuration/securing_nats/tls
136 # merge or patch the leafnodes config
137 # https://docs.nats.io/running-a-nats-service/configuration/leafnodes/leafnode_conf
145 # set secretName in order to mount an existing secret to dir
147 dir: /etc/nats-certs/websocket
150 # merge or patch the tls config
151 # https://docs.nats.io/running-a-nats-service/configuration/securing_nats/tls
154 ############################################################
156 ############################################################
157 # service must be enabled also
160 # must contain at least 1 host otherwise ingress will not be created
164 # sets to the ingress class name
166 # set to an existing secret name to enable TLS on the ingress; applies to all hosts
168 # merge or patch the ingress
169 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#ingress-v1-networking-k8s-io
172 # defaults to "{{ include "nats.fullname" $ }}-ws"
174 # merge or patch the websocket config
175 # https://docs.nats.io/running-a-nats-service/configuration/websocket/websocket_conf
183 # set secretName in order to mount an existing secret to dir
185 dir: /etc/nats-certs/mqtt
188 # merge or patch the tls config
189 # https://docs.nats.io/running-a-nats-service/configuration/securing_nats/tls
192 # merge or patch the mqtt config
193 # https://docs.nats.io/running-a-nats-service/configuration/mqtt/mqtt_config
201 # set secretName in order to mount an existing secret to dir
203 dir: /etc/nats-certs/gateway
206 # merge or patch the tls config
207 # https://docs.nats.io/running-a-nats-service/configuration/securing_nats/tls
210 # merge or patch the gateway config
211 # https://docs.nats.io/running-a-nats-service/configuration/gateways/gateway#gateway-configuration-block
218 # config.nats.tls must be enabled also
219 # when enabled, monitoring port will use HTTPS with the options from config.nats.tls
220 # if promExporter is also enabled, consider setting promExporter.monitorDomain
228 ############################################################
229 # stateful set -> volume claim templates -> resolver pvc
230 ############################################################
235 # merge or patch the pvc
236 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#persistentvolumeclaim-v1-core
239 # defaults to "{{ include "nats.fullname" $ }}-resolver"
241 # merge or patch the resolver
242 # https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/jwt/resolver
245 # period the server waits after entering lame duck mode before starting
247 lameDuckGracePeriod: 10s
248 # period over which the server evicts all clients after the grace period
249 # https://docs.nats.io/running-a-nats-service/nats_admin/lame_duck_mode
250 # note: podTemplate.terminationGracePeriodSeconds should be at least
251 # lameDuckGracePeriod + lameDuckDuration + 20s shutdown overhead
252 lameDuckDuration: 30s
253 # adds a prefix to the server name, which defaults to the pod name
254 # helpful for ensuring server name is unique in a super cluster
256 # merge or patch the nats config
257 # https://docs.nats.io/running-a-nats-service/configuration
258 # following special rules apply
259 # 1. strings that start with << and end with >> will be unquoted
260 # use this for variables and numbers with units
261 # 2. keys ending in $include will be switched to include directives
262 # keys are sorted alphabetically, use prefix before $includes to control includes ordering
263 # paths should be relative to /etc/nats-config/nats.conf
267 # $include: ./my-config.conf
268 # zzz$include: ./my-config-last.conf
271 # token: << $TOKEN >>
273 # max_memory_store: << 1GB >>
275 # will yield the config:
277 # include ./my-config.conf;
282 # "max_memory_store": 1GB
284 # "server_name": "nats",
285 # include ./my-config-last.conf;
289############################################################
290# stateful set -> pod template -> nats container
291############################################################
294 repository: chainguard-private/nats
298 # if digest is provided, it overrides tag (example: "sha256:abcdef1234567890")
299 digest: sha256:0aa61ef7920aec1151f71c55c98d38b285bada881e0be227beb47df88ddffb8e
300 # if fullImageName is provided, it overrides registry, repository, tag, and digest
302 # container port options
303 # must be enabled in the config section also
304 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#containerport-v1-core
314 # map with key as env var name, value can be string or map
325 # probes are only applied when config.monitor is enabled
326 # scheme is set to HTTPS automatically when config.monitor.tls is enabled
327 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#probe-v1-core
332 initialDelaySeconds: 10
339 path: /healthz?js-server-only=true
341 initialDelaySeconds: 10
348 path: /healthz?js-enabled-only=true
350 initialDelaySeconds: 10
355 # merge or patch the container
356 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#container-v1-core
359 # container resources
367############################################################
368# stateful set -> pod template -> reloader container
369############################################################
373 repository: chainguard-private/nats-server-config-reloader
377 digest: sha256:b4323535761ce07548bcc87b749eb4f5f22713a69d088e8abdbb48eb09dd2949
379 # env var map, see nats.env for an example
381 # all nats container volume mounts with the following prefixes
382 # will be mounted into the reloader container
383 natsVolumeMountPrefixes:
385 # merge or patch the container
386 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#container-v1-core
389############################################################
390# stateful set -> pod template -> prom-exporter container
391############################################################
392# config.monitor must be enabled
396 repository: chainguard-private/prometheus-nats-exporter
400 digest: sha256:c554ea9123576f945f6e07ec85cb594c76542d80aea4a10b5d6c194b79d1f4d0
403 # if config.monitor.tls.enabled is set to true, monitorDomain must be set to the common name
404 # or a SAN used in the tls certificate
405 monitorDomain: localhost
406 # env var map, see nats.env for an example
408 # merge or patch the container
409 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#container-v1-core
412 ############################################################
413 # prometheus pod monitor
414 ############################################################
417 # merge or patch the pod monitor
418 # https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.PodMonitor
421 # defaults to "{{ include "nats.fullname" $ }}"
423############################################################
425############################################################
428 # service port options
429 # additional boolean field enable to control whether port is exposed in the service
430 # must be enabled in the config section also
431 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#serviceport-v1-core
449 # merge or patch the service
450 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#service-v1-core
453 # defaults to "{{ include "nats.fullname" $ }}"
455############################################################
456# other nats extension points
457############################################################
461 # merge or patch the stateful set
462 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#statefulset-v1-apps
465 # defaults to "{{ include "nats.fullname" $ }}"
467# stateful set -> pod template
469 # adds a hash of the ConfigMap as a pod annotation
470 # this will cause the StatefulSet to roll when the ConfigMap is updated
471 # set to true to force pod rollouts on config changes instead of using the reloader for hot updates
472 configChecksumAnnotation: false
473 # how long to wait for graceful shutdown
474 # should be at least config.lameDuckGracePeriod + config.lameDuckDuration
475 # + 20s shutdown overhead
476 terminationGracePeriodSeconds: 60
477 # map of topologyKey: topologySpreadConstraint
478 # labelSelector will be added to match StatefulSet pods
480 # topologySpreadConstraints:
481 # kubernetes.io/hostname:
484 topologySpreadConstraints: {}
485 # merge or patch the pod template
486 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#pod-v1-core
491 # merge or patch the headless service
492 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#service-v1-core
495 # defaults to "{{ include "nats.fullname" $ }}-headless"
499 # merge or patch the config map
500 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#configmap-v1-core
503 # defaults to "{{ include "nats.fullname" $ }}-config"
505# pod disruption budget
508 # merge or patch the pod disruption budget
509 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#poddisruptionbudget-v1-policy
512 # defaults to "{{ include "nats.fullname" $ }}"
517 # merge or patch the service account
518 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#serviceaccount-v1-core
521 # defaults to "{{ include "nats.fullname" $ }}"
523############################################################
526# NATS Box Deployment and associated resources
527############################################################
530 ############################################################
532 ############################################################
536 # set contents in order to create a secret with the creds file contents
538 # set secretName in order to mount an existing secret to dir
540 # defaults to /etc/nats-creds/<context-name>
544 # set contents in order to create a secret with the nkey file contents
546 # set secretName in order to mount an existing secret to dir
548 # defaults to /etc/nats-nkeys/<context-name>
551 # used to connect with client certificates
553 # set secretName in order to mount an existing secret to dir
555 # defaults to /etc/nats-certs/<context-name>
559 # merge or patch the context
560 # https://docs.nats.io/using-nats/nats-tools/nats_cli#nats-contexts
563 # name of context to select by default
564 defaultContextName: default
565 ############################################################
566 # deployment -> pod template -> nats-box container
567 ############################################################
570 repository: chainguard-private/nats-box
574 digest: sha256:28e34cb49ef1282d8c2893c700ad6780f651ec411e859fed8cdd5faf21f52926
577 # env var map, see nats.env for an example
579 # merge or patch the container
580 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#container-v1-core
583 ############################################################
584 # other nats-box extension points
585 ############################################################
589 # merge or patch the deployment
590 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#deployment-v1-apps
593 # defaults to "{{ include "nats.fullname" $ }}-box"
595 # deployment -> pod template
597 # merge or patch the pod template
598 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#pod-v1-core
603 # merge or patch the context secret
604 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secret-v1-core
607 # defaults to "{{ include "nats.fullname" $ }}-box-contexts"
611 # merge or patch the contents secret
612 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secret-v1-core
615 # defaults to "{{ include "nats.fullname" $ }}-box-contents"
620 # merge or patch the service account
621 # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#serviceaccount-v1-core
624 # defaults to "{{ include "nats.fullname" $ }}-box"
626################################################################################
627# Extra user-defined resources
628################################################################################
630# add arbitrary user-generated resources
637# - apiVersion: networking.istio.io/v1beta1
638# kind: VirtualService
642# {{ include "nats.fullname" $ | quote }}
645# {{ include "nats.labels" $ }}
661# {{ .Values.service.name | quote }}
665# {{ .Values.config.websocket.port }}