Skip to content

API Reference

Package v1alpha1 contains the schema definitions for NAuth custom resources (see Kubernetes API conventions).

All NAuth CRDs are standard Kubernetes resources and include:

  • apiVersion: API group/version, for example nauth.io/v1alpha1
  • kind: resource type, for example Account, User, or NatsCluster
  • metadata: Kubernetes object metadata (name, namespace, labels, annotations, etc.). See Kubernetes ObjectMeta

Account is the schema for accounts.

FieldTypeRequiredNotes
apiVersionstringYesnauth.io/v1alpha1
kindstringYesAccount
metadataObjectMetaYesKubernetes metadata
specAccountSpecNoDesired state
statusAccountStatusNoObserved state
FieldTypeRequiredNotes
natsClusterRefNatsClusterRefNoExplicit NatsCluster reference
displayNamestringNoOptional account display name
accountLimitsAccountLimitsNoAccount-level limits
exportsExport[]NoAccount exports
importsImport[]NoAccount imports
jetStreamLimitsJetStreamLimitsNoJetStream limits
natsLimitsNatsLimitsNoNATS limits
FieldTypeRequiredNotes
claimsAccountClaimsNoEffective account claims
conditionsmetav1.Condition[]NoStandard Kubernetes conditions
observedGenerationint64NoLast observed generation
reconcileTimestampmetav1.TimeNoLast reconcile timestamp
operatorVersionstringNoOperator version that reconciled the resource
FieldType
accountLimitsAccountLimits
displayNamestring
signingKeysSigningKey[]
exportsExport[]
importsImport[]
jetStreamLimitsJetStreamLimits
natsLimitsNatsLimits
FieldTypeDefault
importsint64-1
exportsint64-1
wildcardsbooltrue
connint64-1
leafint64-1
FieldTypeDefault
memStorageint64-1
diskStorageint64-1
streamsint64-1
consumerint64-1
maxAckPendingint64-1
memMaxStreamBytesint64-1
diskMaxStreamBytesint64-1
maxBytesRequiredboolfalse
FieldType
keystring

User is the schema for users.

FieldTypeRequiredNotes
apiVersionstringYesnauth.io/v1alpha1
kindstringYesUser
metadataObjectMetaYesKubernetes metadata
specUserSpecNoDesired state
statusUserStatusNoObserved state
FieldTypeRequiredNotes
accountNamestringYesReferenced account name
displayNamestringNoOptional user display name
permissionsPermissionsNoPublish/subscribe/response permissions
userLimitsUserLimitsNoUser limits
natsLimitsNatsLimitsNoNATS limits
FieldTypeRequiredNotes
conditionsmetav1.Condition[]NoStandard Kubernetes conditions
claimsUserClaimsNoEffective user claims
observedGenerationint64NoLast observed generation
reconcileTimestampmetav1.TimeNoLast reconcile timestamp
operatorVersionstringNoOperator version that reconciled the resource
FieldTypeNotes
accountNamestringDeprecated
displayNamestringEffective display name
permissionsPermissionsEffective permissions
natsLimitsNatsLimitsEffective NATS limits
userLimitsUserLimitsEffective user limits

NatsCluster is the schema for cluster connection configuration and secret references.

FieldTypeRequiredNotes
apiVersionstringYesnauth.io/v1alpha1
kindstringYesNatsCluster
metadataObjectMetaYesKubernetes metadata
specNatsClusterSpecNoDesired state
statusNatsClusterStatusNoObserved state

Validation rule: exactly one of url or urlFrom must be specified.

FieldTypeRequiredNotes
urlstringConditionalDirect NATS URL. Mutually exclusive with urlFrom
urlFromURLFromReferenceConditionalIndirect URL source. Mutually exclusive with url
operatorSigningKeySecretRefSecretKeyReferenceYesOperator signing key secret reference
systemAccountUserCredsSecretRefSecretKeyReferenceYesSystem account user creds secret reference
FieldTypeRequiredNotes
conditionsmetav1.Condition[]NoStandard Kubernetes conditions
observedGenerationint64NoLast observed generation
reconcileTimestampmetav1.TimeNoLast reconcile timestamp
operatorVersionstringNoOperator version that reconciled the resource
FieldTypeRequiredNotes
namestringYesNatsCluster name
namespacestringNoNatsCluster namespace
FieldTypeRequiredNotes
kindURLFromKindYesConfigMap or Secret
namestringYesSource object name
namespacestringNoDefaults to the NatsCluster namespace
keystringYesKey containing the URL value

Enum values:

  • ConfigMap
  • Secret
FieldTypeRequired
namestringYes
keystringNo
FieldTypeDefault
subsint64-1
dataint64-1
payloadint64-1
FieldType
pubPermission
subPermission
respResponsePermission
FieldType
allowstring[]
denystring[]
FieldType
maxint
ttlduration
FieldTypeNotes
srcstring[]CIDR allow list
timesTimeRange[]Allowed time windows
timesLocationstringTimezone location
FieldType
startstring
endstring
FieldTypeNotes
namestring
subjectstring
typeenum (stream, service)
tokenReqbool
revocationsmap[string]int64
responseTypeenum (Singleton, Stream, Chunked)Service exports only
responseThresholdduration
serviceLatencyServiceLatency
accountTokenPositionuint
advertisebool
allowTracebool
FieldTypeRequiredNotes
accountRefAccountRefYesReferenced account resource
namestringNo
subjectstringNoExported subject to import
accountstringNoRaw account id
localSubjectstringNoLocal remapped subject
typeenum (stream, service)No
shareboolNo
allowTraceboolNo
FieldTypeRequired
samplingintYes
resultsstringYes
FieldTypeRequired
namestringYes
namespacestringYes

Contains a list of Account.

Contains a list of User.

Contains a list of NatsCluster.