Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the natsresolver v1alpha1 API group. +kubebuilder:object:generate=true +groupName=natsresolver.zerbytes.net
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "natsresolver.zerbytes.net", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type AccountLimits ¶
type AccountLimits struct { // +optional MaxConnections *int `json:"maxConnections,omitempty"` // +optional MaxSubs *int `json:"maxSubs,omitempty"` // +optional MaxData *int `json:"maxData,omitempty"` // +optional MaxPayload *int `json:"maxPayload,omitempty"` // +optional MaxDiskStorage *int `json:"maxDiskStorage,omitempty"` // +optional MaxMemoryStorage *int `json:"maxMemoryStorage,omitempty"` }
func (*AccountLimits) DeepCopy ¶
func (in *AccountLimits) DeepCopy() *AccountLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountLimits.
func (*AccountLimits) DeepCopyInto ¶
func (in *AccountLimits) DeepCopyInto(out *AccountLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AccountPermissions ¶ added in v0.0.2
type AccountPermissions struct { // Publish defines the permissions for publishing messages. Publish PermissionRules `json:"publish,omitempty"` // Subscribe defines the permissions for subscribing to messages. Subscribe PermissionRules `json:"subscribe,omitempty"` // Response defines the permissions for responding to messages. Response *ResponsePermissions `json:"response,omitempty"` }
func (*AccountPermissions) DeepCopy ¶ added in v0.0.2
func (in *AccountPermissions) DeepCopy() *AccountPermissions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountPermissions.
func (*AccountPermissions) DeepCopyInto ¶ added in v0.0.2
func (in *AccountPermissions) DeepCopyInto(out *AccountPermissions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NatsAccount ¶
type NatsAccount struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NatsAccountSpec `json:"spec,omitempty"` Status NatsAccountStatus `json:"status,omitempty"` }
NatsAccount is the Schema for the accounts API
func (*NatsAccount) DeepCopy ¶
func (in *NatsAccount) DeepCopy() *NatsAccount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsAccount.
func (*NatsAccount) DeepCopyInto ¶
func (in *NatsAccount) DeepCopyInto(out *NatsAccount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NatsAccount) DeepCopyObject ¶
func (in *NatsAccount) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NatsAccountList ¶
type NatsAccountList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NatsAccount `json:"items"` }
NatsAccountList contains a list of NatsAccount kubebuilder marker generates list type automatically.
func (*NatsAccountList) DeepCopy ¶
func (in *NatsAccountList) DeepCopy() *NatsAccountList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsAccountList.
func (*NatsAccountList) DeepCopyInto ¶
func (in *NatsAccountList) DeepCopyInto(out *NatsAccountList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NatsAccountList) DeepCopyObject ¶
func (in *NatsAccountList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NatsAccountSpec ¶
type NatsAccountSpec struct { // JetStreamEnabled toggles JetStream for the account. // +optional JetStreamEnabled bool `json:"jetStreamEnabled,omitempty"` // Limits for the account (connections, subscriptions, etc.). // All fields optional - if omitted NATS defaults apply. // +optional Limits *AccountLimits `json:"limits,omitempty"` // Permissions for the account. // +optional Permissions *AccountPermissions `json:"permissions,omitempty"` // Expiration specifies an RFC3339 timestamp when the account JWT // should expire. If omitted the JWT does not expire. // +optional Expiration *metav1.Time `json:"expiration,omitempty"` // SystemAccount marks this account as the NATS $SYS account. // Automatically set by the operator; users should not set this. // +kubebuilder:default=false SystemAccount bool `json:"systemAccount,omitempty"` }
func (*NatsAccountSpec) DeepCopy ¶
func (in *NatsAccountSpec) DeepCopy() *NatsAccountSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsAccountSpec.
func (*NatsAccountSpec) DeepCopyInto ¶
func (in *NatsAccountSpec) DeepCopyInto(out *NatsAccountSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NatsAccountStatus ¶
type NatsAccountStatus struct { // Ready indicates that the JWT secret was successfully created. Ready bool `json:"ready,omitempty"` // AccountPublicKey contains the public NKey of the account. AccountPublicKey string `json:"accountPublicKey,omitempty"` // SecretName referencing the Kubernetes Secret with the JWT. SecretName string `json:"secretName,omitempty"` // SigningKeyPublicKey is the public key of the signing key used to sign the JWT. SigningKeyPublicKey string `json:"signingKeyPublicKey,omitempty"` }
func (*NatsAccountStatus) DeepCopy ¶
func (in *NatsAccountStatus) DeepCopy() *NatsAccountStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsAccountStatus.
func (*NatsAccountStatus) DeepCopyInto ¶
func (in *NatsAccountStatus) DeepCopyInto(out *NatsAccountStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NatsUser ¶
type NatsUser struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NatsUserSpec `json:"spec,omitempty"` Status NatsUserStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:pruning:PreserveUnknownFields +kubebuilder:resource:path=natsusers,shortName=nu,scope=Namespaced +kubebuilder:printcolumn:name="Account",type=string,JSONPath=".spec.accountRef.name" +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=".status.ready" NatsUser represents a user credential within a NATS account.
func (*NatsUser) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsUser.
func (*NatsUser) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NatsUser) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NatsUserList ¶
type NatsUserList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NatsUser `json:"items"` }
+kubebuilder:object:root=true
func (*NatsUserList) DeepCopy ¶
func (in *NatsUserList) DeepCopy() *NatsUserList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsUserList.
func (*NatsUserList) DeepCopyInto ¶
func (in *NatsUserList) DeepCopyInto(out *NatsUserList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NatsUserList) DeepCopyObject ¶
func (in *NatsUserList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NatsUserSpec ¶
type NatsUserSpec struct { // AccountRef references the parent account. AccountRef corev1.ObjectReference `json:"accountRef"` // Expiration RFC3339 time - optional, infinite if omitted. // +optional Expiration *metav1.Time `json:"expiration,omitempty"` // Limits applied to this user (payload, subs, …). // +optional Limits *UserLimits `json:"limits,omitempty"` // Permissions (publish / subscribe allow|deny lists). // +optional Permissions *UserPermissions `json:"permissions,omitempty"` }
func (*NatsUserSpec) DeepCopy ¶
func (in *NatsUserSpec) DeepCopy() *NatsUserSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsUserSpec.
func (*NatsUserSpec) DeepCopyInto ¶
func (in *NatsUserSpec) DeepCopyInto(out *NatsUserSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NatsUserStatus ¶
type NatsUserStatus struct { // Ready indicates that the user creds secret was successfully created. Ready bool `json:"ready,omitempty"` // UserPublicKey contains the public NKey of the user. UserPublicKey string `json:"userPublicKey,omitempty"` // SecretName referencing the Kubernetes Secret with the creds. SecretName string `json:"secretName,omitempty"` // SigningKeyPublicKey is the public key of the signing key used to sign the JWT. SigningKeyPublicKey string `json:"signingKeyPublicKey,omitempty"` }
func (*NatsUserStatus) DeepCopy ¶
func (in *NatsUserStatus) DeepCopy() *NatsUserStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsUserStatus.
func (*NatsUserStatus) DeepCopyInto ¶
func (in *NatsUserStatus) DeepCopyInto(out *NatsUserStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PermissionRules ¶
type PermissionRules struct { // Subjects that are explicitly allowed. // Use NATS wildcards (>, *). // +kubebuilder:validation:Optional Allow []string `json:"allow,omitempty"` // Subjects that are explicitly denied. // +kubebuilder:validation:Optional Deny []string `json:"deny,omitempty"` }
Permission rule helper – Allow/Deny lists of subjects.
func (*PermissionRules) DeepCopy ¶
func (in *PermissionRules) DeepCopy() *PermissionRules
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PermissionRules.
func (*PermissionRules) DeepCopyInto ¶
func (in *PermissionRules) DeepCopyInto(out *PermissionRules)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResponsePermissions ¶ added in v0.0.2
type ResponsePermissions struct { MaxMsgs int `json:"max,omitempty"` Expires time.Duration `json:"ttl,omitempty"` }
func (*ResponsePermissions) DeepCopy ¶ added in v0.0.2
func (in *ResponsePermissions) DeepCopy() *ResponsePermissions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResponsePermissions.
func (*ResponsePermissions) DeepCopyInto ¶ added in v0.0.2
func (in *ResponsePermissions) DeepCopyInto(out *ResponsePermissions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserLimits ¶
type UserLimits struct { // MaxPayload defines the maximum message payload a user can publish (bytes). // +optional MaxPayload *int64 `json:"maxPayload,omitempty"` // MaxSubs caps how many subscriptions a connection can register. // +optional MaxSubs *int64 `json:"maxSubs,omitempty"` // MaxData defines the maximum data a user can store in the server (bytes). // +optional MaxData *int64 `json:"maxData,omitempty"` }
UserLimits captures resource ceilings for an individual user. +kubebuilder:object:generate=true +kubebuilder:validation:Optional
func (*UserLimits) DeepCopy ¶
func (in *UserLimits) DeepCopy() *UserLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserLimits.
func (*UserLimits) DeepCopyInto ¶
func (in *UserLimits) DeepCopyInto(out *UserLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserPermissions ¶
type UserPermissions struct { // Publish rules // +optional Publish PermissionRules `json:"publish,omitempty"` // Subscribe rules // +optional Subscribe PermissionRules `json:"subscribe,omitempty"` }
func (*UserPermissions) DeepCopy ¶
func (in *UserPermissions) DeepCopy() *UserPermissions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPermissions.
func (*UserPermissions) DeepCopyInto ¶
func (in *UserPermissions) DeepCopyInto(out *UserPermissions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.