Helm chartv2.5.1App 1.4.1

An open-source, cloud-native messaging system

About this chart

NATS

NATS is an open-source, cloud-native messaging system. It provides a lightweight server that is written in the Go programming language.

TL;DR

$ helm install <helm-repo>/nats

$ helm install stable/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. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the BKPR.

Prerequisites

  • Kubernetes 1.4+ with Beta APIs enabled
  • PV provisioner support in the underlying infrastructure

Installing the Chart

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

$ helm install --name my-release <helm-repo>/nats

$ helm install --name my-release stable/nats The command deploys NATS on the Kubernetes cluster in the default configuration. The configuration 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.

Configuration

The following table lists the configurable parameters of the NATS chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.registryNATS image registrydocker.io
image.repositoryNATS Image namebitnami/nats
image.tagNATS Image tag{VERSION}
image.pullPolicyImage pull policyAlways
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
auth.enabledSwitch to enable/disable client authenticationtrue
auth.userClient authentication usernats_cluster
auth.passwordClient authentication passwordrandom alhpanumeric string (10)
auth.tokenClient authentication tokennil
clusterAuth.enabledSwitch to enable/disable cluster authenticationtrue
clusterAuth.userCluster authentication usernats_cluster
clusterAuth.passwordCluster authentication passwordrandom alhpanumeric string (10)
clusterAuth.tokenCluster authentication tokennil
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 connectionsnil
maxControlLineMax. protocol control linenil
maxPayloadMax. payloadnil
writeDeadlineDuration the server can block on a socket write to a clientnil
replicaCountNumber of NATS nodes1
resourceTypeNATS cluster resource type under Kubernetes (Supported: StatefulSets, or Deployment)statefulset
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the container1001
securityContext.runAsUserUser ID for the container1001
statefulset.updateStrategyStatefulsets Update strategyOnDelete
statefulset.rollingUpdatePartitionPartition for Rolling Update strategynil
podLabelsAdditional labels to be added to pods{}
priorityClassNameName of pod priority classnil
podAnnotationsAnnotations to be added to pods{}
nodeSelectorNode labels for pod assignmentnil
schedulerNameName of an alternatenil
antiAffinityAnti-affinity for pod assignmentsoft
tolerationsToleration labels for pod assignmentnil
resourcesCPU/Memory resource requests/limits{}
extraArgsOptional flags for NATS[]
livenessProbe.initialDelaySecondsDelay before liveness probe is initiated30
livenessProbe.periodSecondsHow often to perform the probe10
livenessProbe.timeoutSecondsWhen the probe times out5
livenessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed.1
livenessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.6
readinessProbe.initialDelaySecondsDelay before readiness probe is initiated5
readinessProbe.periodSecondsHow often to perform the probe10
readinessProbe.timeoutSecondsWhen the probe times out5
readinessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.6
readinessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed.1
client.service.typeKubernetes Service type (NATS client)ClusterIP
client.service.portNATS client port4222
client.service.nodePortPort to bind to for NodePort service type (NATS client)nil
client.service.annotationsAnnotations for NATS client service{}
client.service.loadBalancerIPloadBalancerIP if NATS client service type is LoadBalancernil
cluster.service.typeKubernetes Service type (NATS cluster)ClusterIP
cluster.service.portNATS cluster port6222
cluster.service.nodePortPort to bind to for NodePort service type (NATS cluster)nil
cluster.service.annotationsAnnotations for NATS cluster service{}
cluster.service.loadBalancerIPloadBalancerIP if NATS cluster service type is LoadBalancernil
monitoring.service.typeKubernetes Service type (NATS monitoring)ClusterIP
monitoring.service.portNATS monitoring port8222
`

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 v2.5.1 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