Skip to main content

NATS

Opni requires a NATS cluster to enable communication between services. The deployment of a NATS cluster is configured by a subsection of the OpniCluster resource.

example.yaml

apiVersion: opni.io/v1beta1
kind: OpniCluster
metadata:
name: example
namespace: opni
spec:
nats:
authMethod: nkey

Custom Resource Specs

NatsSpec

FieldRequiredTypeDescription
authMethodNostringMust be either username or nkey. Defaults to nkey
replicasNointNumber of NATS replicas to deploy (should be an odd number). Defaults to 3
usernameNostringUsername to use with the username auth method. If not set defaults to nats-user
passwordFromNoSecretKeySelectorSecret key containing the password to use. If not set then a random password will be generated and used
nodeSelectorNomapNodeSelector for the cluster pods. If this exists it will override the globalNodeSelector
tolerationsNoToleration arrayTolerations for the cluster pods. These will be combined with the globalTolerations (if any)