v1alpha1

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the nats v1alpha1 API group. +kubebuilder:object:generate=true +groupName=nats.crewlet.cloud

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects.
	// This name is used by applyconfiguration generators (e.g. controller-gen).
	SchemeGroupVersion = schema.GroupVersion{Group: "nats.crewlet.cloud", Version: "v1alpha1"}

	// GroupVersion is an alias for SchemeGroupVersion, for backward compatibility.
	GroupVersion = SchemeGroupVersion

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AuthSpec

type AuthSpec struct {
	// jwt enables NATS decentralized authentication. When set, the operator
	// renders the `operator:`, `system_account:`, `resolver:` and
	// `resolver_preload:` directives into nats.conf from the typed fields
	// below, so users do not have to hand-write them into a Secret and
	// reference them via Config.Includes.
	// +optional
	JWT *JWTAuthSpec `json:"jwt,omitempty"`
}

AuthSpec configures how clients authenticate to the NATS cluster. In v1alpha1 only the JWT (decentralized) path is modeled — other auth modes (token, user/password, NKey) can be added later as peer fields.

func (*AuthSpec) DeepCopy

func (in *AuthSpec) DeepCopy() *AuthSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthSpec.

func (*AuthSpec) DeepCopyInto

func (in *AuthSpec) DeepCopyInto(out *AuthSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterConfig

type ClusterConfig struct {
	// port is the cluster route listener port. Defaults to 6222.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=6222
	// +optional
	Port int32 `json:"port,omitempty"`
	// noAdvertise hides cluster route addresses from clients. Defaults to true.
	// +kubebuilder:default=true
	// +optional
	NoAdvertise *bool `json:"noAdvertise,omitempty"`
	// +optional
	RouteURLs RouteURLsConfig `json:"routeURLs,omitzero"`
	// +optional
	TLS TLSBlock `json:"tls,omitzero"`
}

ClusterConfig describes how the NATS cluster routing block is rendered when the cluster is operating in multi-replica mode. There is no `enabled` field: clustering is automatically enabled iff Spec.Replicas > 1.

func (*ClusterConfig) DeepCopy

func (in *ClusterConfig) DeepCopy() *ClusterConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfig.

func (*ClusterConfig) DeepCopyInto

func (in *ClusterConfig) DeepCopyInto(out *ClusterConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigInclude

type ConfigInclude struct {
	// name is the include filename. Must be unique within the includes list
	// and is used both as the file name under /etc/nats-extra/ and as the
	// VolumeMount name. Conventionally ends in .conf.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9._-]+$`
	Name string `json:"name"`

	// secret selects a key in a Secret in the same namespace.
	// +optional
	Secret *corev1.SecretKeySelector `json:"secret,omitempty"`

	// configMap selects a key in a ConfigMap in the same namespace.
	// +optional
	ConfigMap *corev1.ConfigMapKeySelector `json:"configMap,omitempty"`
}

ConfigInclude references a user-managed Secret or ConfigMap key whose content is included verbatim into nats.conf via the native `include` directive. Exactly one of secret or configMap must be set. +kubebuilder:validation:XValidation:rule="has(self.secret) != has(self.configMap)",message="exactly one of secret or configMap must be set"

func (*ConfigInclude) DeepCopy

func (in *ConfigInclude) DeepCopy() *ConfigInclude

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigInclude.

func (*ConfigInclude) DeepCopyInto

func (in *ConfigInclude) DeepCopyInto(out *ConfigInclude)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigMapSpec

type ConfigMapSpec struct {
	// existingName, when set, tells the operator to skip generating a config
	// ConfigMap and mount the named one instead. The operator still validates
	// that it exists in the same namespace.
	// +optional
	ExistingName string `json:"existingName,omitempty"`
	// annotations are added to the generated ConfigMap.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// labels are added to the generated ConfigMap.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
}

ConfigMapSpec describes the generated nats config ConfigMap, with an existingName escape hatch for users who want to manage it themselves.

func (*ConfigMapSpec) DeepCopy

func (in *ConfigMapSpec) DeepCopy() *ConfigMapSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapSpec.

func (*ConfigMapSpec) DeepCopyInto

func (in *ConfigMapSpec) DeepCopyInto(out *ConfigMapSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContainerSpec

type ContainerSpec struct {
	// env is the list of environment variables for the nats container.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
	// envFrom is the standard list of envFrom sources.
	// +optional
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
	// resources sets the nats container resource requests/limits.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitzero"`
	// securityContext sets the nats container security context.
	// +optional
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
	// livenessProbe overrides the default liveness probe.
	// +optional
	LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
	// readinessProbe overrides the default readiness probe.
	// +optional
	ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
	// startupProbe overrides the default startup probe.
	// +optional
	StartupProbe *corev1.Probe `json:"startupProbe,omitempty"`
}

ContainerSpec describes the per-nats-container knobs. The image lives at the spec top level since almost every user sets it.

func (*ContainerSpec) DeepCopy

func (in *ContainerSpec) DeepCopy() *ContainerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerSpec.

func (*ContainerSpec) DeepCopyInto

func (in *ContainerSpec) DeepCopyInto(out *ContainerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FileStoreConfig

type FileStoreConfig struct {
	// enabled defaults to true when JetStream is enabled.
	// +optional
	Enabled *bool `json:"enabled,omitempty"`
	// pvc controls the JetStream volume claim template.
	// +optional
	PVC PVCConfig `json:"pvc,omitzero"`
	// maxSize bounds the file store. Defaults to the PVC size.
	// +optional
	MaxSize *resource.Quantity `json:"maxSize,omitempty"`
}

FileStoreConfig describes the JetStream file store. The on-disk path is fixed at /data and not user-configurable.

func (*FileStoreConfig) DeepCopy

func (in *FileStoreConfig) DeepCopy() *FileStoreConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileStoreConfig.

func (*FileStoreConfig) DeepCopyInto

func (in *FileStoreConfig) DeepCopyInto(out *FileStoreConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GlobalSpec

type GlobalSpec struct {
	// imagePullPolicy is the default image pull policy applied to every container.
	// +optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// imagePullSecrets are image pull secrets attached to every pod spec.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// imageRegistry is the default registry prefix used for every image.
	// +optional
	ImageRegistry string `json:"imageRegistry,omitempty"`

	// labels are added to every managed resource.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
}

GlobalSpec mirrors `global` from the upstream chart.

func (*GlobalSpec) DeepCopy

func (in *GlobalSpec) DeepCopy() *GlobalSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalSpec.

func (*GlobalSpec) DeepCopyInto

func (in *GlobalSpec) DeepCopyInto(out *GlobalSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HeadlessServiceSpec

type HeadlessServiceSpec struct {
	// annotations are added to the generated headless Service.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// labels are added to the generated headless Service.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
}

HeadlessServiceSpec describes the headless Service used for pod DNS.

func (*HeadlessServiceSpec) DeepCopy

func (in *HeadlessServiceSpec) DeepCopy() *HeadlessServiceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadlessServiceSpec.

func (*HeadlessServiceSpec) DeepCopyInto

func (in *HeadlessServiceSpec) DeepCopyInto(out *HeadlessServiceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageSpec

type ImageSpec struct {
	// +optional
	Repository string `json:"repository,omitempty"`
	// +optional
	Tag string `json:"tag,omitempty"`
	// +optional
	PullPolicy corev1.PullPolicy `json:"pullPolicy,omitempty"`
}

ImageSpec describes a container image. Repository accepts a full image path including registry and (optionally) digest — for example "registry.example.com/library/nats" or "nats@sha256:...". The chart's separate registry / digest / fullImageName fields are not modeled here because they are alternate spellings of the same value.

func (*ImageSpec) DeepCopy

func (in *ImageSpec) DeepCopy() *ImageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.

func (*ImageSpec) DeepCopyInto

func (in *ImageSpec) DeepCopyInto(out *ImageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JWTAccount

type JWTAccount struct {
	// name is a human-readable handle for this account. Used as the NACK
	// Account CR name suffix (`<natscluster-name>-<name>`). Must be a
	// DNS label.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
	Name string `json:"name"`

	// publicKey is the account's public key (`nsc` account identifier).
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=64
	PublicKey string `json:"publicKey"`

	// jwt references a Secret key containing the account JWT signed by the
	// operator. Required.
	// +required
	JWT corev1.SecretKeySelector `json:"jwt"`

	// userCreds, when set, tells the operator to create a NACK
	// `jetstream.nats.io/v1beta2` Account CR for this account pointing at
	// the referenced user credentials Secret. That Account CR can then be
	// referenced by NACK Stream / Consumer / KV / ObjectStore CRs via
	// their `account: <natscluster-name>-<name>` field, so users do not
	// have to repeat URLs or credentials on every JetStream resource.
	//
	// The operator does not generate the user creds — they come from
	// `nsc generate creds` and live in a user-managed Secret.
	// +optional
	UserCreds *corev1.SecretKeySelector `json:"userCreds,omitempty"`
}

JWTAccount is a single preloaded account entry.

func (*JWTAccount) DeepCopy

func (in *JWTAccount) DeepCopy() *JWTAccount

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JWTAccount.

func (*JWTAccount) DeepCopyInto

func (in *JWTAccount) DeepCopyInto(out *JWTAccount)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JWTAuthSpec

type JWTAuthSpec struct {
	// operator references a Secret key containing the operator JWT — the
	// root of trust for this cluster. Typically generated with `nsc` and
	// rotated out-of-band. Required.
	// +required
	Operator corev1.SecretKeySelector `json:"operator"`

	// systemAccount is the public key of the account with cluster-admin
	// privileges. Must match one of accounts[].publicKey. NATS account
	// public keys are 56-char base32 strings, so 64 is a comfortable cap
	// that also keeps the CEL cross-check rule's estimated cost bounded.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=64
	// +required
	SystemAccount string `json:"systemAccount"`

	// accounts is the set of preloaded accounts. Each entry supplies the
	// account's public key, a reference to a Secret containing the signed
	// account JWT, and (optionally) a reference to a user creds Secret
	// that the operator uses to create a NACK `jetstream.nats.io/v1beta2`
	// Account CR for this account.
	//
	// MaxItems caps the list at 64 because apiserver CEL rule cost is
	// estimated quadratically against unbounded lists and the
	// systemAccount cross-check rule below otherwise exceeds the budget.
	// 64 is well above any realistic number of preloaded accounts — the
	// full resolver mode is the right answer once you have more.
	// +listType=map
	// +listMapKey=name
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=64
	// +required
	Accounts []JWTAccount `json:"accounts"`

	// resolver configures how nats-server stores and looks up account JWTs
	// at runtime.
	// +optional
	Resolver JWTResolverSpec `json:"resolver,omitzero"`
}

JWTAuthSpec describes the decentralized auth tree the server trusts. The operator mounts the referenced operator JWT and account JWTs into the nats container via a managed Secret and emits an `include` directive in nats.conf pointing at the rendered auth fragment. +kubebuilder:validation:XValidation:rule="self.accounts.exists(a, a.publicKey == self.systemAccount)",message="systemAccount must match one of accounts[].publicKey"

func (*JWTAuthSpec) DeepCopy

func (in *JWTAuthSpec) DeepCopy() *JWTAuthSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JWTAuthSpec.

func (*JWTAuthSpec) DeepCopyInto

func (in *JWTAuthSpec) DeepCopyInto(out *JWTAuthSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JWTResolverSpec

type JWTResolverSpec struct {
	// type selects the resolver mode. Defaults to "memory".
	// +kubebuilder:default=memory
	// +optional
	Type JWTResolverType `json:"type,omitempty"`

	// storage is the PVC template used when type=full. The operator
	// mounts the volume at /data/resolver. Ignored for type=memory.
	// +optional
	Storage *corev1.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// allowDelete enables runtime account deletion via the system account.
	// Only honored when type=full. Defaults to false.
	// +optional
	AllowDelete *bool `json:"allowDelete,omitempty"`

	// interval is how often a `full` resolver checks for account updates.
	// Parseable by NATS server (e.g. "2m"). Only honored when type=full.
	// +optional
	Interval string `json:"interval,omitempty"`
}

JWTResolverSpec configures the runtime resolver behavior. +kubebuilder:validation:XValidation:rule="self.type != 'full' || has(self.storage)",message="storage is required when resolver.type is 'full'"

func (*JWTResolverSpec) DeepCopy

func (in *JWTResolverSpec) DeepCopy() *JWTResolverSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JWTResolverSpec.

func (*JWTResolverSpec) DeepCopyInto

func (in *JWTResolverSpec) DeepCopyInto(out *JWTResolverSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JWTResolverType

type JWTResolverType string

JWTResolverType selects how nats-server stores account JWTs at runtime. +kubebuilder:validation:Enum=memory;full

const (
	// JWTResolverMemory serves only the preloaded accounts. Accounts are
	// static for the lifetime of each pod — changes require a config
	// rewrite (which the operator handles on NatsCluster edits).
	JWTResolverMemory JWTResolverType = "memory"

	// JWTResolverFull backs accounts with on-disk storage and allows the
	// system account to push new/updated accounts at runtime without a
	// config rewrite. Requires a PVC template via `storage`.
	JWTResolverFull JWTResolverType = "full"
)

type JetStreamConfig

type JetStreamConfig struct {
	// +optional
	Enabled bool `json:"enabled,omitempty"`
	// +optional
	FileStore FileStoreConfig `json:"fileStore,omitzero"`
	// +optional
	MemoryStore MemoryStoreConfig `json:"memoryStore,omitzero"`
}

JetStreamConfig mirrors `config.jetstream`.

func (*JetStreamConfig) DeepCopy

func (in *JetStreamConfig) DeepCopy() *JetStreamConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JetStreamConfig.

func (*JetStreamConfig) DeepCopyInto

func (in *JetStreamConfig) DeepCopyInto(out *JetStreamConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ListenerConfig

type ListenerConfig struct {
	// +optional
	Enabled bool `json:"enabled,omitempty"`
	// +optional
	// +kubebuilder:validation:Minimum=1
	Port int32 `json:"port,omitempty"`
	// +optional
	TLS TLSBlock `json:"tls,omitzero"`
}

ListenerConfig is the standard listener block (enabled, port, tls) shared by leafnodes / mqtt / gateway. Free-form per-listener config goes through Config.Includes.

func (*ListenerConfig) DeepCopy

func (in *ListenerConfig) DeepCopy() *ListenerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenerConfig.

func (*ListenerConfig) DeepCopyInto

func (in *ListenerConfig) DeepCopyInto(out *ListenerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MemoryStoreConfig

type MemoryStoreConfig struct {
	// +optional
	Enabled bool `json:"enabled,omitempty"`
	// maxSize must fit within the container memory limit.
	// +optional
	MaxSize *resource.Quantity `json:"maxSize,omitempty"`
}

MemoryStoreConfig describes the JetStream in-memory store. +kubebuilder:validation:XValidation:rule="!self.enabled || has(self.maxSize)",message="maxSize is required when memory store is enabled"

func (*MemoryStoreConfig) DeepCopy

func (in *MemoryStoreConfig) DeepCopy() *MemoryStoreConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryStoreConfig.

func (*MemoryStoreConfig) DeepCopyInto

func (in *MemoryStoreConfig) DeepCopyInto(out *MemoryStoreConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitorConfig

type MonitorConfig struct {
	// enabled defaults to true.
	// +kubebuilder:default=true
	// +optional
	Enabled *bool `json:"enabled,omitempty"`
	// port is the monitor listener port. Defaults to 8222.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=8222
	// +optional
	Port int32 `json:"port,omitempty"`
	// tlsEnabled switches the monitor port to HTTPS using the nats listener TLS.
	// Requires Config.Nats.TLS.Enabled to be true. When set together with
	// PromExporter.Enabled, PromExporter.MonitorDomain must be set to a
	// CN/SAN of the nats TLS certificate.
	// +optional
	TLSEnabled bool `json:"tlsEnabled,omitempty"`
}

MonitorConfig mirrors `config.monitor`. Defaults to enabled on port 8222. +kubebuilder:validation:XValidation:rule="!self.tlsEnabled || (has(self.enabled) && self.enabled)",message="tlsEnabled requires monitor to be enabled"

func (*MonitorConfig) DeepCopy

func (in *MonitorConfig) DeepCopy() *MonitorConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorConfig.

func (*MonitorConfig) DeepCopyInto

func (in *MonitorConfig) DeepCopyInto(out *MonitorConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NatsBox

type NatsBox struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// spec defines the desired state of NatsBox
	// +required
	Spec NatsBoxSpec `json:"spec"`

	// status defines the observed state of NatsBox
	// +optional
	Status NatsBoxStatus `json:"status,omitzero"`
}

NatsBox is the Schema for the natsboxes API

func (*NatsBox) DeepCopy

func (in *NatsBox) DeepCopy() *NatsBox

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsBox.

func (*NatsBox) DeepCopyInto

func (in *NatsBox) DeepCopyInto(out *NatsBox)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NatsBox) DeepCopyObject

func (in *NatsBox) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NatsBoxContext

type NatsBoxContext struct {
	// url overrides the default URL. When omitted and the parent NatsBox has
	// clusterRef set, the URL is derived from the referenced cluster's
	// headless Service.
	// +optional
	URL string `json:"url,omitempty"`

	// description is a human-readable description forwarded into the
	// rendered context JSON.
	// +optional
	Description string `json:"description,omitempty"`

	// creds references a Secret key holding a NATS user credentials (JWT) file.
	// +optional
	Creds *corev1.SecretKeySelector `json:"creds,omitempty"`

	// nkey references a Secret key holding an NKey file.
	// +optional
	NKey *corev1.SecretKeySelector `json:"nkey,omitempty"`

	// tls references a kubernetes.io/tls Secret used for mutual TLS.
	// +optional
	TLS *corev1.LocalObjectReference `json:"tls,omitempty"`

	// ca references a Secret or ConfigMap key holding a CA bundle to verify
	// the nats server certificate against.
	// +optional
	CA *TLSCASpec `json:"ca,omitempty"`
}

NatsBoxContext describes a single nats CLI context. Credentials are referenced from Secrets and mounted into the pod by the operator — the rendered context JSON points at the resulting in-pod paths.

func (*NatsBoxContext) DeepCopy

func (in *NatsBoxContext) DeepCopy() *NatsBoxContext

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsBoxContext.

func (*NatsBoxContext) DeepCopyInto

func (in *NatsBoxContext) DeepCopyInto(out *NatsBoxContext)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NatsBoxList

type NatsBoxList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`
	Items           []NatsBox `json:"items"`
}

NatsBoxList contains a list of NatsBox

func (*NatsBoxList) DeepCopy

func (in *NatsBoxList) DeepCopy() *NatsBoxList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsBoxList.

func (*NatsBoxList) DeepCopyInto

func (in *NatsBoxList) DeepCopyInto(out *NatsBoxList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NatsBoxList) DeepCopyObject

func (in *NatsBoxList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NatsBoxSpec

type NatsBoxSpec struct {
	// replicas is the number of nats-box pods. Defaults to 1.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:default=1
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// image is the nats-box container image. Defaults to natsio/nats-box.
	// +optional
	Image ImageSpec `json:"image,omitzero"`

	// resources sets the nats-box container resource requests/limits.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitzero"`

	// clusterRef references a NatsCluster in the same namespace. When set,
	// the operator auto-generates a context named "default" with its URL
	// derived from the cluster's headless Service. Combine with `contexts`
	// to add credentials / TLS material.
	// +optional
	ClusterRef *corev1.LocalObjectReference `json:"clusterRef,omitempty"`

	// contexts is a map of nats CLI contexts the operator renders into the
	// nats-box pod. The map key is the context name (used as the file name
	// under /etc/nats-config/nats/context/<name>.json). When clusterRef is
	// set and "default" is not present in this map, the operator auto-fills
	// it from the referenced cluster.
	// +optional
	Contexts map[string]NatsBoxContext `json:"contexts,omitempty"`

	// defaultContextName selects which context the nats CLI uses by default.
	// Must match a key in `contexts` or be "default" when clusterRef is set.
	// Defaults to "default".
	// +optional
	DefaultContextName string `json:"defaultContextName,omitempty"`

	// serviceAccountName, when set, is used as the Deployment pods'
	// ServiceAccount. The operator does not create or manage the
	// ServiceAccount — users bring their own.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// podTemplate customizes the Deployment pod template.
	// +optional
	PodTemplate PodTemplateSpec `json:"podTemplate,omitzero"`
}

NatsBoxSpec defines the desired state of a NatsBox — a long-running utility pod with the nats CLI preinstalled and one or more NATS contexts pre-configured. Mirrors the natsBox sub-chart from the upstream nats-io/k8s helm release: a Deployment running natsio/nats-box, with contexts files generated from the spec and credential / TLS material mounted from Secrets.

func (*NatsBoxSpec) DeepCopy

func (in *NatsBoxSpec) DeepCopy() *NatsBoxSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsBoxSpec.

func (*NatsBoxSpec) DeepCopyInto

func (in *NatsBoxSpec) DeepCopyInto(out *NatsBoxSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NatsBoxStatus

type NatsBoxStatus struct {
	// observedGeneration is the .metadata.generation last reconciled.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// replicas is the total number of nats-box pods.
	// +optional
	Replicas int32 `json:"replicas,omitempty"`

	// readyReplicas is the number of nats-box pods reported ready.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// conditions represent the current state of the NatsBox resource.
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

NatsBoxStatus defines the observed state of NatsBox.

func (*NatsBoxStatus) DeepCopy

func (in *NatsBoxStatus) DeepCopy() *NatsBoxStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsBoxStatus.

func (*NatsBoxStatus) DeepCopyInto

func (in *NatsBoxStatus) DeepCopyInto(out *NatsBoxStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NatsCluster

type NatsCluster struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// spec defines the desired state of NatsCluster
	// +required
	Spec NatsClusterSpec `json:"spec"`

	// status defines the observed state of NatsCluster
	// +optional
	Status NatsClusterStatus `json:"status,omitzero"`
}

NatsCluster is the Schema for the natsclusters API

func (*NatsCluster) DeepCopy

func (in *NatsCluster) DeepCopy() *NatsCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsCluster.

func (*NatsCluster) DeepCopyInto

func (in *NatsCluster) DeepCopyInto(out *NatsCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NatsCluster) DeepCopyObject

func (in *NatsCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NatsClusterEndpoints

type NatsClusterEndpoints struct {
	// client is the URL of the client-facing Service.
	// +optional
	Client string `json:"client,omitempty"`
	// headless is the URL of the headless Service used for pod DNS / cluster
	// routing. Useful when callers need to bypass the client Service.
	// +optional
	Headless string `json:"headless,omitempty"`
}

NatsClusterEndpoints exposes the canonical connection URLs the operator generates for a NatsCluster. Consumers (NACK wrapper CRs, external apps) read these instead of reconstructing them from the Service name pattern.

func (*NatsClusterEndpoints) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsClusterEndpoints.

func (*NatsClusterEndpoints) DeepCopyInto

func (in *NatsClusterEndpoints) DeepCopyInto(out *NatsClusterEndpoints)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NatsClusterList

type NatsClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`
	Items           []NatsCluster `json:"items"`
}

NatsClusterList contains a list of NatsCluster

func (*NatsClusterList) DeepCopy

func (in *NatsClusterList) DeepCopy() *NatsClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsClusterList.

func (*NatsClusterList) DeepCopyInto

func (in *NatsClusterList) DeepCopyInto(out *NatsClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NatsClusterList) DeepCopyObject

func (in *NatsClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NatsClusterSpec

type NatsClusterSpec struct {
	// replicas is the number of nats pods. The operator wires this through to
	// the StatefulSet replica count and, when greater than 1, automatically
	// renders a NATS cluster routing block — there is no separate "enable
	// clustering" toggle.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// image is the nats server container image. The reloader and prometheus
	// exporter sidecars carry their own image fields under their respective
	// blocks since they ship from different repositories.
	// +optional
	Image ImageSpec `json:"image,omitzero"`

	// global applies cross-cutting image and label settings to every resource.
	// +optional
	Global GlobalSpec `json:"global,omitzero"`

	// tlsCA references a CA bundle that gets mounted into every TLS block.
	// +optional
	TLSCA TLSCASpec `json:"tlsCA,omitzero"`

	// config holds the NATS server configuration the operator renders into
	// nats.conf — listeners, jetstream, cluster routing, monitor, etc.
	// +optional
	Config NatsConfigSpec `json:"config,omitzero"`

	// container customizes per-container knobs (env, resources, probes,
	// security context) for the nats server container.
	// +optional
	Container ContainerSpec `json:"container,omitzero"`

	// reloader customizes the nats config reloader sidecar.
	// +optional
	Reloader ReloaderSpec `json:"reloader,omitzero"`

	// promExporter customizes the prometheus nats exporter sidecar.
	// +optional
	PromExporter PromExporterSpec `json:"promExporter,omitzero"`

	// service customizes the client-facing Service.
	// +optional
	Service ServiceSpec `json:"service,omitzero"`

	// statefulSet customizes the underlying StatefulSet.
	// +optional
	StatefulSet StatefulSetSpec `json:"statefulSet,omitzero"`

	// podTemplate customizes the StatefulSet pod template.
	// +optional
	PodTemplate PodTemplateSpec `json:"podTemplate,omitzero"`

	// headlessService customizes the headless Service used for pod DNS.
	// +optional
	HeadlessService HeadlessServiceSpec `json:"headlessService,omitzero"`

	// configMap customizes (or replaces) the generated nats config ConfigMap.
	// Set existingName to point at a ConfigMap you manage yourself; the operator
	// will mount it instead of generating one.
	// +optional
	ConfigMap ConfigMapSpec `json:"configMap,omitzero"`

	// podDisruptionBudget customizes the PDB.
	// +optional
	PodDisruptionBudget PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitzero"`

	// serviceAccount customizes the ServiceAccount used by the StatefulSet pods.
	// +optional
	ServiceAccount ServiceAccountSpec `json:"serviceAccount,omitzero"`

	// auth configures the cluster's authentication. When unset, the cluster
	// runs without authentication (only suitable for fully-isolated workloads).
	// +optional
	Auth AuthSpec `json:"auth,omitzero"`
}

NatsClusterSpec defines the desired state of a NatsCluster.

The shape borrows vocabulary from the upstream nats-io/k8s helm chart but is reorganized for an operator: the controller is the single source of truth for derived state, so port numbers, mount paths, container ports, route URLs etc. are computed from a small set of typed fields rather than mirrored in multiple places. Free-form NATS server config that the typed surface does not (yet) cover goes through Config.Includes. +kubebuilder:validation:XValidation:rule="(!has(self.reloader) || !has(self.reloader.enabled) || self.reloader.enabled) || (has(self.podTemplate) && self.podTemplate.configChecksumAnnotation)",message="at least one of reloader.enabled or podTemplate.configChecksumAnnotation must be true so the operator can apply config changes"

func (*NatsClusterSpec) DeepCopy

func (in *NatsClusterSpec) DeepCopy() *NatsClusterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsClusterSpec.

func (*NatsClusterSpec) DeepCopyInto

func (in *NatsClusterSpec) DeepCopyInto(out *NatsClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NatsClusterStatus

type NatsClusterStatus struct {
	// observedGeneration is the .metadata.generation last reconciled.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// replicas is the total number of nats pods belonging to the StatefulSet.
	// +optional
	Replicas int32 `json:"replicas,omitempty"`

	// readyReplicas is the number of nats pods reported ready by the StatefulSet.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// configMapName is the ConfigMap currently mounted as /etc/nats-config.
	// +optional
	ConfigMapName string `json:"configMapName,omitempty"`

	// endpoints exposes the canonical connection URLs the operator generates
	// for this NatsCluster. NACK wrapper CRs and external clients use these
	// instead of guessing the Service name pattern.
	// +optional
	Endpoints NatsClusterEndpoints `json:"endpoints,omitzero"`

	// conditions represent the current state of the NatsCluster resource.
	//
	// Standard condition types include:
	// - "Available": the cluster is fully functional
	// - "Progressing": the cluster is being created or updated
	// - "Degraded": the cluster failed to reach or maintain its desired state
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

NatsClusterStatus defines the observed state of NatsCluster.

func (*NatsClusterStatus) DeepCopy

func (in *NatsClusterStatus) DeepCopy() *NatsClusterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsClusterStatus.

func (*NatsClusterStatus) DeepCopyInto

func (in *NatsClusterStatus) DeepCopyInto(out *NatsClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NatsConfigSpec

type NatsConfigSpec struct {
	// +optional
	Cluster ClusterConfig `json:"cluster,omitzero"`
	// +optional
	JetStream JetStreamConfig `json:"jetstream,omitzero"`
	// +optional
	Nats NatsListenerConfig `json:"nats,omitzero"`
	// +optional
	LeafNodes ListenerConfig `json:"leafnodes,omitzero"`
	// +optional
	WebSocket WebSocketConfig `json:"websocket,omitzero"`
	// +optional
	MQTT ListenerConfig `json:"mqtt,omitzero"`
	// +optional
	Gateway ListenerConfig `json:"gateway,omitzero"`
	// +optional
	Monitor MonitorConfig `json:"monitor,omitzero"`
	// +optional
	Profiling SimpleListenerConfig `json:"profiling,omitzero"`

	// serverNamePrefix is prepended to each pod's server name. Helpful for
	// keeping server names unique across a super-cluster.
	// +optional
	ServerNamePrefix string `json:"serverNamePrefix,omitempty"`

	// includes references user-managed Secrets or ConfigMaps whose contents
	// are mounted into the nats container and pulled into nats.conf via the
	// native `include` directive. Use this for free-form server config the
	// typed spec does not (yet) cover — JWT operator/account/user blocks,
	// custom resolvers, complex permission trees, etc.
	//
	// Each entry produces a single included file. The mount path is fixed at
	// /etc/nats-extra/<name> and the rendered nats.conf gets a corresponding
	// `include "/etc/nats-extra/<name>";` line in slice order.
	// +optional
	// +listType=map
	// +listMapKey=name
	Includes []ConfigInclude `json:"includes,omitempty"`
}

NatsConfigSpec is the typed representation of the NATS server config the operator renders into nats.conf.

func (*NatsConfigSpec) DeepCopy

func (in *NatsConfigSpec) DeepCopy() *NatsConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsConfigSpec.

func (*NatsConfigSpec) DeepCopyInto

func (in *NatsConfigSpec) DeepCopyInto(out *NatsConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NatsListenerConfig

type NatsListenerConfig struct {
	// port is the client listener port. Defaults to 4222.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=4222
	// +optional
	Port int32 `json:"port,omitempty"`
	// +optional
	TLS TLSBlock `json:"tls,omitzero"`
}

NatsListenerConfig mirrors `config.nats` — the client listener.

func (*NatsListenerConfig) DeepCopy

func (in *NatsListenerConfig) DeepCopy() *NatsListenerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsListenerConfig.

func (*NatsListenerConfig) DeepCopyInto

func (in *NatsListenerConfig) DeepCopyInto(out *NatsListenerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PVCConfig

type PVCConfig struct {
	// enabled, when explicitly set to false, falls back to an emptyDir volume.
	// Defaults to true.
	// +optional
	Enabled *bool `json:"enabled,omitempty"`
	// PersistentVolumeClaimSpec is the standard PVC spec. Use the resources,
	// storageClassName, accessModes, dataSource(Ref), volumeMode, etc. fields
	// just as you would on a free-standing PVC.
	// +optional
	corev1.PersistentVolumeClaimSpec `json:",inline"`
}

PVCConfig describes a volume claim template for jetstream / resolver storage. The standard corev1.PersistentVolumeClaimSpec is embedded — set storage size via spec.resources.requests.storage like a regular PVC.

func (*PVCConfig) DeepCopy

func (in *PVCConfig) DeepCopy() *PVCConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PVCConfig.

func (*PVCConfig) DeepCopyInto

func (in *PVCConfig) DeepCopyInto(out *PVCConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodDisruptionBudgetSpec

type PodDisruptionBudgetSpec struct {
	// enabled defaults to true.
	// +kubebuilder:default=true
	// +optional
	Enabled *bool `json:"enabled,omitempty"`
	// annotations are added to the generated PDB.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// labels are added to the generated PDB.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// PodDisruptionBudgetSpec is the standard policyv1 PDB spec. The selector
	// field is overwritten by the operator and any user-supplied value is ignored.
	// +optional
	policyv1.PodDisruptionBudgetSpec `json:",inline"`
}

PodDisruptionBudgetSpec describes the generated PDB. The standard policyv1 spec fields (minAvailable, maxUnavailable, unhealthyPodEvictionPolicy) are inlined; the selector field is overwritten by the operator at reconcile time to match the StatefulSet pods, so any user-supplied selector is ignored. +kubebuilder:validation:XValidation:rule="!(has(self.minAvailable) && has(self.maxUnavailable))",message="minAvailable and maxUnavailable are mutually exclusive"

func (*PodDisruptionBudgetSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetSpec.

func (*PodDisruptionBudgetSpec) DeepCopyInto

func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodMonitorSpec

type PodMonitorSpec struct {
	// +optional
	Enabled bool `json:"enabled,omitempty"`
	// labels are added to the generated PodMonitor.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// interval is the prometheus scrape interval.
	// +optional
	Interval string `json:"interval,omitempty"`
	// scrapeTimeout is the prometheus scrape timeout.
	// +optional
	ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
}

PodMonitorSpec describes the prometheus PodMonitor for the exporter.

func (*PodMonitorSpec) DeepCopy

func (in *PodMonitorSpec) DeepCopy() *PodMonitorSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitorSpec.

func (*PodMonitorSpec) DeepCopyInto

func (in *PodMonitorSpec) DeepCopyInto(out *PodMonitorSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodTemplateSpec

type PodTemplateSpec struct {
	// configChecksumAnnotation rolls the StatefulSet on config changes by
	// stamping a hash on the pod spec instead of relying on the reloader.
	// +optional
	ConfigChecksumAnnotation bool `json:"configChecksumAnnotation,omitempty"`

	// annotations are added to the rendered pod template.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// labels are added to the rendered pod template.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// nodeSelector is the standard pod nodeSelector.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// tolerations is the standard pod tolerations list.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// affinity is the standard pod affinity rules.
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// topologySpreadConstraints is the standard pod topologySpreadConstraints
	// list. The labelSelector field is overwritten by the operator at reconcile
	// time to match the StatefulSet pods, so any user-supplied selector is
	// ignored — set the rest of the constraint and leave labelSelector nil.
	// +optional
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`

	// priorityClassName is the standard pod priorityClassName.
	// +optional
	PriorityClassName string `json:"priorityClassName,omitempty"`
	// runtimeClassName is the standard pod runtimeClassName.
	// +optional
	RuntimeClassName *string `json:"runtimeClassName,omitempty"`
	// terminationGracePeriodSeconds overrides the default termination grace period.
	// +optional
	TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
	// dnsPolicy is the standard pod dnsPolicy.
	// +optional
	DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`
	// dnsConfig is the standard pod dnsConfig.
	// +optional
	DNSConfig *corev1.PodDNSConfig `json:"dnsConfig,omitempty"`
	// hostAliases is the standard pod hostAliases list.
	// +optional
	HostAliases []corev1.HostAlias `json:"hostAliases,omitempty"`
	// securityContext sets the pod-level security context.
	// +optional
	SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
	// imagePullSecrets is added on top of global.imagePullSecrets.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

PodTemplateSpec describes the StatefulSet pod template.

func (*PodTemplateSpec) DeepCopy

func (in *PodTemplateSpec) DeepCopy() *PodTemplateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTemplateSpec.

func (*PodTemplateSpec) DeepCopyInto

func (in *PodTemplateSpec) DeepCopyInto(out *PodTemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PromExporterSpec

type PromExporterSpec struct {
	// +optional
	Enabled bool `json:"enabled,omitempty"`
	// +optional
	Image ImageSpec `json:"image,omitzero"`
	// port is the exporter listener port. Defaults to 7777.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=7777
	// +optional
	Port int32 `json:"port,omitempty"`
	// monitorDomain must match a CN/SAN on the nats TLS cert when monitor TLS
	// is enabled.
	// +optional
	MonitorDomain string `json:"monitorDomain,omitempty"`
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
	// resources sets the exporter container resource requests/limits.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitzero"`
	// securityContext sets the exporter container security context.
	// +optional
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
	// +optional
	PodMonitor PodMonitorSpec `json:"podMonitor,omitzero"`
}

PromExporterSpec describes the prometheus nats exporter sidecar container. +kubebuilder:validation:XValidation:rule="!self.podMonitor.enabled || self.enabled",message="promExporter must be enabled when podMonitor is enabled"

func (*PromExporterSpec) DeepCopy

func (in *PromExporterSpec) DeepCopy() *PromExporterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PromExporterSpec.

func (*PromExporterSpec) DeepCopyInto

func (in *PromExporterSpec) DeepCopyInto(out *PromExporterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReloaderSpec

type ReloaderSpec struct {
	// enabled defaults to true.
	// +kubebuilder:default=true
	// +optional
	Enabled *bool `json:"enabled,omitempty"`
	// +optional
	Image ImageSpec `json:"image,omitzero"`
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
	// resources sets the reloader container resource requests/limits.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitzero"`
	// securityContext sets the reloader container security context.
	// +optional
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}

ReloaderSpec describes the nats config reloader sidecar container. The volume mounts forwarded into the sidecar are computed by the operator.

func (*ReloaderSpec) DeepCopy

func (in *ReloaderSpec) DeepCopy() *ReloaderSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReloaderSpec.

func (*ReloaderSpec) DeepCopyInto

func (in *ReloaderSpec) DeepCopyInto(out *ReloaderSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouteURLsConfig

type RouteURLsConfig struct {
	// authSecretRef references a Secret holding the cluster route user/password.
	// The Secret must contain `user` and `password` keys. When set, the operator
	// adds the credentials to route URLs and the cluster authorization block.
	// +optional
	AuthSecretRef *corev1.LocalObjectReference `json:"authSecretRef,omitempty"`
	// k8sClusterDomain overrides the cluster DNS suffix appended to every
	// route URL. Defaults to cluster.local, which covers every stock
	// Kubernetes install — only change it when the cluster was brought up
	// with a custom --cluster-domain.
	// +kubebuilder:default=cluster.local
	// +optional
	K8sClusterDomain string `json:"k8sClusterDomain,omitempty"`
}

RouteURLsConfig controls how the cluster route URLs are constructed. Route hosts are always emitted as fully-qualified `<pod>.<headless>.<ns>.svc.<cluster-domain>` names to keep resolution deterministic across glibc / musl / Go-net resolvers.

func (*RouteURLsConfig) DeepCopy

func (in *RouteURLsConfig) DeepCopy() *RouteURLsConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteURLsConfig.

func (*RouteURLsConfig) DeepCopyInto

func (in *RouteURLsConfig) DeepCopyInto(out *RouteURLsConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceAccountSpec

type ServiceAccountSpec struct {
	// enabled defaults to false. When false the StatefulSet uses the namespace
	// default ServiceAccount.
	// +optional
	Enabled *bool `json:"enabled,omitempty"`
	// annotations are added to the generated ServiceAccount.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// imagePullSecrets is the standard ServiceAccount imagePullSecrets list.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

ServiceAccountSpec describes the generated ServiceAccount.

func (*ServiceAccountSpec) DeepCopy

func (in *ServiceAccountSpec) DeepCopy() *ServiceAccountSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountSpec.

func (*ServiceAccountSpec) DeepCopyInto

func (in *ServiceAccountSpec) DeepCopyInto(out *ServiceAccountSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceSpec

type ServiceSpec struct {
	// enabled defaults to true.
	// +kubebuilder:default=true
	// +optional
	Enabled *bool `json:"enabled,omitempty"`
	// nodePorts assigns a stable NodePort number to a listener, keyed by
	// listener name (nats, leafnodes, websocket, mqtt, gateway). Only
	// meaningful when Type is NodePort or LoadBalancer. Listeners not present
	// in this map get a NodePort allocated by the apiserver.
	// +optional
	NodePorts map[string]int32 `json:"nodePorts,omitempty"`
	// type is the Service type. Defaults to ClusterIP.
	// +optional
	Type corev1.ServiceType `json:"type,omitempty"`
	// loadBalancerClass is the LoadBalancer class for type=LoadBalancer.
	// +optional
	LoadBalancerClass *string `json:"loadBalancerClass,omitempty"`
	// externalTrafficPolicy is the externalTrafficPolicy for type=LoadBalancer/NodePort.
	// +optional
	ExternalTrafficPolicy corev1.ServiceExternalTrafficPolicy `json:"externalTrafficPolicy,omitempty"`
	// annotations are added to the generated Service.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// labels are added to the generated Service.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
}

ServiceSpec describes the client-facing Service. The operator decides which listener ports to publish: nats is always exposed, leafnodes/websocket/mqtt/ gateway are exposed iff enabled in Config, and cluster/monitor/profiling are kept off the client Service (cluster is internal-only via the headless Service; monitor and profiling are scraped via PodMonitor or the headless Service). Set NodePorts to assign stable NodePort numbers.

func (*ServiceSpec) DeepCopy

func (in *ServiceSpec) DeepCopy() *ServiceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec.

func (*ServiceSpec) DeepCopyInto

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SimpleListenerConfig

type SimpleListenerConfig struct {
	// +optional
	Enabled bool `json:"enabled,omitempty"`
	// +optional
	// +kubebuilder:validation:Minimum=1
	Port int32 `json:"port,omitempty"`
}

SimpleListenerConfig is a minimal enabled+port block (e.g. profiling).

func (*SimpleListenerConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleListenerConfig.

func (*SimpleListenerConfig) DeepCopyInto

func (in *SimpleListenerConfig) DeepCopyInto(out *SimpleListenerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StatefulSetSpec

type StatefulSetSpec struct {
	// annotations are added to the generated StatefulSet.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// labels are added to the generated StatefulSet.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// podManagementPolicy overrides the default Parallel pod management policy.
	// +optional
	PodManagementPolicy appsv1.PodManagementPolicyType `json:"podManagementPolicy,omitempty"`
	// minReadySeconds is the standard StatefulSet minReadySeconds field.
	// +optional
	MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
}

StatefulSetSpec describes the underlying StatefulSet.

func (*StatefulSetSpec) DeepCopy

func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetSpec.

func (*StatefulSetSpec) DeepCopyInto

func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSBlock

type TLSBlock struct {
	// +optional
	Enabled bool `json:"enabled,omitempty"`
	// secretName mounts an existing TLS secret.
	// +optional
	SecretName string `json:"secretName,omitempty"`
	// cert is the certificate file name within the secret. Defaults to tls.crt.
	// +kubebuilder:default=tls.crt
	// +optional
	Cert string `json:"cert,omitempty"`
	// key is the private key file name within the secret. Defaults to tls.key.
	// +kubebuilder:default=tls.key
	// +optional
	Key string `json:"key,omitempty"`
	// verify enables mutual TLS — clients must present a certificate.
	// +optional
	Verify *bool `json:"verify,omitempty"`
	// timeout is the TLS handshake timeout in seconds.
	// +optional
	Timeout *int32 `json:"timeout,omitempty"`
}

TLSBlock is the standard tls config block reused throughout the listener types. The mount path is picked by the operator; users only supply the secret name and (optionally) the key names if they differ from the kubernetes.io/tls defaults.

func (*TLSBlock) DeepCopy

func (in *TLSBlock) DeepCopy() *TLSBlock

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSBlock.

func (*TLSBlock) DeepCopyInto

func (in *TLSBlock) DeepCopyInto(out *TLSBlock)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSCASpec

type TLSCASpec struct {
	// configMap selects a key in a ConfigMap holding the CA bundle.
	// +optional
	ConfigMap *corev1.ConfigMapKeySelector `json:"configMap,omitempty"`
	// secret selects a key in a Secret holding the CA bundle.
	// +optional
	Secret *corev1.SecretKeySelector `json:"secret,omitempty"`
}

TLSCASpec references a CA bundle that gets mounted into every TLS block. Exactly one of configMap or secret must be set. +kubebuilder:validation:XValidation:rule="(has(self.configMap) ? 1 : 0) + (has(self.secret) ? 1 : 0) <= 1",message="at most one of configMap or secret may be set"

func (*TLSCASpec) DeepCopy

func (in *TLSCASpec) DeepCopy() *TLSCASpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSCASpec.

func (*TLSCASpec) DeepCopyInto

func (in *TLSCASpec) DeepCopyInto(out *TLSCASpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebSocketConfig

type WebSocketConfig struct {
	// +optional
	Enabled bool `json:"enabled,omitempty"`
	// port is the websocket listener port. Defaults to 8080.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=8080
	// +optional
	Port int32 `json:"port,omitempty"`
	// +optional
	TLS TLSBlock `json:"tls,omitzero"`
	// +optional
	Ingress WebSocketIngress `json:"ingress,omitzero"`
}

WebSocketConfig mirrors `config.websocket` (listener + ingress).

func (*WebSocketConfig) DeepCopy

func (in *WebSocketConfig) DeepCopy() *WebSocketConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebSocketConfig.

func (*WebSocketConfig) DeepCopyInto

func (in *WebSocketConfig) DeepCopyInto(out *WebSocketConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebSocketIngress

type WebSocketIngress struct {
	// +optional
	Enabled bool `json:"enabled,omitempty"`
	// hosts must contain at least one entry to actually create the Ingress.
	// +optional
	Hosts []string `json:"hosts,omitempty"`
	// +optional
	Path string `json:"path,omitempty"`
	// +optional
	PathType string `json:"pathType,omitempty"`
	// +optional
	ClassName string `json:"className,omitempty"`
	// tlsSecretName enables TLS for every host on the Ingress.
	// +optional
	TLSSecretName string `json:"tlsSecretName,omitempty"`
	// annotations are added to the generated Ingress.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

+kubebuilder:validation:XValidation:rule="!self.enabled || size(self.hosts) > 0",message="hosts must be non-empty when ingress is enabled"

func (*WebSocketIngress) DeepCopy

func (in *WebSocketIngress) DeepCopy() *WebSocketIngress

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebSocketIngress.

func (*WebSocketIngress) DeepCopyInto

func (in *WebSocketIngress) DeepCopyInto(out *WebSocketIngress)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL