Helm chartv7.4.10App 2.9.4

NATS is an open source, lightweight and high-performance messaging system. It is ideal for distributed systems and supports modern cloud architectures and pub-sub, request-reply and queuing models.

About this chart

NATS packaged by Bitnami

NATS is an open source, lightweight and high-performance messaging system. It is ideal for distributed systems and supports modern cloud architectures and pub-sub, request-reply and queuing models.

Overview of NATS

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

Azure-ready Charts with Containers from marketplace.azurecr.io

This Helm Chart has been configured to pull the Container Images from the Azure Marketplace Public Repository. The following command allows you to download and install all the charts from this repository.

$ helm repo add bitnami-azure https://marketplace.azurecr.io/helm/v1/repo

TL;DR

$ helm repo add my-repo https://charts.bitnami.com/bitnami
$ helm install my-release my-repo/nats

Introduction

This chart bootstraps a NATS deployment on a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+

Installing the Chart

To install the chart with the release name my-release:

$ helm install my-release my-repo/nats

The command deploys NATS on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override common.names.fullname template (will maintain the release name)""
fullnameOverrideString to fully override common.names.fullname template""
commonLabelsAdd labels to all the deployed resources{}
commonAnnotationsAdd annotations to all the deployed resources{}
clusterDomainKubernetes Cluster Domaincluster.local
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the deployment["sleep"]
diagnosticMode.argsArgs to override all containers in the deployment["infinity"]

NATS parameters

NameDescriptionValue
image.registryNATS image registrydocker.io
image.repositoryNATS image repositorybitnami/nats
image.tagNATS image tag (immutable tags are recommended)2.9.4-debian-11-r0
image.digestNATS image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyNATS image pull policyIfNotPresent
image.pullSecretsNATS image pull secrets[]
image.debugEnable NATS image debug modefalse
auth.enabledSwitch to enable/disable client authenticationtrue
auth.userClient authentication usernats_client
auth.passwordClient authentication password""
auth.tokenClient authentication token""
auth.timeoutClient authentication timeout (seconds)1
auth.usersCredentialsClient authentication users credentials collection[]
auth.noAuthUserClient authentication username from auth.usersCredentials map to be used when no credentials provided""
cluster.connectRetriesConfigure number of connect retries for implicit routes, otherwise leave blank""
cluster.auth.enabledSwitch to enable/disable cluster authenticationtrue
cluster.auth.userCluster authentication usernats_cluster
cluster.auth.passwordCluster authentication password""
cluster.auth.tokenCluster authentication token""
debug.enabledSwitch to enable/disable debug on loggingfalse
debug.traceSwitch to enable/disable trace debug level on loggingfalse
debug.logtimeSwitch to enable/disable logtime on loggingfalse
maxConnectionsMax. number of client connections""
maxControlLineMax. protocol control line""
maxPayloadMax. payload""
writeDeadlineDuration the server can block on a socket write to a client""
natsFilenameFilename used by several NATS files (binary, configuration file, and pid file)nats-server
configurationSpecify content for NATS configuration file (generated based on other parameters otherwise)""
existingSecretThe name of an existing Secret with your custom configuration for NATS""
commandOverride default container command (useful when using custom images)[]
argsOverride default container args (useful when using custom images)[]
extraEnvVarsExtra environment variables to be set on NATS container[]
extraEnvVarsCMConfigMap with extra environment variables""
extraEnvVarsSecretSecret with extra environment variables""

NATS deployment/statefulset parameters

NameDescriptionValue
resourceTypeNATS cluster resource type under Kubernetes. Allowed values: statefulset (default) or deploymentstatefulset
replicaCountNumber of NATS nodes1
schedulerNameUse an alternate scheduler, e.g. "stork".""
priorityClassNameName of pod priority class""
updateStrategy.typeStrategyType. Can be set to RollingUpdate or OnDeleteRollingUpdate
containerPorts.clientNATS client container port4222
containerPorts.clusterNATS cluster container port6222
containerPorts.monitoringNATS monitoring container port8222
podSecurityContext.enabledEnabled NATS pods' Security Contextfalse
podSecurityContext.fsGroupSet NATS pod's Security Context fsGroup1001
containerSecurityContext.enabledEnabled NATS containers' Security Contextfalse
containerSecurityContext.runAsUserSet NATS containers' Security Context runAsUser1001
containerSecurityContext.runAsNonRootSet NATS containers' Security Context runAsNonRoottrue
resources.limitsThe resources limits for the NATS containers{}
resources.requestsThe requested resources for the NATS containers{}
livenessProbe.enabledEnable livenessProbetrue
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe30
livenessProbe.periodSecondsPeriod seconds for livenessProbe10
livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
livenessProbe.failureThresholdFailure threshold for livenessProbe6
livenessProbe.successThresholdSuccess threshold for livenessProbe1
readinessProbe.enabledEnable readinessProbetrue
readinessProbe.initialDelaySecondsInitial delay seconds for readinessProbe5
readinessProbe.periodSecondsPeriod s

Deploy nats with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nats on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnats is pinned at v7.4.10 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply