Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=operator.kyma-project.io
Index ¶
- Constants
- Variables
- type Backend
- type BackendConfig
- type BackendType
- type ConditionReason
- type ConditionType
- type Eventing
- type EventingList
- type EventingSpec
- type EventingStatus
- func (es *EventingStatus) ClearConditions()
- func (es *EventingStatus) ClearPublisherService()
- func (in *EventingStatus) DeepCopy() *EventingStatus
- func (in *EventingStatus) DeepCopyInto(out *EventingStatus)
- func (es *EventingStatus) IsEqual(status EventingStatus) bool
- func (es *EventingStatus) RemoveUnsupportedConditions()
- func (es *EventingStatus) SetEventMeshAvailableConditionToTrue()
- func (es *EventingStatus) SetNATSAvailableConditionToTrue()
- func (es *EventingStatus) SetPublisherProxyConditionToFalse(reason ConditionReason, message string)
- func (es *EventingStatus) SetPublisherProxyReadyToTrue()
- func (es *EventingStatus) SetPublisherService(name, namespace string)
- func (es *EventingStatus) SetStateError()
- func (es *EventingStatus) SetStateProcessing()
- func (es *EventingStatus) SetStateReady()
- func (es *EventingStatus) SetStateWarning()
- func (es *EventingStatus) SetSubscriptionManagerReadyConditionToFalse(reason ConditionReason, message string)
- func (es *EventingStatus) SetSubscriptionManagerReadyConditionToTrue()
- func (es *EventingStatus) UpdateConditionBackendAvailable(status kmetav1.ConditionStatus, reason ConditionReason, message string)
- func (es *EventingStatus) UpdateConditionDeletion(status kmetav1.ConditionStatus, reason ConditionReason, message string)
- func (es *EventingStatus) UpdateConditionPublisherProxyReady(status kmetav1.ConditionStatus, reason ConditionReason, message string)
- func (es *EventingStatus) UpdateConditionSubscriptionManagerReady(status kmetav1.ConditionStatus, reason ConditionReason, message string)
- type Logging
- type Publisher
- type Replicas
Constants ¶
const ( StateReady string = "Ready" StateError string = "Error" StateProcessing string = "Processing" StateWarning string = "Warning" ConditionBackendAvailable ConditionType = "BackendAvailable" ConditionPublisherProxyReady ConditionType = "PublisherProxyReady" ConditionSubscriptionManagerReady ConditionType = "SubscriptionManagerReady" ConditionDeleted ConditionType = "Deleted" ConditionReasonProcessing ConditionReason = "Processing" ConditionReasonDeleted ConditionReason = "Deleted" ConditionReasonStopped ConditionReason = "Stopped" ConditionReasonDeployed ConditionReason = "Deployed" ConditionReasonDeployedFailed ConditionReason = "DeployFailed" ConditionReasonDeploymentStatusSyncFailed ConditionReason = "DeploymentStatusSyncFailed" ConditionReasonNATSAvailable ConditionReason = "NATSAvailable" ConditionReasonNATSNotAvailable ConditionReason = "NATSUnavailable" ConditionReasonBackendNotSpecified ConditionReason = "BackendNotSpecified" ConditionReasonForbidden ConditionReason = "Forbidden" ConditionReasonDeletionError ConditionReason = "DeletionError" ConditionReasonEventMeshConfigAvailable ConditionReason = "EventMeshConfigAvailable" ConditionPublisherProxyReadyMessage = "Publisher proxy is deployed" ConditionPublisherProxyDeletedMessage = "Publisher proxy is deleted" ConditionNATSAvailableMessage = "NATS is available" ConditionPublisherProxyProcessingMessage = "Eventing publisher proxy deployment is in progress" ConditionSubscriptionManagerReadyMessage = "Subscription manager is ready" ConditionSubscriptionManagerStoppedMessage = "Subscription manager is stopped" ConditionBackendNotSpecifiedMessage = "Backend config is not provided. Please specify a backend." ConditionEventMeshConfigAvailableMessage = "EventMesh config is available" ConditionReasonEventMeshSubManagerReady ConditionReason = "EventMeshSubscriptionManagerReady" ConditionReasonEventMeshSubManagerFailed ConditionReason = "EventMeshSubscriptionManagerFailed" ConditionReasonEventMeshSubManagerStopFailed ConditionReason = "EventMeshSubscriptionManagerStopFailed" )
Variables ¶
var ( // 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} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { // Type defines which backend to use. The value is either `EventMesh`, or `NATS`. // +kubebuilder:default:="NATS" // +kubebuilder:validation:XValidation:rule="self=='NATS' || self=='EventMesh' || self==”", message="backend type can only be set to NATS or EventMesh" Type BackendType `json:"type"` // Config defines configuration for the Eventing backend. // +kubebuilder:default:={natsStreamStorageType:"File", natsStreamReplicas:3, natsStreamMaxSize:"700Mi", natsMaxMsgsPerTopic:1000000} Config BackendConfig `json:"config,omitempty"` }
Backend defines eventing backend.
func (*Backend) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend.
func (*Backend) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackendConfig ¶
type BackendConfig struct { // NATSStreamStorageType defines the storage type for stream data. // +kubebuilder:default:="File" // +kubebuilder:validation:XValidation:rule="self=='File' || self=='Memory'", message="storage type can only be set to File or Memory" NATSStreamStorageType string `json:"natsStreamStorageType,omitempty"` // NATSStreamReplicas defines the number of replicas for the stream. // +kubebuilder:default:=3 NATSStreamReplicas int `json:"natsStreamReplicas,omitempty"` // NATSStreamMaxSize defines the maximum storage size for stream data. // +kubebuilder:default:="700Mi" NATSStreamMaxSize resource.Quantity `json:"natsStreamMaxSize,omitempty"` // NATSMaxMsgsPerTopic limits how many messages in the NATS stream to retain per subject. // +kubebuilder:default:=1000000 NATSMaxMsgsPerTopic int `json:"natsMaxMsgsPerTopic,omitempty"` // EventMeshSecret defines the namespaced name of the Kubernetes Secret containing EventMesh credentials. The format of name is "namespace/name". // +kubebuilder:validation:Pattern:="^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$" EventMeshSecret string `json:"eventMeshSecret,omitempty"` // +kubebuilder:default:="sap.kyma.custom" // +kubebuilder:validation:XValidation:rule="self!=”", message="eventTypePrefix cannot be empty" EventTypePrefix string `json:"eventTypePrefix,omitempty"` // Domain defines the cluster public domain used to configure the EventMesh Subscriptions // and their corresponding ApiRules. // +kubebuilder:validation:Pattern:="^(?:([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])(\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9]))*)?$" Domain string `json:"domain,omitempty"` }
BackendConfig defines configuration for the Eventing backend.
func (*BackendConfig) DeepCopy ¶
func (in *BackendConfig) DeepCopy() *BackendConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendConfig.
func (*BackendConfig) DeepCopyInto ¶
func (in *BackendConfig) DeepCopyInto(out *BackendConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackendType ¶
type BackendType string
const ( EventMeshBackendType BackendType = "EventMesh" NatsBackendType BackendType = "NATS" )
type ConditionReason ¶
type ConditionReason string
type ConditionType ¶
type ConditionType string
type Eventing ¶
type Eventing struct { kmetav1.TypeMeta `json:",inline"` kmetav1.ObjectMeta `json:"metadata,omitempty"` // +kubebuilder:default:={logging:{logLevel:Info}, publisher:{replicas:{min:2,max:2}, resources:{limits:{cpu:"500m",memory:"512Mi"}, requests:{cpu:"40m",memory:"256Mi"}}}} // +kubebuilder:validation:XValidation:rule="!(oldSelf!=null && has(oldSelf.backend)) || has(self.backend)", message="backend config cannot be deleted" Spec EventingSpec `json:"spec,omitempty"` Status EventingStatus `json:"status,omitempty"` }
Eventing is the Schema for the eventing API. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories={kyma-modules,kyma-eventing} +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state",description="State of Eventing" +kubebuilder:printcolumn:name="Backend",type="string",JSONPath=".spec.backend.type",description="Type of Eventing backend, either NATS or EventMesh" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of the resource"
func (*Eventing) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Eventing.
func (*Eventing) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Eventing) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Eventing) IsPreviousBackendEmpty ¶
func (*Eventing) IsSpecBackendTypeChanged ¶
func (*Eventing) SyncStatusActiveBackend ¶
func (e *Eventing) SyncStatusActiveBackend()
type EventingList ¶
type EventingList struct { kmetav1.TypeMeta `json:",inline"` kmetav1.ListMeta `json:"metadata,omitempty"` Items []Eventing `json:"items"` }
EventingList contains a list of Eventing.
func (*EventingList) DeepCopy ¶
func (in *EventingList) DeepCopy() *EventingList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventingList.
func (*EventingList) DeepCopyInto ¶
func (in *EventingList) DeepCopyInto(out *EventingList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EventingList) DeepCopyObject ¶
func (in *EventingList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EventingSpec ¶
type EventingSpec struct { // Backend defines the active backend used by Eventing. // +kubebuilder:validation:XValidation:rule=" (self.type != 'EventMesh') || ((self.type == 'EventMesh') && (self.config.eventMeshSecret != ”))", message="secret cannot be empty if EventMesh backend is used" Backend *Backend `json:"backend,omitempty"` // Publisher defines the configurations for eventing-publisher-proxy. // +kubebuilder:default:={replicas:{min:2,max:2}, resources:{limits:{cpu:"500m",memory:"512Mi"}, requests:{cpu:"40m",memory:"256Mi"}}} Publisher `json:"publisher,omitempty"` // Logging defines the log level for eventing-manager. // +kubebuilder:default:={logLevel:Info} Logging `json:"logging,omitempty"` // Annotations allows to add annotations to resources. Annotations map[string]string `json:"annotations,omitempty"` // Labels allows to add Labels to resources. Labels map[string]string `json:"labels,omitempty"` }
EventingSpec defines the desired state of Eventing.
func (*EventingSpec) DeepCopy ¶
func (in *EventingSpec) DeepCopy() *EventingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventingSpec.
func (*EventingSpec) DeepCopyInto ¶
func (in *EventingSpec) DeepCopyInto(out *EventingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (EventingSpec) HasEmptyBackend ¶
func (es EventingSpec) HasEmptyBackend() bool
type EventingStatus ¶
type EventingStatus struct { ActiveBackend BackendType `json:"activeBackend"` BackendConfigHash int64 `json:"specHash"` // Defines the overall state of the Eventing custom resource.<br/> // - `Ready` when all the resources managed by the Eventing manager are deployed successfully and the Eventing backend is connected.<br/> // - `Warning` if there is a user input misconfiguration. The following are examples of user input misconfigurations:<br/> // - There is no backend configured.<br/> // - The backend is configured to NATS but there is no NATS module installed.<br/> // - The backend is configured to EventMesh but there is no valid EventMesh Secret configured.<br/> // - `Processing` if the resources managed by the Eventing manager are being created or updated.<br/> // - `Error` if an error occurred while reconciling the Eventing custom resource. State string `json:"state"` PublisherService string `json:"publisherService,omitempty"` Conditions []kmetav1.Condition `json:"conditions,omitempty"` }
EventingStatus defines the observed state of Eventing.
func (*EventingStatus) ClearConditions ¶
func (es *EventingStatus) ClearConditions()
func (*EventingStatus) ClearPublisherService ¶
func (es *EventingStatus) ClearPublisherService()
ClearPublisherService clears the PublisherService.
func (*EventingStatus) DeepCopy ¶
func (in *EventingStatus) DeepCopy() *EventingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventingStatus.
func (*EventingStatus) DeepCopyInto ¶
func (in *EventingStatus) DeepCopyInto(out *EventingStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EventingStatus) IsEqual ¶
func (es *EventingStatus) IsEqual(status EventingStatus) bool
func (*EventingStatus) RemoveUnsupportedConditions ¶
func (es *EventingStatus) RemoveUnsupportedConditions()
RemoveUnsupportedConditions removes unsupported conditions from the status and keeps only the supported ones.
func (*EventingStatus) SetEventMeshAvailableConditionToTrue ¶
func (es *EventingStatus) SetEventMeshAvailableConditionToTrue()
func (*EventingStatus) SetNATSAvailableConditionToTrue ¶
func (es *EventingStatus) SetNATSAvailableConditionToTrue()
func (*EventingStatus) SetPublisherProxyConditionToFalse ¶
func (es *EventingStatus) SetPublisherProxyConditionToFalse(reason ConditionReason, message string)
func (*EventingStatus) SetPublisherProxyReadyToTrue ¶
func (es *EventingStatus) SetPublisherProxyReadyToTrue()
func (*EventingStatus) SetPublisherService ¶
func (es *EventingStatus) SetPublisherService(name, namespace string)
SetPublisherService sets the PublisherService from the given service name and namespace.
func (*EventingStatus) SetStateError ¶
func (es *EventingStatus) SetStateError()
func (*EventingStatus) SetStateProcessing ¶
func (es *EventingStatus) SetStateProcessing()
func (*EventingStatus) SetStateReady ¶
func (es *EventingStatus) SetStateReady()
func (*EventingStatus) SetStateWarning ¶
func (es *EventingStatus) SetStateWarning()
func (*EventingStatus) SetSubscriptionManagerReadyConditionToFalse ¶
func (es *EventingStatus) SetSubscriptionManagerReadyConditionToFalse(reason ConditionReason, message string)
func (*EventingStatus) SetSubscriptionManagerReadyConditionToTrue ¶
func (es *EventingStatus) SetSubscriptionManagerReadyConditionToTrue()
func (*EventingStatus) UpdateConditionBackendAvailable ¶
func (es *EventingStatus) UpdateConditionBackendAvailable(status kmetav1.ConditionStatus, reason ConditionReason, message string, )
func (*EventingStatus) UpdateConditionDeletion ¶
func (es *EventingStatus) UpdateConditionDeletion(status kmetav1.ConditionStatus, reason ConditionReason, message string, )
func (*EventingStatus) UpdateConditionPublisherProxyReady ¶
func (es *EventingStatus) UpdateConditionPublisherProxyReady(status kmetav1.ConditionStatus, reason ConditionReason, message string, )
func (*EventingStatus) UpdateConditionSubscriptionManagerReady ¶
func (es *EventingStatus) UpdateConditionSubscriptionManagerReady(status kmetav1.ConditionStatus, reason ConditionReason, message string, )
type Logging ¶
type Logging struct { // LogLevel defines the log level. // +kubebuilder:default:=Info // +kubebuilder:validation:XValidation:rule="self=='Info' || self=='Warn' || self=='Error' || self=='Debug'", message="logLevel can only be set to Debug, Info, Warn or Error" LogLevel string `json:"logLevel,omitempty"` }
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 Publisher ¶
type Publisher struct { // Replicas defines the scaling min/max for eventing-publisher-proxy. // +kubebuilder:default:={min:2,max:2} // +kubebuilder:validation:XValidation:rule="self.min <= self.max", message="min value must be smaller than the max value" Replicas `json:"replicas,omitempty"` // Resources defines resources for eventing-publisher-proxy. // +kubebuilder:default:={limits:{cpu:"500m",memory:"512Mi"}, requests:{cpu:"40m",memory:"256Mi"}} Resources kcorev1.ResourceRequirements `json:"resources,omitempty"` }
Publisher defines the configurations for eventing-publisher-proxy.
func (*Publisher) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Publisher.
func (*Publisher) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Replicas ¶
type Replicas struct { // Min defines minimum number of replicas. // +kubebuilder:default:=2 // +kubebuilder:validation:Minimum:=0 Min int `json:"min,omitempty"` // Max defines maximum number of replicas. // +kubebuilder:default:=2 Max int `json:"max,omitempty"` }
Replicas defines min/max replicas for a resource.
func (*Replicas) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Replicas.
func (*Replicas) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.