Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the eventing v1alpha1 API group +kubebuilder:object:generate=true +groupName=operator.kyma-project.io
+kubebuilder:validation:Optional // This sets 'required' as the default behaviour.
Index ¶
- Constants
- Variables
- func ConditionEquals(existing, expected metav1.Condition) bool
- func ConditionsEquals(existing, expected []metav1.Condition) bool
- type Cluster
- type ConditionReason
- type ConditionType
- type FileStorage
- type JetStream
- type Logging
- type MemStorage
- type NATS
- type NATSList
- type NATSSpec
- type NATSStatus
- func (in *NATSStatus) DeepCopy() *NATSStatus
- func (in *NATSStatus) DeepCopyInto(out *NATSStatus)
- func (ns *NATSStatus) FindCondition(conditionType ConditionType) *metav1.Condition
- func (ns *NATSStatus) Initialize()
- func (ns *NATSStatus) IsEqual(status NATSStatus) bool
- func (ns *NATSStatus) SetStateDeleting()
- func (ns *NATSStatus) SetStateError()
- func (ns *NATSStatus) SetStateProcessing()
- func (ns *NATSStatus) SetStateReady()
- func (ns *NATSStatus) SetWaitingStateForStatefulSet()
- func (ns *NATSStatus) UpdateConditionAvailable(status metav1.ConditionStatus, reason ConditionReason, message string)
- func (ns *NATSStatus) UpdateConditionDeletion(status metav1.ConditionStatus, reason ConditionReason, message string)
- func (ns *NATSStatus) UpdateConditionStatefulSet(status metav1.ConditionStatus, reason ConditionReason, message string)
Constants ¶
const ( StateReady string = "Ready" StateError string = "Error" StateProcessing string = "Processing" StateDeleting string = "Deleting" ConditionAvailable ConditionType = "Available" ConditionStatefulSet ConditionType = "StatefulSet" ConditionDeleted ConditionType = "Deleted" ConditionReasonProcessing ConditionReason = "Processing" ConditionReasonDeploying ConditionReason = "Deploying" ConditionReasonDeployed ConditionReason = "Deployed" ConditionReasonDeleting ConditionReason = "Deleting" ConditionReasonProcessingError ConditionReason = "FailedProcessing" ConditionReasonForbidden ConditionReason = "Forbidden" ConditionReasonStatefulSetAvailable ConditionReason = "Available" ConditionReasonStatefulSetPending ConditionReason = "Pending" ConditionReasonSyncFailError ConditionReason = "FailedToSyncResources" ConditionReasonManifestError ConditionReason = "InvalidManifests" ConditionReasonDeletionError ConditionReason = "DeletionError" )
Variables ¶
var ( //nolint:gochecknoglobals // is used in the controller // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "operator.kyma-project.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} //nolint:gochecknoglobals // is used in the controller // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme //nolint:gochecknoglobals // is used in the controller )
Functions ¶
func ConditionEquals ¶
ConditionEquals checks if two conditions are equal.
func ConditionsEquals ¶
ConditionsEquals checks if two list of conditions are equal.
Types ¶
type Cluster ¶
type Cluster struct { // Size of a NATS cluster, i.e. number of NATS nodes. // +kubebuilder:default:=3 // +kubebuilder:validation:Minimum:=1 // +kubebuilder:validation:XValidation:rule="(self%2) != 0", message="size only accepts odd numbers" Size int `json:"size,omitempty"` }
Cluster defines configurations that are specific to NATS clusters.
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionReason ¶
type ConditionReason string
type ConditionType ¶
type ConditionType string
type FileStorage ¶
type FileStorage struct { // StorageClassName defines the file storage class name. // +kubebuilder:default:="default" // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="fileStorage is immutable once it was set" StorageClassName string `json:"storageClassName,omitempty"` // Size defines the file storage size. // +kubebuilder:default:="1Gi" // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="fileStorage is immutable once it was set" Size resource.Quantity `json:"size,omitempty"` }
FileStorage defines configurations to file storage in NATS JetStream.
func (*FileStorage) DeepCopy ¶
func (in *FileStorage) DeepCopy() *FileStorage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileStorage.
func (*FileStorage) DeepCopyInto ¶
func (in *FileStorage) DeepCopyInto(out *FileStorage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JetStream ¶
type JetStream struct { // MemStorage defines configurations to memory storage in NATS JetStream. // +kubebuilder:default:={size:"1Gi",enabled:true} // +kubebuilder:validation:XValidation:rule="!self.enabled || self.size != 0", message="can only be enabled if size is not 0" MemStorage `json:"memStorage,omitempty"` // FileStorage defines configurations to file storage in NATS JetStream. // +kubebuilder:default:={storageClassName:"default",size:"1Gi"} // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="fileStorage is immutable once it was set" FileStorage `json:"fileStorage,omitempty"` }
JetStream defines configurations that are specific to NATS JetStream.
func (*JetStream) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JetStream.
func (*JetStream) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Logging ¶
type Logging struct { // Debug allows debug logging. // +kubebuilder:default:=false Debug bool `json:"debug,omitempty"` // Trace allows trace logging. // +kubebuilder:default:=false Trace bool `json:"trace,omitempty"` }
Logging defines logging options.
func (*Logging) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Logging.
func (*Logging) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MemStorage ¶
type MemStorage struct { // Enabled allows the enablement of memory storage. // +kubebuilder:default:=true Enabled bool `json:"enabled,omitempty"` // Size defines the mem. // +kubebuilder:default:="1Gi" Size resource.Quantity `json:"size,omitempty"` }
MemStorage defines configurations to memory storage in NATS JetStream.
func (*MemStorage) DeepCopy ¶
func (in *MemStorage) DeepCopy() *MemStorage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemStorage.
func (*MemStorage) DeepCopyInto ¶
func (in *MemStorage) DeepCopyInto(out *MemStorage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NATS ¶
type NATS struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // +kubebuilder:default:={jetStream:{fileStorage:{storageClassName:"default", size:"1Gi"},memStorage:{size:"1Gi",enabled:true}}, cluster:{size:3},logging:{trace:false,debug:false}, resources:{limits:{cpu:"500m",memory:"1Gi"}, requests:{cpu:"40m",memory:"64Mi"}}} Spec NATSSpec `json:"spec,omitempty"` Status NATSStatus `json:"status,omitempty"` }
NATS is the Schema for the NATS API. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state",description="State of NATS deployment" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of the resource"
func (*NATS) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NATS.
func (*NATS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NATS) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*NATS) IsInDeletion ¶
type NATSList ¶
type NATSList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NATS `json:"items"` }
NATSList contains a list of NATS.
func (*NATSList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NATSList.
func (*NATSList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NATSList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NATSSpec ¶
type NATSSpec struct { // Cluster defines configurations that are specific to NATS clusters. // +kubebuilder:default:={size:3} Cluster `json:"cluster,omitempty"` // JetStream defines configurations that are specific to NATS JetStream. // +kubebuilder:default:={fileStorage:{storageClassName:"default", size:"1Gi"},memStorage:{size:"1Gi",enabled:true}} // +kubebuilder:validation:XValidation:rule="self.fileStorage == oldSelf.fileStorage",message="fileStorage is immutable once it was set" JetStream `json:"jetStream,omitempty"` // JetStream defines configurations that are specific to NATS logging in NATS. // +kubebuilder:default:={trace:false,debug:false} Logging `json:"logging,omitempty"` // Resources defines resources for NATS. // +kubebuilder:default:={limits:{cpu:"500m",memory:"1Gi"}, requests:{cpu:"40m",memory:"64Mi"}} Resources corev1.ResourceRequirements `json:"resources,omitempty"` // Annotations allows to add annotations to NATS. Annotations map[string]string `json:"annotations,omitempty"` // Labels allows to add Labels to NATS. Labels map[string]string `json:"labels,omitempty"` }
NATSSpec defines the desired state of NATS.
func (*NATSSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NATSSpec.
func (*NATSSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NATSStatus ¶
type NATSStatus struct { State string `json:"state"` Conditions []metav1.Condition `json:"conditions,omitempty"` }
NATSStatus defines the observed state of NATS.
func (*NATSStatus) DeepCopy ¶
func (in *NATSStatus) DeepCopy() *NATSStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NATSStatus.
func (*NATSStatus) DeepCopyInto ¶
func (in *NATSStatus) DeepCopyInto(out *NATSStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NATSStatus) FindCondition ¶
func (ns *NATSStatus) FindCondition(conditionType ConditionType) *metav1.Condition
func (*NATSStatus) Initialize ¶
func (ns *NATSStatus) Initialize()
func (*NATSStatus) IsEqual ¶
func (ns *NATSStatus) IsEqual(status NATSStatus) bool
func (*NATSStatus) SetStateDeleting ¶
func (ns *NATSStatus) SetStateDeleting()
func (*NATSStatus) SetStateError ¶
func (ns *NATSStatus) SetStateError()
func (*NATSStatus) SetStateProcessing ¶
func (ns *NATSStatus) SetStateProcessing()
func (*NATSStatus) SetStateReady ¶
func (ns *NATSStatus) SetStateReady()
func (*NATSStatus) SetWaitingStateForStatefulSet ¶
func (ns *NATSStatus) SetWaitingStateForStatefulSet()
func (*NATSStatus) UpdateConditionAvailable ¶
func (ns *NATSStatus) UpdateConditionAvailable(status metav1.ConditionStatus, reason ConditionReason, message string)
func (*NATSStatus) UpdateConditionDeletion ¶
func (ns *NATSStatus) UpdateConditionDeletion(status metav1.ConditionStatus, reason ConditionReason, message string)
func (*NATSStatus) UpdateConditionStatefulSet ¶
func (ns *NATSStatus) UpdateConditionStatefulSet(status metav1.ConditionStatus, reason ConditionReason, message string)