Skip to content

NATS Custom Resource ​

The CustomResourceDefinition (CRD) nats.operator.kyma-project.io describes the the NATS custom resource (CR) in detail.

To show the current CRD, run the following command:

shell
kubectl get crd nats.operator.kyma-project.io -o yaml

View the complete NATS CRD including detailed descriptions for each field.

The NATS CR configures the settings of NATS JetStream. To edit the settings, run:

shell
kubectl edit -n kyma-system nats.operator.kyma-project.io <NATS CR Name>

The CRD is equipped with validation rules and defaulting, so the CR is automatically filled with sensible defaults. You can override the defaults. The validation rules provide guidance when you edit the CR.

Examples ​

Use the following sample CRs as guidance. Each can be applied immediately when you install the NATS Manager.

Reference ​

NATS.operator.kyma-project.io/v1alpha1 ​

Spec:

ParameterTypeDescription
annotationsmap[string]stringAnnotations allows to add annotations to NATS.
clusterobjectCluster defines configurations that are specific to NATS clusters.
cluster.​sizeintegerSize of a NATS cluster, i.e. number of NATS nodes.
jetStreamobjectJetStream defines configurations that are specific to NATS JetStream.
jetStream.​fileStorageobjectFileStorage defines configurations to file storage in NATS JetStream.
jetStream.​fileStorage.​size{integer or string}Size defines the file storage size.
jetStream.​fileStorage.​storageClassNamestringStorageClassName defines the file storage class name.
jetStream.​memStorageobjectMemStorage defines configurations to memory storage in NATS JetStream.
jetStream.​memStorage.​enabledbooleanEnabled allows the enablement of memory storage.
jetStream.​memStorage.​size{integer or string}Size defines the mem.
labelsmap[string]stringLabels allows to add Labels to NATS.
loggingobjectJetStream defines configurations that are specific to NATS logging in NATS.
logging.​debugbooleanDebug allows debug logging.
logging.​tracebooleanTrace allows trace logging.
resourcesobjectResources defines resources for NATS.
resources.​claims[]objectClaims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers.
resources.​claims.​name (required)stringName must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
resources.​claims.​requeststringRequest is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.
resources.​limitsmap[string]{integer or string}Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources.​requestsmap[string]{integer or string}Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

Status:

ParameterTypeDescription
availabilityZonesUsedinteger
conditions[]objectCondition contains details for one aspect of the current state of this API Resource.
conditions.​lastTransitionTime (required)stringlastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
conditions.​message (required)stringmessage is a human readable message indicating details about the transition. This may be an empty string.
conditions.​observedGenerationintegerobservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
conditions.​reason (required)stringreason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
conditions.​status (required)stringstatus of the condition, one of True, False, Unknown.
conditions.​type (required)stringtype of condition in CamelCase or in foo.example.com/CamelCase.
state (required)string
urlstring