v1alpha1

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the resource v1alpha1 API group +kubebuilder:object:generate=true +groupName=resource.streamnative.io

Index

Constants

View Source
const (
	// ConditionReady indicates status condition ready
	ConditionReady string = "Ready"
	// FinalizerName is the finalizer string that add to object
	FinalizerName string = "cloud.streamnative.io/finalizer"

	// AuthPluginToken indicates the authentication pulgin type token
	AuthPluginToken string = "org.apache.pulsar.client.impl.auth.AuthenticationToken" // #nosec G101
	// AuthPluginOAuth2 indicates the authentication pulgin type oauth2
	AuthPluginOAuth2 string = "org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "resource.streamnative.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

func IsPulsarResourceReady

func IsPulsarResourceReady(instance reconciler.Object) bool

IsPulsarResourceReady returns true if resource satisfies with these condition 1. The instance is not deleted 2. Status ObservedGeneration is equal with meta.ObservedGeneration 3. StatusCondition Ready is true

Types

type ClusterInfo added in v0.3.0

type ClusterInfo struct {
	// Name is the pulsar cluster name
	Name string `json:"name,omitempty"`
	// ConnectionRef is the connection reference that can connect to the pulsar cluster
	ConnectionRef corev1.LocalObjectReference `json:"connectionRef"`
}

ClusterInfo indicates the cluster info that will be used in the setup of GEO replication.

func (*ClusterInfo) DeepCopy added in v0.3.0

func (in *ClusterInfo) DeepCopy() *ClusterInfo

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

func (*ClusterInfo) DeepCopyInto added in v0.3.0

func (in *ClusterInfo) DeepCopyInto(out *ClusterInfo)

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

type PulsarAuthentication

type PulsarAuthentication struct {
	// +optional
	Token *ValueOrSecretRef `json:"token,omitempty"`

	// +optional
	OAuth2 *PulsarAuthenticationOAuth2 `json:"oauth2,omitempty"`
}

PulsarAuthentication use the token or OAuth2 for pulsar authentication

func (*PulsarAuthentication) DeepCopy

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

func (*PulsarAuthentication) DeepCopyInto

func (in *PulsarAuthentication) DeepCopyInto(out *PulsarAuthentication)

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

type PulsarAuthenticationOAuth2

type PulsarAuthenticationOAuth2 struct {
	IssuerEndpoint string           `json:"issuerEndpoint"`
	ClientID       string           `json:"clientID"`
	Audience       string           `json:"audience"`
	Key            ValueOrSecretRef `json:"key"`
	Scope          string           `json:"scope,omitempty"`
}

PulsarAuthenticationOAuth2 indicates the parameters which are need by pulsar OAuth2

func (*PulsarAuthenticationOAuth2) DeepCopy

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

func (*PulsarAuthenticationOAuth2) DeepCopyInto

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

type PulsarConnection

type PulsarConnection struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PulsarConnectionSpec   `json:"spec,omitempty"`
	Status PulsarConnectionStatus `json:"status,omitempty"`
}

PulsarConnection is the Schema for the pulsarconnections API

func (*PulsarConnection) DeepCopy

func (in *PulsarConnection) DeepCopy() *PulsarConnection

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

func (*PulsarConnection) DeepCopyInto

func (in *PulsarConnection) DeepCopyInto(out *PulsarConnection)

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

func (*PulsarConnection) DeepCopyObject

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

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

type PulsarConnectionList

type PulsarConnectionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PulsarConnection `json:"items"`
}

PulsarConnectionList contains a list of PulsarConnection

func (*PulsarConnectionList) DeepCopy

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

func (*PulsarConnectionList) DeepCopyInto

func (in *PulsarConnectionList) DeepCopyInto(out *PulsarConnectionList)

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

func (*PulsarConnectionList) DeepCopyObject

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

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

type PulsarConnectionSpec

type PulsarConnectionSpec struct {

	// AdminServiceURL is the admin service url of the pulsar cluster
	// +optional
	// +kubebuilder:validation:Pattern="^https?://.+$"
	AdminServiceURL string `json:"adminServiceURL"`

	// Authentication defines authentication configurations
	// +optional
	Authentication *PulsarAuthentication `json:"authentication,omitempty"`

	// BrokerServiceURL is the broker service url of the pulsar cluster
	// +optional
	// +kubebuilder:validation:Pattern="^pulsar?://.+$"
	BrokerServiceURL string `json:"brokerServiceURL,omitempty"`

	// BrokerServiceSecureURL is the broker service url for secure connection.
	// +optional
	// +kubebuilder:validation:Pattern="^pulsar\\+ssl://.+$"
	BrokerServiceSecureURL string `json:"brokerServiceSecureURL,omitempty"`

	// AdminServiceSecureURL is the admin service url for secure connection.
	// +optional
	// +kubebuilder:validation:Pattern="^https://.+$"
	AdminServiceSecureURL string `json:"adminServiceSecureURL,omitempty"`

	// BrokerClientTrustCertsFilePath Path for the trusted TLS certificate file for outgoing connection to a server (broker)
	// +optional
	BrokerClientTrustCertsFilePath string `json:"brokerClientTrustCertsFilePath,omitempty"`

	// ClusterName indicates the local cluster name of the pulsar cluster. It should
	// set when enabling the Geo Replication
	// +optional
	ClusterName string `json:"clusterName,omitempty"`
}

PulsarConnectionSpec defines the desired state of PulsarConnection

func (*PulsarConnectionSpec) DeepCopy

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

func (*PulsarConnectionSpec) DeepCopyInto

func (in *PulsarConnectionSpec) DeepCopyInto(out *PulsarConnectionSpec)

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

type PulsarConnectionStatus

type PulsarConnectionStatus struct {

	// ObservedGeneration is the most recent generation observed for this resource.
	// It corresponds to the metadata generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// SecretKeyHash is the hash of the secret ref
	// +optional
	SecretKeyHash string `json:"secretKeyHash,omitempty"`

	// Represents the observations of a connection's current state.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

PulsarConnectionStatus defines the observed state of PulsarConnection

func (*PulsarConnectionStatus) DeepCopy

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

func (*PulsarConnectionStatus) DeepCopyInto

func (in *PulsarConnectionStatus) DeepCopyInto(out *PulsarConnectionStatus)

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

type PulsarGeoReplication added in v0.3.0

type PulsarGeoReplication struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PulsarGeoReplicationSpec   `json:"spec,omitempty"`
	Status PulsarGeoReplicationStatus `json:"status,omitempty"`
}

PulsarGeoReplication is the Schema for the pulsargeoreplications API

func (*PulsarGeoReplication) DeepCopy added in v0.3.0

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

func (*PulsarGeoReplication) DeepCopyInto added in v0.3.0

func (in *PulsarGeoReplication) DeepCopyInto(out *PulsarGeoReplication)

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

func (*PulsarGeoReplication) DeepCopyObject added in v0.3.0

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

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

type PulsarGeoReplicationList added in v0.3.0

type PulsarGeoReplicationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PulsarGeoReplication `json:"items"`
}

PulsarGeoReplicationList contains a list of PulsarGeoReplication

func (*PulsarGeoReplicationList) DeepCopy added in v0.3.0

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

func (*PulsarGeoReplicationList) DeepCopyInto added in v0.3.0

func (in *PulsarGeoReplicationList) DeepCopyInto(out *PulsarGeoReplicationList)

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

func (*PulsarGeoReplicationList) DeepCopyObject added in v0.3.0

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

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

type PulsarGeoReplicationSpec added in v0.3.0

type PulsarGeoReplicationSpec struct {

	// ConnectionRef is the reference to the source PulsarConnection
	ConnectionRef corev1.LocalObjectReference `json:"connectionRef"`

	// DestinationConnectionRef is the connection reference to the remote cluster
	DestinationConnectionRef corev1.LocalObjectReference `json:"destinationConnectionRef"`

	// +kubebuilder:validation:Enum=CleanUpAfterDeletion;KeepAfterDeletion
	// +optional
	LifecyclePolicy PulsarResourceLifeCyclePolicy `json:"lifecyclePolicy,omitempty"`
}

PulsarGeoReplicationSpec defines the desired state of PulsarGeoReplication

func (*PulsarGeoReplicationSpec) DeepCopy added in v0.3.0

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

func (*PulsarGeoReplicationSpec) DeepCopyInto added in v0.3.0

func (in *PulsarGeoReplicationSpec) DeepCopyInto(out *PulsarGeoReplicationSpec)

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

type PulsarGeoReplicationStatus added in v0.3.0

type PulsarGeoReplicationStatus struct {

	// ObservedGeneration is the most recent generation observed for this resource.
	// It corresponds to the metadata generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions Represents the observations of a connection's current state.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

PulsarGeoReplicationStatus defines the observed state of PulsarGeoReplication

func (*PulsarGeoReplicationStatus) DeepCopy added in v0.3.0

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

func (*PulsarGeoReplicationStatus) DeepCopyInto added in v0.3.0

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

type PulsarNamespace

type PulsarNamespace struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PulsarNamespaceSpec   `json:"spec,omitempty"`
	Status PulsarNamespaceStatus `json:"status,omitempty"`
}

PulsarNamespace is the Schema for the pulsarnamespaces API

func (*PulsarNamespace) DeepCopy

func (in *PulsarNamespace) DeepCopy() *PulsarNamespace

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

func (*PulsarNamespace) DeepCopyInto

func (in *PulsarNamespace) DeepCopyInto(out *PulsarNamespace)

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

func (*PulsarNamespace) DeepCopyObject

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

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

type PulsarNamespaceList

type PulsarNamespaceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PulsarNamespace `json:"items"`
}

PulsarNamespaceList contains a list of PulsarNamespace

func (*PulsarNamespaceList) DeepCopy

func (in *PulsarNamespaceList) DeepCopy() *PulsarNamespaceList

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

func (*PulsarNamespaceList) DeepCopyInto

func (in *PulsarNamespaceList) DeepCopyInto(out *PulsarNamespaceList)

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

func (*PulsarNamespaceList) DeepCopyObject

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

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

type PulsarNamespaceSpec

type PulsarNamespaceSpec struct {

	// Name is the namespace name
	Name string `json:"name"`

	Bundles *int32 `json:"bundles,omitempty"`

	// ConnectionRef is the reference to the PulsarConnection resource
	ConnectionRef corev1.LocalObjectReference `json:"connectionRef"`

	// +kubebuilder:validation:Enum=CleanUpAfterDeletion;KeepAfterDeletion
	// +optional
	LifecyclePolicy PulsarResourceLifeCyclePolicy `json:"lifecyclePolicy,omitempty"`

	// Tenant Policy Setting
	// +optional
	MaxProducersPerTopic *int32 `json:"maxProducersPerTopic,omitempty"`

	// +optional
	MaxConsumersPerTopic *int32 `json:"maxConsumersPerTopic,omitempty"`

	// +optional
	MaxConsumersPerSubscription *int32 `json:"maxConsumersPerSubscription,omitempty"`

	// MessageTTL indicates the message ttl for the namespace
	// +optional
	MessageTTL *utils.Duration `json:"messageTTL,omitempty"`

	// Retention
	// Should set at least one of them if setting retention
	// Retention Quota must exceed configured backlog quota for namespace
	// +optional
	RetentionTime *utils.Duration `json:"retentionTime,omitempty"`

	// +optional
	RetentionSize *resource.Quantity `json:"retentionSize,omitempty"`

	// Backlog
	// Should set at least one of them if setting backlog
	// +optional
	BacklogQuotaLimitTime *utils.Duration `json:"backlogQuotaLimitTime,omitempty"`

	// +optional
	BacklogQuotaLimitSize *resource.Quantity `json:"backlogQuotaLimitSize,omitempty"`

	// +optional
	BacklogQuotaRetentionPolicy *string `json:"backlogQuotaRetentionPolicy,omitempty"`

	// BacklogQuotaType controls the backlog by setting the type to destination_storage or message_age
	// destination_storage limits backlog by size (in bytes). message_age limits backlog by time,
	// that is, message timestamp (broker or publish timestamp)
	// +kubebuilder:validation:Enum=destination_storage;message_age
	// +optional
	BacklogQuotaType *string `json:"backlogQuotaType,omitempty"`

	// GeoReplicationRefs is the reference list to the PulsarGeoReplication resource
	// +optional
	GeoReplicationRefs []*corev1.LocalObjectReference `json:"geoReplicationRefs,omitempty"`
}

PulsarNamespaceSpec defines the desired state of PulsarNamespace

func (*PulsarNamespaceSpec) DeepCopy

func (in *PulsarNamespaceSpec) DeepCopy() *PulsarNamespaceSpec

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

func (*PulsarNamespaceSpec) DeepCopyInto

func (in *PulsarNamespaceSpec) DeepCopyInto(out *PulsarNamespaceSpec)

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

type PulsarNamespaceStatus

type PulsarNamespaceStatus struct {

	// ObservedGeneration is the most recent generation observed for this resource.
	// It corresponds to the metadata generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Represents the observations of a connection's current state.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`

	// GeoReplicationEnabled
	// +optional
	GeoReplicationEnabled bool `json:"geoReplicationEnabled,omitempty"`
}

PulsarNamespaceStatus defines the observed state of PulsarNamespace

func (*PulsarNamespaceStatus) DeepCopy

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

func (*PulsarNamespaceStatus) DeepCopyInto

func (in *PulsarNamespaceStatus) DeepCopyInto(out *PulsarNamespaceStatus)

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

type PulsarPermission

type PulsarPermission struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PulsarPermissionSpec   `json:"spec,omitempty"`
	Status PulsarPermissionStatus `json:"status,omitempty"`
}

PulsarPermission is the Schema for the pulsarpermissions API

func (*PulsarPermission) DeepCopy

func (in *PulsarPermission) DeepCopy() *PulsarPermission

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

func (*PulsarPermission) DeepCopyInto

func (in *PulsarPermission) DeepCopyInto(out *PulsarPermission)

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

func (*PulsarPermission) DeepCopyObject

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

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

type PulsarPermissionList

type PulsarPermissionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PulsarPermission `json:"items"`
}

PulsarPermissionList contains a list of PulsarPermission

func (*PulsarPermissionList) DeepCopy

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

func (*PulsarPermissionList) DeepCopyInto

func (in *PulsarPermissionList) DeepCopyInto(out *PulsarPermissionList)

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

func (*PulsarPermissionList) DeepCopyObject

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

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

type PulsarPermissionSpec

type PulsarPermissionSpec struct {

	// ConnectionRef is the reference to the PulsarConnection resource
	ConnectionRef corev1.LocalObjectReference `json:"connectionRef"`

	// ResourceName name of the target resource which will be granted the permssions
	ResourceName string `json:"resourceName"`

	// +kubebuilder:validation:Enum=namespace;topic
	// ResourceType indicates the resource type, the options include namespace and topic
	ResoureType PulsarResourceType `json:"resourceType"`
	// Roles contains a list of role which will be granted the same permissions
	// for the same target
	Roles []string `json:"roles"`
	// Actions contains a list of action to grant.
	// the options include produce,consume,functions
	Actions []string `json:"actions,omitempty"`

	// LifecyclePolicy is the policy that how to deal with pulsar resource when
	// PulsarPermission is deleted
	// +optional
	LifecyclePolicy PulsarResourceLifeCyclePolicy `json:"lifecyclePolicy,omitempty"`
}

PulsarPermissionSpec defines the desired state of PulsarPermission

func (*PulsarPermissionSpec) DeepCopy

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

func (*PulsarPermissionSpec) DeepCopyInto

func (in *PulsarPermissionSpec) DeepCopyInto(out *PulsarPermissionSpec)

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

type PulsarPermissionStatus

type PulsarPermissionStatus struct {

	// ObservedGeneration is the most recent generation observed for this resource.
	// It corresponds to the metadata generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Represents the observations of a connection's current state.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

PulsarPermissionStatus defines the observed state of PulsarPermission

func (*PulsarPermissionStatus) DeepCopy

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

func (*PulsarPermissionStatus) DeepCopyInto

func (in *PulsarPermissionStatus) DeepCopyInto(out *PulsarPermissionStatus)

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

type PulsarResourceLifeCyclePolicy

type PulsarResourceLifeCyclePolicy string

PulsarResourceLifeCyclePolicy indicates whether it will keep or delete the resource in pulsar cluster after resource is deleted by controller KeepAfterDeletion or CleanUpAfterDeletion

const (
	// KeepAfterDeletion keeps the resource in pulsar cluster when cr is deleted
	KeepAfterDeletion PulsarResourceLifeCyclePolicy = "KeepAfterDeletion"
	// CleanUpAfterDeletion deletes the resource in pulsar cluster when cr is deleted
	CleanUpAfterDeletion PulsarResourceLifeCyclePolicy = "CleanUpAfterDeletion"
)

type PulsarResourceType

type PulsarResourceType string

PulsarResourceType indicates the resource type, the options include namespace and topic

const (
	// PulsarResourceTypeNamespace resource type namespace
	PulsarResourceTypeNamespace PulsarResourceType = "namespace"
	// PulsarResourceTypeTopic resource type topic
	PulsarResourceTypeTopic PulsarResourceType = "topic"
)

type PulsarTenant

type PulsarTenant struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PulsarTenantSpec   `json:"spec,omitempty"`
	Status PulsarTenantStatus `json:"status,omitempty"`
}

PulsarTenant is the Schema for the pulsartenants API

func (*PulsarTenant) DeepCopy

func (in *PulsarTenant) DeepCopy() *PulsarTenant

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

func (*PulsarTenant) DeepCopyInto

func (in *PulsarTenant) DeepCopyInto(out *PulsarTenant)

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

func (*PulsarTenant) DeepCopyObject

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

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

type PulsarTenantList

type PulsarTenantList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PulsarTenant `json:"items"`
}

PulsarTenantList contains a list of PulsarTenant

func (*PulsarTenantList) DeepCopy

func (in *PulsarTenantList) DeepCopy() *PulsarTenantList

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

func (*PulsarTenantList) DeepCopyInto

func (in *PulsarTenantList) DeepCopyInto(out *PulsarTenantList)

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

func (*PulsarTenantList) DeepCopyObject

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

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

type PulsarTenantSpec

type PulsarTenantSpec struct {

	// Name is the tenant name
	Name string `json:"name"`

	// ConnectionRef is the reference to the PulsarConnection resource
	ConnectionRef corev1.LocalObjectReference `json:"connectionRef"`

	// +optional
	AdminRoles []string `json:"adminRoles,omitempty"`

	// +optional
	AllowedClusters []string `json:"allowedClusters,omitempty"`

	// +kubebuilder:validation:Enum=CleanUpAfterDeletion;KeepAfterDeletion
	// +optional
	LifecyclePolicy PulsarResourceLifeCyclePolicy `json:"lifecyclePolicy,omitempty"`

	// GeoReplicationRefs is the reference list to the PulsarGeoReplication resource
	// +optional
	GeoReplicationRefs []*corev1.LocalObjectReference `json:"geoReplicationRefs,omitempty"`
}

PulsarTenantSpec defines the desired state of PulsarTenant

func (*PulsarTenantSpec) DeepCopy

func (in *PulsarTenantSpec) DeepCopy() *PulsarTenantSpec

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

func (*PulsarTenantSpec) DeepCopyInto

func (in *PulsarTenantSpec) DeepCopyInto(out *PulsarTenantSpec)

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

type PulsarTenantStatus

type PulsarTenantStatus struct {

	// ObservedGeneration is the most recent generation observed for this resource.
	// It corresponds to the metadata generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Represents the observations of a connection's current state.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

PulsarTenantStatus defines the observed state of PulsarTenant

func (*PulsarTenantStatus) DeepCopy

func (in *PulsarTenantStatus) DeepCopy() *PulsarTenantStatus

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

func (*PulsarTenantStatus) DeepCopyInto

func (in *PulsarTenantStatus) DeepCopyInto(out *PulsarTenantStatus)

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

type PulsarTopic

type PulsarTopic struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PulsarTopicSpec   `json:"spec,omitempty"`
	Status PulsarTopicStatus `json:"status,omitempty"`
}

PulsarTopic is the Schema for the pulsartopics API

func (*PulsarTopic) DeepCopy

func (in *PulsarTopic) DeepCopy() *PulsarTopic

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

func (*PulsarTopic) DeepCopyInto

func (in *PulsarTopic) DeepCopyInto(out *PulsarTopic)

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

func (*PulsarTopic) DeepCopyObject

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

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

type PulsarTopicList

type PulsarTopicList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PulsarTopic `json:"items"`
}

PulsarTopicList contains a list of PulsarTopic

func (*PulsarTopicList) DeepCopy

func (in *PulsarTopicList) DeepCopy() *PulsarTopicList

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

func (*PulsarTopicList) DeepCopyInto

func (in *PulsarTopicList) DeepCopyInto(out *PulsarTopicList)

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

func (*PulsarTopicList) DeepCopyObject

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

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

type PulsarTopicSpec

type PulsarTopicSpec struct {

	// Name is the topic name
	Name string `json:"name"`

	// +kubebuilder:default=true
	// +optional
	Persistent *bool `json:"persistent,omitempty"`

	// +kubebuilder:default=0
	// +optional
	Partitions *int32 `json:"partitions,omitempty"`

	// ConnectionRef is the reference to the PulsarConnection resource
	ConnectionRef corev1.LocalObjectReference `json:"connectionRef"`

	// +kubebuilder:validation:Enum=CleanUpAfterDeletion;KeepAfterDeletion
	// +optional
	LifecyclePolicy PulsarResourceLifeCyclePolicy `json:"lifecyclePolicy,omitempty"`

	// Topic Policy Setting
	// +optional
	MaxProducers *int32 `json:"maxProducers,omitempty"`

	// +optional
	MaxConsumers *int32 `json:"maxConsumers,omitempty"`

	// MessageTTL indicates the message ttl for the topic
	// +optional
	MessageTTL *utils.Duration `json:"messageTTL,omitempty"`

	// Max unacked messages
	// +optional
	MaxUnAckedMessagesPerConsumer *int32 `json:"maxUnAckedMessagesPerConsumer,omitempty"`

	// +optional
	MaxUnAckedMessagesPerSubscription *int32 `json:"maxUnAckedMessagesPerSubscription,omitempty"`

	// Retention
	// Should set at least one of them if setting retention
	// Retention Quota must exceed configured backlog quota for topic
	// +optional
	RetentionTime *utils.Duration `json:"retentionTime,omitempty"`

	// +optional
	RetentionSize *resource.Quantity `json:"retentionSize,omitempty"`

	// Backlog
	// Should set at least one of them if setting backlog
	// +optional
	BacklogQuotaLimitTime *utils.Duration `json:"backlogQuotaLimitTime,omitempty"`

	// +optional
	BacklogQuotaLimitSize *resource.Quantity `json:"backlogQuotaLimitSize,omitempty"`

	// +optional
	BacklogQuotaRetentionPolicy *string `json:"backlogQuotaRetentionPolicy,omitempty"`

	// +optional
	SchemaInfo *SchemaInfo `json:"schemaInfo,omitempty"`

	// GeoReplicationRefs is the reference list to the PulsarGeoReplication resource
	// +optional
	GeoReplicationRefs []*corev1.LocalObjectReference `json:"geoReplicationRefs,omitempty"`
}

PulsarTopicSpec defines the desired state of PulsarTopic

func (*PulsarTopicSpec) DeepCopy

func (in *PulsarTopicSpec) DeepCopy() *PulsarTopicSpec

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

func (*PulsarTopicSpec) DeepCopyInto

func (in *PulsarTopicSpec) DeepCopyInto(out *PulsarTopicSpec)

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

type PulsarTopicStatus

type PulsarTopicStatus struct {

	// ObservedGeneration is the most recent generation observed for this resource.
	// It corresponds to the metadata generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Represents the observations of a connection's current state.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`

	// GeoReplicationEnabled
	// +optional
	GeoReplicationEnabled bool `json:"geoReplicationEnabled,omitempty"`
}

PulsarTopicStatus defines the observed state of PulsarTopic

func (*PulsarTopicStatus) DeepCopy

func (in *PulsarTopicStatus) DeepCopy() *PulsarTopicStatus

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

func (*PulsarTopicStatus) DeepCopyInto

func (in *PulsarTopicStatus) DeepCopyInto(out *PulsarTopicStatus)

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

type SchemaInfo added in v0.2.0

type SchemaInfo struct {
	// Type determines how to interpret the schema data
	Type string `json:"type,omitempty"`
	// Schema is schema data
	Schema string `json:"schema,omitempty"`
	// Properties is a user defined properties as a string/string map
	Properties map[string]string `json:"properties,omitempty"`
}

SchemaInfo defines the Pulsar Schema. It is stored and enforced on a per-topic basis and cannot be stored at the namespace or tenant level.

func (*SchemaInfo) DeepCopy added in v0.2.0

func (in *SchemaInfo) DeepCopy() *SchemaInfo

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

func (*SchemaInfo) DeepCopyInto added in v0.2.0

func (in *SchemaInfo) DeepCopyInto(out *SchemaInfo)

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

type SecretKeyRef

type SecretKeyRef struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

SecretKeyRef indicates a secret name and key

func (*SecretKeyRef) DeepCopy

func (in *SecretKeyRef) DeepCopy() *SecretKeyRef

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

func (*SecretKeyRef) DeepCopyInto

func (in *SecretKeyRef) DeepCopyInto(out *SecretKeyRef)

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

type ValueOrSecretRef

type ValueOrSecretRef struct {
	// +optional
	Value *string `json:"value,omitempty"`

	// +optional
	SecretRef *SecretKeyRef `json:"secretRef,omitempty"`
}

ValueOrSecretRef is a string or a secret reference of the authentication

func (*ValueOrSecretRef) DeepCopy

func (in *ValueOrSecretRef) DeepCopy() *ValueOrSecretRef

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

func (*ValueOrSecretRef) DeepCopyInto

func (in *ValueOrSecretRef) DeepCopyInto(out *ValueOrSecretRef)

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