v1beta4

package
v0.0.0-...-a49f6f1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package v1beta4 contains API Schema definitions for the apps v1beta4 API group +kubebuilder:object:generate=true +groupName=apps.emqx.io

Index

Constants

View Source
const (
	PodOnServing corev1.PodConditionType = "apps.emqx.io/on-serving"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "apps.emqx.io", Version: "v1beta4"}

	// 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 GetEmqxImage

func GetEmqxImage(instance Emqx) string

func MergeContainerPorts

func MergeContainerPorts(ports1, ports2 []corev1.ContainerPort) []corev1.ContainerPort

func MergeServicePorts

func MergeServicePorts(ports1, ports2 []corev1.ServicePort) []corev1.ServicePort

Types

type BootstrapAPIKey

type BootstrapAPIKey struct {
	// +kubebuilder:validation:Pattern:=`^[a-zA-Z\d_]+$`
	Key string `json:"key"`
	// +kubebuilder:validation:MinLength:=3
	// +kubebuilder:validation:MaxLength:=32
	Secret string `json:"secret"`
}

func (*BootstrapAPIKey) DeepCopy

func (in *BootstrapAPIKey) DeepCopy() *BootstrapAPIKey

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

func (*BootstrapAPIKey) DeepCopyInto

func (in *BootstrapAPIKey) DeepCopyInto(out *BootstrapAPIKey)

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

type Condition

type Condition struct {
	// Status of cluster condition.
	Type ConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

Condition saves the state information of the EMQX cluster

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type ConditionType

type ConditionType string

ConditionType defines the condition that the RF can have

const (
	ConditionRunning           ConditionType = "Running"
	ConditionBlueGreenUpdating ConditionType = "BlueGreenUpdating"
)

type Emqx

type Emqx interface {
	client.Object

	GetSpec() EmqxSpec
	GetStatus() EmqxStatus

	Default()
	ValidateCreate() (admission.Warnings, error)
	ValidateUpdate(runtime.Object) (admission.Warnings, error)
	ValidateDelete() (admission.Warnings, error)
}

+kubebuilder:object:generate=false

type EmqxBlueGreenUpdate

type EmqxBlueGreenUpdate struct {
	// Number of seconds before evacuation connection start.
	InitialDelaySeconds int32              `json:"initialDelaySeconds,omitempty"`
	EvacuationStrategy  EvacuationStrategy `json:"evacuationStrategy,omitempty"`
}

func (*EmqxBlueGreenUpdate) DeepCopy

func (in *EmqxBlueGreenUpdate) DeepCopy() *EmqxBlueGreenUpdate

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

func (*EmqxBlueGreenUpdate) DeepCopyInto

func (in *EmqxBlueGreenUpdate) DeepCopyInto(out *EmqxBlueGreenUpdate)

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

type EmqxBlueGreenUpdateStatus

type EmqxBlueGreenUpdateStatus struct {
	OriginStatefulSet  string                 `json:"originStatefulSet,omitempty"`
	CurrentStatefulSet string                 `json:"currentStatefulSet,omitempty"`
	StartedAt          *metav1.Time           `json:"startedAt,omitempty"`
	EvacuationsStatus  []EmqxEvacuationStatus `json:"evacuationsStatus,omitempty"`
}

func (*EmqxBlueGreenUpdateStatus) DeepCopy

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

func (*EmqxBlueGreenUpdateStatus) DeepCopyInto

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

type EmqxBroker

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

	Spec   EmqxBrokerSpec   `json:"spec,omitempty"`
	Status EmqxBrokerStatus `json:"status,omitempty"`
}

EmqxBroker is the Schema for the emqxbrokers API

func (*EmqxBroker) DeepCopy

func (in *EmqxBroker) DeepCopy() *EmqxBroker

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

func (*EmqxBroker) DeepCopyInto

func (in *EmqxBroker) DeepCopyInto(out *EmqxBroker)

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

func (*EmqxBroker) DeepCopyObject

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

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

func (*EmqxBroker) Default

func (r *EmqxBroker) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*EmqxBroker) GetSpec

func (emqx *EmqxBroker) GetSpec() EmqxSpec

func (*EmqxBroker) GetStatus

func (emqx *EmqxBroker) GetStatus() EmqxStatus

func (*EmqxBroker) Hub

func (*EmqxBroker) Hub()

func (*EmqxBroker) SetupWebhookWithManager

func (r *EmqxBroker) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*EmqxBroker) ValidateCreate

func (r *EmqxBroker) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*EmqxBroker) ValidateDelete

func (r *EmqxBroker) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*EmqxBroker) ValidateUpdate

func (r *EmqxBroker) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type EmqxBrokerList

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

EmqxBrokerList contains a list of EmqxBroker

func (*EmqxBrokerList) DeepCopy

func (in *EmqxBrokerList) DeepCopy() *EmqxBrokerList

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

func (*EmqxBrokerList) DeepCopyInto

func (in *EmqxBrokerList) DeepCopyInto(out *EmqxBrokerList)

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

func (*EmqxBrokerList) DeepCopyObject

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

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

type EmqxBrokerSpec

type EmqxBrokerSpec struct {
	//+kubebuilder:default:=3
	Replicas *int32 `json:"replicas,omitempty"`

	//+kubebuilder:default:="cluster.local"
	ClusterDomain string `json:"clusterDomain,omitempty"`

	// Persistent describes the common attributes of storage devices
	Persistent *corev1.PersistentVolumeClaimTemplate `json:"persistent,omitempty"`

	Template EmqxTemplate `json:"template,omitempty"`

	// ServiceTemplate defines a logical set of ports and a policy by which to access them
	ServiceTemplate ServiceTemplate `json:"serviceTemplate,omitempty"`
}

EmqxBrokerSpec defines the desired state of EmqxBroker

func (*EmqxBrokerSpec) DeepCopy

func (in *EmqxBrokerSpec) DeepCopy() *EmqxBrokerSpec

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

func (*EmqxBrokerSpec) DeepCopyInto

func (in *EmqxBrokerSpec) DeepCopyInto(out *EmqxBrokerSpec)

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

func (*EmqxBrokerSpec) GetClusterDomain

func (s *EmqxBrokerSpec) GetClusterDomain() string

func (*EmqxBrokerSpec) GetPersistent

func (*EmqxBrokerSpec) GetReloaderImage

func (s *EmqxBrokerSpec) GetReloaderImage() string

func (*EmqxBrokerSpec) GetReplicas

func (s *EmqxBrokerSpec) GetReplicas() *int32

func (*EmqxBrokerSpec) GetServiceTemplate

func (s *EmqxBrokerSpec) GetServiceTemplate() ServiceTemplate

func (*EmqxBrokerSpec) GetTemplate

func (s *EmqxBrokerSpec) GetTemplate() EmqxTemplate

func (*EmqxBrokerSpec) SetClusterDomain

func (s *EmqxBrokerSpec) SetClusterDomain(clusterDomain string)

func (*EmqxBrokerSpec) SetPersistent

func (s *EmqxBrokerSpec) SetPersistent(persistent *corev1.PersistentVolumeClaimTemplate)

func (*EmqxBrokerSpec) SetReloaderImage

func (s *EmqxBrokerSpec) SetReloaderImage(reloaderImage string)

func (*EmqxBrokerSpec) SetReplicas

func (s *EmqxBrokerSpec) SetReplicas(replicas int32)

func (*EmqxBrokerSpec) SetServiceTemplate

func (s *EmqxBrokerSpec) SetServiceTemplate(serviceTemplate ServiceTemplate)

func (*EmqxBrokerSpec) SetTemplate

func (s *EmqxBrokerSpec) SetTemplate(template EmqxTemplate)

type EmqxBrokerStatus

type EmqxBrokerStatus struct {
	// Represents the latest available observations of a EMQX current state.
	Conditions []Condition `json:"conditions,omitempty"`
	// Nodes of the EMQX cluster
	EmqxNodes []EmqxNode `json:"emqxNodes,omitempty"`
	// replicas is the number of Pods created by the EMQX Custom Resource controller.
	Replicas int32 `json:"replicas,omitempty"`
	// readyReplicas is the number of pods created for this EMQX Custom Resource with a EMQX Ready.
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	CurrentStatefulSetVersion string `json:"currentStatefulSetVersion,omitempty"`
}

EmqxBrokerStatus defines the observed state of EmqxBroker

func (*EmqxBrokerStatus) AddCondition

func (s *EmqxBrokerStatus) AddCondition(condType ConditionType, status corev1.ConditionStatus, reason, message string)

func (*EmqxBrokerStatus) DeepCopy

func (in *EmqxBrokerStatus) DeepCopy() *EmqxBrokerStatus

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

func (*EmqxBrokerStatus) DeepCopyInto

func (in *EmqxBrokerStatus) DeepCopyInto(out *EmqxBrokerStatus)

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

func (*EmqxBrokerStatus) GetCondition

func (s *EmqxBrokerStatus) GetCondition(t ConditionType) (int, *Condition)

func (*EmqxBrokerStatus) GetConditions

func (s *EmqxBrokerStatus) GetConditions() []Condition

func (*EmqxBrokerStatus) GetCurrentStatefulSetVersion

func (s *EmqxBrokerStatus) GetCurrentStatefulSetVersion() string

func (*EmqxBrokerStatus) GetEmqxNodes

func (s *EmqxBrokerStatus) GetEmqxNodes() []EmqxNode

func (*EmqxBrokerStatus) GetReadyReplicas

func (s *EmqxBrokerStatus) GetReadyReplicas() int32

func (*EmqxBrokerStatus) GetReplicas

func (s *EmqxBrokerStatus) GetReplicas() int32

func (*EmqxBrokerStatus) IsConditionTrue

func (s *EmqxBrokerStatus) IsConditionTrue(t ConditionType) bool

func (*EmqxBrokerStatus) SetCurrentStatefulSetVersion

func (s *EmqxBrokerStatus) SetCurrentStatefulSetVersion(version string)

func (*EmqxBrokerStatus) SetEmqxNodes

func (s *EmqxBrokerStatus) SetEmqxNodes(nodes []EmqxNode)

func (*EmqxBrokerStatus) SetReadyReplicas

func (s *EmqxBrokerStatus) SetReadyReplicas(readyReplicas int32)

func (*EmqxBrokerStatus) SetReplicas

func (s *EmqxBrokerStatus) SetReplicas(replicas int32)

type EmqxConfig

type EmqxConfig map[string]string

func (EmqxConfig) DeepCopy

func (in EmqxConfig) DeepCopy() EmqxConfig

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

func (EmqxConfig) DeepCopyInto

func (in EmqxConfig) DeepCopyInto(out *EmqxConfig)

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

type EmqxContainer

type EmqxContainer struct {
	// Container image.
	// The image is generated by "${Registry}/${Repository}:${Prefix}${Version}${Suffix}".
	Image EmqxImage `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"`
	// Entrypoint array. Not executed within a shell.
	// The container image's ENTRYPOINT is used if this is not provided.
	// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
	// cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
	// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
	// produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
	// of whether the variable exists or not. Cannot be updated.
	// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
	// +optional
	Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"`
	// Arguments to the entrypoint.
	// The container image's CMD is used if this is not provided.
	// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
	// cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
	// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
	// produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
	// of whether the variable exists or not. Cannot be updated.
	// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
	// +optional
	Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"`
	// Container's working directory.
	// If not specified, the container runtime's default will be used, which
	// might be configured in the container image.
	// Cannot be updated.
	// +optional
	WorkingDir string `json:"workingDir,omitempty" protobuf:"bytes,5,opt,name=workingDir"`
	// List of ports to expose from the container. Exposing a port here gives
	// the system additional information about the network connections a
	// container uses, but is primarily informational. Not specifying a port here
	// DOES NOT prevent that port from being exposed. Any port which is
	// listening on the default "0.0.0.0" address inside a container will be
	// accessible from the network.
	// Cannot be updated.
	// +optional
	// +patchMergeKey=containerPort
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=containerPort
	// +listMapKey=protocol
	Ports []corev1.ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"`
	// List of sources to populate environment variables in the container.
	// The keys defined within a source must be a C_IDENTIFIER. All invalid keys
	// will be reported as an event when the container is starting. When a key exists in multiple
	// sources, the value associated with the last source will take precedence.
	// Values defined by an Env with a duplicate key will take precedence.
	// Cannot be updated.
	// +optional
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"`
	// List of environment variables to set in the container.
	// Cannot be updated.
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"`
	// Compute Resources required by this container.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"`
	// Pod volumes to mount into the container's filesystem.
	// Cannot be updated.
	// +optional
	// +patchMergeKey=mountPath
	// +patchStrategy=merge
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"`
	// volumeDevices is the list of block devices to be used by the container.
	// +patchMergeKey=devicePath
	// +patchStrategy=merge
	// +optional
	VolumeDevices []corev1.VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"`
	// Periodic probe of container liveness.
	// Container will be restarted if the probe fails.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
	// +optional
	LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty" protobuf:"bytes,10,opt,name=livenessProbe"`
	// Periodic probe of container service readiness.
	// Container will be removed from service endpoints if the probe fails.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
	// +optional
	ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
	// StartupProbe indicates that the Pod has successfully initialized.
	// If specified, no other probes are executed until this completes successfully.
	// If this probe fails, the Pod will be restarted, just as if the livenessProbe failed.
	// This can be used to provide different probe parameters at the beginning of a Pod's lifecycle,
	// when it might take a long time to load data or warm a cache, than during steady-state operation.
	// This cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
	// +optional
	StartupProbe *corev1.Probe `json:"startupProbe,omitempty" protobuf:"bytes,22,opt,name=startupProbe"`
	// Actions that the management system should take in response to container lifecycle events.
	// Cannot be updated.
	// +optional
	Lifecycle *corev1.Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,12,opt,name=lifecycle"`
	// Optional: Path at which the file to which the container's termination message
	// will be written is mounted into the container's filesystem.
	// Message written is intended to be brief final status, such as an assertion failure message.
	// Will be truncated by the node if greater than 4096 bytes. The total message length across
	// all containers will be limited to 12kb.
	// Defaults to /dev/termination-log.
	// Cannot be updated.
	// +optional
	TerminationMessagePath string `json:"terminationMessagePath,omitempty" protobuf:"bytes,13,opt,name=terminationMessagePath"`
	// Indicate how the termination message should be populated. File will use the contents of
	// terminationMessagePath to populate the container status message on both success and failure.
	// FallbackToLogsOnError will use the last chunk of container log output if the termination
	// message file is empty and the container exited with an error.
	// The log output is limited to 2048 bytes or 80 lines, whichever is smaller.
	// Defaults to File.
	// Cannot be updated.
	// +optional
	TerminationMessagePolicy corev1.TerminationMessagePolicy `` /* 129-byte string literal not displayed */
	// SecurityContext defines the security options the container should be run with.
	// If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
	//+kubebuilder:default={runAsUser:1000,runAsGroup:1000,runAsNonRoot:true}
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"`

	// Whether this container should allocate a buffer for stdin in the container runtime. If this
	// is not set, reads from stdin in the container will always result in EOF.
	// Default is false.
	// +optional
	Stdin bool `json:"stdin,omitempty" protobuf:"varint,16,opt,name=stdin"`
	// Whether the container runtime should close the stdin channel after it has been opened by
	// a single attach. When stdin is true the stdin stream will remain open across multiple attach
	// sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
	// first client attaches to stdin, and then remains open and accepts data until the client disconnects,
	// at which time stdin is closed and remains closed until the container is restarted. If this
	// flag is false, a container processes that reads from stdin will never receive an EOF.
	// Default is false
	// +optional
	StdinOnce bool `json:"stdinOnce,omitempty" protobuf:"varint,17,opt,name=stdinOnce"`
	// Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
	// Default is false.
	// +optional
	TTY bool `json:"tty,omitempty" protobuf:"varint,18,opt,name=tty"`

	EmqxConfig map[string]string `json:"emqxConfig,omitempty"`
	EmqxACL    []string          `json:"emqxACL,omitempty"`
	// EMQX bootstrap user
	// Cannot be updated.
	BootstrapAPIKeys []BootstrapAPIKey `json:"bootstrapAPIKeys,omitempty"`
}

func (*EmqxContainer) DeepCopy

func (in *EmqxContainer) DeepCopy() *EmqxContainer

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

func (*EmqxContainer) DeepCopyInto

func (in *EmqxContainer) DeepCopyInto(out *EmqxContainer)

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

type EmqxEnterprise

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

	Spec   EmqxEnterpriseSpec   `json:"spec,omitempty"`
	Status EmqxEnterpriseStatus `json:"status,omitempty"`
}

EmqxEnterprise is the Schema for the emqxenterprises API

func (*EmqxEnterprise) DeepCopy

func (in *EmqxEnterprise) DeepCopy() *EmqxEnterprise

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

func (*EmqxEnterprise) DeepCopyInto

func (in *EmqxEnterprise) DeepCopyInto(out *EmqxEnterprise)

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

func (*EmqxEnterprise) DeepCopyObject

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

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

func (*EmqxEnterprise) Default

func (r *EmqxEnterprise) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*EmqxEnterprise) GetSpec

func (emqx *EmqxEnterprise) GetSpec() EmqxSpec

func (*EmqxEnterprise) GetStatus

func (emqx *EmqxEnterprise) GetStatus() EmqxStatus

func (*EmqxEnterprise) Hub

func (*EmqxEnterprise) Hub()

func (*EmqxEnterprise) SetupWebhookWithManager

func (r *EmqxEnterprise) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*EmqxEnterprise) ValidateCreate

func (r *EmqxEnterprise) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*EmqxEnterprise) ValidateDelete

func (r *EmqxEnterprise) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*EmqxEnterprise) ValidateUpdate

func (r *EmqxEnterprise) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type EmqxEnterpriseList

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

EmqxEnterpriseList contains a list of EmqxEnterprise

func (*EmqxEnterpriseList) DeepCopy

func (in *EmqxEnterpriseList) DeepCopy() *EmqxEnterpriseList

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

func (*EmqxEnterpriseList) DeepCopyInto

func (in *EmqxEnterpriseList) DeepCopyInto(out *EmqxEnterpriseList)

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

func (*EmqxEnterpriseList) DeepCopyObject

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

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

type EmqxEnterpriseSpec

type EmqxEnterpriseSpec struct {
	//+kubebuilder:default:=3
	Replicas *int32 `json:"replicas,omitempty"`

	//+kubebuilder:default:="cluster.local"
	ClusterDomain string `json:"clusterDomain,omitempty"`

	License EmqxLicense `json:"license,omitempty"`

	// Persistent describes the common attributes of storage devices
	Persistent *corev1.PersistentVolumeClaimTemplate `json:"persistent,omitempty"`

	EmqxBlueGreenUpdate *EmqxBlueGreenUpdate `json:"blueGreenUpdate,omitempty"`

	Template EmqxTemplate `json:"template,omitempty"`

	// ServiceTemplate defines a logical set of ports and a policy by which to access them
	ServiceTemplate ServiceTemplate `json:"serviceTemplate,omitempty"`
}

EmqxEnterpriseSpec defines the desired state of EmqxEnterprise

func (*EmqxEnterpriseSpec) DeepCopy

func (in *EmqxEnterpriseSpec) DeepCopy() *EmqxEnterpriseSpec

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

func (*EmqxEnterpriseSpec) DeepCopyInto

func (in *EmqxEnterpriseSpec) DeepCopyInto(out *EmqxEnterpriseSpec)

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

func (*EmqxEnterpriseSpec) GetClusterDomain

func (emqx *EmqxEnterpriseSpec) GetClusterDomain() string

func (*EmqxEnterpriseSpec) GetPersistent

func (*EmqxEnterpriseSpec) GetReloaderImage

func (emqx *EmqxEnterpriseSpec) GetReloaderImage() string

func (*EmqxEnterpriseSpec) GetReplicas

func (s *EmqxEnterpriseSpec) GetReplicas() *int32

func (*EmqxEnterpriseSpec) GetServiceTemplate

func (s *EmqxEnterpriseSpec) GetServiceTemplate() ServiceTemplate

func (*EmqxEnterpriseSpec) GetTemplate

func (s *EmqxEnterpriseSpec) GetTemplate() EmqxTemplate

func (*EmqxEnterpriseSpec) SetClusterDomain

func (emqx *EmqxEnterpriseSpec) SetClusterDomain(clusterDomain string)

func (*EmqxEnterpriseSpec) SetPersistent

func (s *EmqxEnterpriseSpec) SetPersistent(persistent *corev1.PersistentVolumeClaimTemplate)

func (*EmqxEnterpriseSpec) SetReloaderImage

func (emqx *EmqxEnterpriseSpec) SetReloaderImage(reloaderImage string)

func (*EmqxEnterpriseSpec) SetReplicas

func (s *EmqxEnterpriseSpec) SetReplicas(replicas int32)

func (*EmqxEnterpriseSpec) SetServiceTemplate

func (s *EmqxEnterpriseSpec) SetServiceTemplate(serviceTemplate ServiceTemplate)

func (*EmqxEnterpriseSpec) SetTemplate

func (s *EmqxEnterpriseSpec) SetTemplate(template EmqxTemplate)

type EmqxEnterpriseStatus

type EmqxEnterpriseStatus struct {
	// Represents the latest available observations of a EMQX current state.
	Conditions []Condition `json:"conditions,omitempty"`
	// Nodes of the EMQX cluster
	EmqxNodes []EmqxNode `json:"emqxNodes,omitempty"`
	// replicas is the number of Pods created by the EMQX Custom Resource controller.
	Replicas int32 `json:"replicas,omitempty"`
	// readyReplicas is the number of pods created for this EMQX Custom Resource with a EMQX Ready.
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	CurrentStatefulSetVersion string `json:"currentStatefulSetVersion,omitempty"`

	EmqxBlueGreenUpdateStatus *EmqxBlueGreenUpdateStatus `json:"blueGreenUpdateStatus,omitempty"`
}

EmqxEnterpriseStatus defines the observed state of EmqxEnterprise

func (*EmqxEnterpriseStatus) AddCondition

func (s *EmqxEnterpriseStatus) AddCondition(condType ConditionType, status corev1.ConditionStatus, reason, message string)

func (*EmqxEnterpriseStatus) DeepCopy

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

func (*EmqxEnterpriseStatus) DeepCopyInto

func (in *EmqxEnterpriseStatus) DeepCopyInto(out *EmqxEnterpriseStatus)

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

func (*EmqxEnterpriseStatus) GetCondition

func (s *EmqxEnterpriseStatus) GetCondition(t ConditionType) (int, *Condition)

func (*EmqxEnterpriseStatus) GetConditions

func (s *EmqxEnterpriseStatus) GetConditions() []Condition

func (*EmqxEnterpriseStatus) GetCurrentStatefulSetVersion

func (s *EmqxEnterpriseStatus) GetCurrentStatefulSetVersion() string

func (*EmqxEnterpriseStatus) GetEmqxNodes

func (s *EmqxEnterpriseStatus) GetEmqxNodes() []EmqxNode

func (*EmqxEnterpriseStatus) GetReadyReplicas

func (s *EmqxEnterpriseStatus) GetReadyReplicas() int32

func (*EmqxEnterpriseStatus) GetReplicas

func (s *EmqxEnterpriseStatus) GetReplicas() int32

func (*EmqxEnterpriseStatus) IsConditionTrue

func (s *EmqxEnterpriseStatus) IsConditionTrue(t ConditionType) bool

func (*EmqxEnterpriseStatus) SetCurrentStatefulSetVersion

func (s *EmqxEnterpriseStatus) SetCurrentStatefulSetVersion(version string)

func (*EmqxEnterpriseStatus) SetEmqxNodes

func (s *EmqxEnterpriseStatus) SetEmqxNodes(nodes []EmqxNode)

func (*EmqxEnterpriseStatus) SetReadyReplicas

func (s *EmqxEnterpriseStatus) SetReadyReplicas(readyReplicas int32)

func (*EmqxEnterpriseStatus) SetReplicas

func (s *EmqxEnterpriseStatus) SetReplicas(replicas int32)

type EmqxEvacuationStats

type EmqxEvacuationStats struct {
	InitialSessions  *int32 `json:"initial_sessions,omitempty"`
	InitialConnected *int32 `json:"initial_connected,omitempty"`
	CurrentSessions  *int32 `json:"current_sessions,omitempty"`
	CurrentConnected *int32 `json:"current_connected,omitempty"`
}

func (*EmqxEvacuationStats) DeepCopy

func (in *EmqxEvacuationStats) DeepCopy() *EmqxEvacuationStats

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

func (*EmqxEvacuationStats) DeepCopyInto

func (in *EmqxEvacuationStats) DeepCopyInto(out *EmqxEvacuationStats)

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

type EmqxEvacuationStatus

type EmqxEvacuationStatus struct {
	Node                   string              `json:"node,omitempty"`
	Stats                  EmqxEvacuationStats `json:"stats,omitempty"`
	State                  string              `json:"state,omitempty"`
	SessionRecipients      []string            `json:"session_recipients,omitempty"`
	SessionGoal            int32               `json:"session_goal,omitempty"`
	SessionEvictionRate    int32               `json:"session_eviction_rate,omitempty"`
	ConnectionGoal         int32               `json:"connection_goal,omitempty"`
	ConnectionEvictionRate int32               `json:"connection_eviction_rate,omitempty"`
}

func (*EmqxEvacuationStatus) DeepCopy

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

func (*EmqxEvacuationStatus) DeepCopyInto

func (in *EmqxEvacuationStatus) DeepCopyInto(out *EmqxEvacuationStatus)

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

type EmqxImage

type EmqxImage struct {
	// Container image registry
	//+kubectl:default="docker.io"
	Registry string `json:"registry,omitempty"`
	// Container image repository
	// Defaults to "emqx/emqx" if kind is EmqxBroker, or "emqx/emqx-ee" if kind is EmqxEnterprise
	Repository string `json:"repository,omitempty"`
	// Container image tag version, must semver format or "latest"
	//+kubebuilder:validation:Required
	Version string `json:"version,omitempty"`
	// Container image tag prefix, like "v"
	Prefix string `json:"prefix,omitempty"`
	// Container image tag suffix, like "-alpine"
	Suffix string `json:"suffix,omitempty"`
	// Container image pull policy.
	// One of Always, Never, IfNotPresent.
	// Defaults to IfNotPresent.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
	//+kubebuilder:validation:Enum=Always;Never;IfNotPresent
	//+kubebuilder:default:=IfNotPresent
	PullPolicy corev1.PullPolicy `json:"pullPolicy,omitempty"`
}

func (*EmqxImage) DeepCopy

func (in *EmqxImage) DeepCopy() *EmqxImage

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

func (*EmqxImage) DeepCopyInto

func (in *EmqxImage) DeepCopyInto(out *EmqxImage)

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

type EmqxLicense

type EmqxLicense struct {
	// Data contains the secret data. Each key must consist of alphanumeric
	// characters, '-', '_' or '.'. The serialized form of the secret data is a
	// base64 encoded string, representing the arbitrary (possibly non-string)
	// data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
	Data []byte `json:"data,omitempty"`

	// StringData allows specifying non-binary secret data in string form.
	// It is provided as a write-only input field for convenience.
	// All keys and values are merged into the data field on write, overwriting any existing values.
	StringData string `json:"stringData,omitempty"`

	// SecretName is the name of the secret in the pod's namespace to use.
	// More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
	SecretName string `json:"secretName,omitempty"`
}

func (*EmqxLicense) DeepCopy

func (in *EmqxLicense) DeepCopy() *EmqxLicense

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

func (*EmqxLicense) DeepCopyInto

func (in *EmqxLicense) DeepCopyInto(out *EmqxLicense)

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

type EmqxNode

type EmqxNode struct {
	// EMQX node name
	Node string `json:"node,omitempty"`
	// EMQX node status
	NodeStatus string `json:"node_status,omitempty"`
	// Erlang/OTP version used by EMQX
	OTPRelease string `json:"otp_release,omitempty"`
	// EMQX version
	Version string `json:"version,omitempty"`
	// MQTT connection count
	Connections int64 `json:"connections,omitempty"`
}

func (*EmqxNode) DeepCopy

func (in *EmqxNode) DeepCopy() *EmqxNode

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

func (*EmqxNode) DeepCopyInto

func (in *EmqxNode) DeepCopyInto(out *EmqxNode)

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

type EmqxPlugin

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

	Spec EmqxPluginSpec `json:"spec,omitempty"`
}

EmqxPlugin is the Schema for the emqxplugins API

func (*EmqxPlugin) DeepCopy

func (in *EmqxPlugin) DeepCopy() *EmqxPlugin

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

func (*EmqxPlugin) DeepCopyInto

func (in *EmqxPlugin) DeepCopyInto(out *EmqxPlugin)

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

func (*EmqxPlugin) DeepCopyObject

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

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

func (*EmqxPlugin) Default

func (r *EmqxPlugin) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*EmqxPlugin) Hub

func (*EmqxPlugin) Hub()

func (*EmqxPlugin) SetupWebhookWithManager

func (r *EmqxPlugin) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*EmqxPlugin) ValidateCreate

func (r *EmqxPlugin) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*EmqxPlugin) ValidateDelete

func (r *EmqxPlugin) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*EmqxPlugin) ValidateUpdate

func (r *EmqxPlugin) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type EmqxPluginList

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

EmqxPluginList contains a list of EmqxPlugin

func (*EmqxPluginList) DeepCopy

func (in *EmqxPluginList) DeepCopy() *EmqxPluginList

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

func (*EmqxPluginList) DeepCopyInto

func (in *EmqxPluginList) DeepCopyInto(out *EmqxPluginList)

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

func (*EmqxPluginList) DeepCopyObject

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

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

type EmqxPluginSpec

type EmqxPluginSpec struct {
	// More info: https://www.emqx.io/docs/en/v4.4/advanced/plugins.html#list-of-plugins
	//+kubebuilder:validation:Required
	PluginName string `json:"pluginName,omitempty"`
	// Selector matches the labels of the EMQX
	//+kubebuilder:validation:Required
	Selector map[string]string `json:"selector,omitempty"`
	// Config defines the configurations of the EMQX plugins
	Config map[string]string `json:"config,omitempty"`
}

EmqxPluginSpec defines the desired state of EmqxPlugin

func (*EmqxPluginSpec) DeepCopy

func (in *EmqxPluginSpec) DeepCopy() *EmqxPluginSpec

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

func (*EmqxPluginSpec) DeepCopyInto

func (in *EmqxPluginSpec) DeepCopyInto(out *EmqxPluginSpec)

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

type EmqxSpec

type EmqxSpec interface {
	GetReplicas() *int32
	SetReplicas(int32)

	GetClusterDomain() string
	SetClusterDomain(string)

	GetReloaderImage() string
	SetReloaderImage(string)

	GetPersistent() *corev1.PersistentVolumeClaimTemplate
	SetPersistent(*corev1.PersistentVolumeClaimTemplate)

	GetTemplate() EmqxTemplate
	SetTemplate(EmqxTemplate)

	GetServiceTemplate() ServiceTemplate
	SetServiceTemplate(ServiceTemplate)
}

+kubebuilder:object:generate=false

type EmqxStatus

type EmqxStatus interface {
	GetReplicas() int32
	SetReplicas(replicas int32)
	GetReadyReplicas() int32
	SetReadyReplicas(readyReplicas int32)
	GetEmqxNodes() []EmqxNode
	SetEmqxNodes(nodes []EmqxNode)
	GetCurrentStatefulSetVersion() string
	SetCurrentStatefulSetVersion(version string)
	GetConditions() []Condition
	GetCondition(t ConditionType) (int, *Condition)
	IsConditionTrue(t ConditionType) bool
	AddCondition(condType ConditionType, status corev1.ConditionStatus, reason, message string)
}

+kubebuilder:object:generate=false

type EmqxTemplate

type EmqxTemplate struct {
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              EmqxTemplateSpec `json:"spec,omitempty"`
}

func (*EmqxTemplate) DeepCopy

func (in *EmqxTemplate) DeepCopy() *EmqxTemplate

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

func (*EmqxTemplate) DeepCopyInto

func (in *EmqxTemplate) DeepCopyInto(out *EmqxTemplate)

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

type EmqxTemplateSpec

type EmqxTemplateSpec struct {
	// Service Account Name
	// This associates the ReplicaSet or StatefulSet with the specified Service Account for authentication purposes.
	// More info: https://kubernetes.io/docs/concepts/security/service-accounts
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// +kubebuilder:default:="emqx/emqx-operator-reloader:0.0.2"
	ReloaderImage       string                        `json:"reloaderImage,omitempty"`
	ImagePullSecrets    []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	EmqxContainer       EmqxContainer                 `json:"emqxContainer,omitempty"`
	ExtraContainers     []corev1.Container            `json:"extraContainers,omitempty"`
	InitContainers      []corev1.Container            `json:"initContainers,omitempty"`
	EphemeralContainers []corev1.EphemeralContainer   `json:"ephemeralContainers,omitempty"`
	Volumes             []corev1.Volume               `json:"volumes,omitempty"`
	//+kubebuilder:default={runAsUser:1000,runAsGroup:1000,fsGroup:1000,fsGroupChangePolicy:Always,supplementalGroups: {1000}}
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
	NodeSelector       map[string]string          `json:"nodeSelector,omitempty"`
	NodeName           string                     `json:"nodeName,omitempty"`
	Affinity           *corev1.Affinity           `json:"affinity,omitempty"`
	Tolerations        []corev1.Toleration        `json:"tolerations,omitempty"`
}

func (*EmqxTemplateSpec) DeepCopy

func (in *EmqxTemplateSpec) DeepCopy() *EmqxTemplateSpec

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

func (*EmqxTemplateSpec) DeepCopyInto

func (in *EmqxTemplateSpec) DeepCopyInto(out *EmqxTemplateSpec)

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

type EvacuationStrategy

type EvacuationStrategy struct {
	//+kubebuilder:validation:Minimum=0
	WaitTakeover int32 `json:"waitTakeover,omitempty"`
	//+kubebuilder:validation:Minimum=1
	ConnEvictRate int32 `json:"connEvictRate,omitempty"`
	//+kubebuilder:validation:Minimum=1
	SessEvictRate int32 `json:"sessEvictRate,omitempty"`
}

func (*EvacuationStrategy) DeepCopy

func (in *EvacuationStrategy) DeepCopy() *EvacuationStrategy

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

func (*EvacuationStrategy) DeepCopyInto

func (in *EvacuationStrategy) DeepCopyInto(out *EvacuationStrategy)

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

type Names

type Names struct {
	metav1.Object
}

+kubebuilder:object:generate=false

func (Names) ACL

func (n Names) ACL() string

func (Names) BootstrapUser

func (n Names) BootstrapUser() string

func (Names) Data

func (n Names) Data() string

func (Names) HeadlessSvc

func (n Names) HeadlessSvc() string

func (Names) License

func (n Names) License() string

func (Names) PluginsConfig

func (n Names) PluginsConfig() string

type Phase

type Phase string

Phase of the RF status

type Rebalance

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

	Spec   RebalanceSpec   `json:"spec,omitempty"`
	Status RebalanceStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:deprecatedversion +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" Rebalance is the Schema for the rebalances API

func (*Rebalance) ConvertFrom

func (dst *Rebalance) ConvertFrom(srcRaw conversion.Hub) error

ConvertFrom converts from the Hub version (v1) to this version.

func (*Rebalance) ConvertTo

func (src *Rebalance) ConvertTo(dstRaw conversion.Hub) error

ConvertTo converts this version to the Hub version (v1).

func (*Rebalance) DeepCopy

func (in *Rebalance) DeepCopy() *Rebalance

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

func (*Rebalance) DeepCopyInto

func (in *Rebalance) DeepCopyInto(out *Rebalance)

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

func (*Rebalance) DeepCopyObject

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

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

type RebalanceCondition

type RebalanceCondition struct {
	// Status of rebalance condition type. one of Processing, Complete, Failed.
	Type RebalanceConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

RebalanceCondition describes current state of a EMQX rebalancing job.

func (*RebalanceCondition) DeepCopy

func (in *RebalanceCondition) DeepCopy() *RebalanceCondition

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

func (*RebalanceCondition) DeepCopyInto

func (in *RebalanceCondition) DeepCopyInto(out *RebalanceCondition)

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

type RebalanceConditionType

type RebalanceConditionType string
const (
	RebalanceConditionProcessing RebalanceConditionType = "Processing"
	RebalanceConditionCompleted  RebalanceConditionType = "Completed"
	RebalanceConditionFailed     RebalanceConditionType = "Failed"
)

These are built-in conditions of a EMQX rebalancing job.

type RebalanceList

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

RebalanceList contains a list of Rebalance

func (*RebalanceList) DeepCopy

func (in *RebalanceList) DeepCopy() *RebalanceList

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

func (*RebalanceList) DeepCopyInto

func (in *RebalanceList) DeepCopyInto(out *RebalanceList)

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

func (*RebalanceList) DeepCopyObject

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

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

type RebalancePhase

type RebalancePhase string
const (
	RebalancePhaseProcessing RebalancePhase = "Processing"
	RebalancePhaseCompleted  RebalancePhase = "Completed"
	RebalancePhaseFailed     RebalancePhase = "Failed"
)

type RebalanceSpec

type RebalanceSpec struct {
	// InstanceName represents the name of EmqxEnterprise CR
	// +kubebuilder:validation:Required
	InstanceName string `json:"instanceName"`
	// RebalanceStrategy represents the strategy of EMQX rebalancing
	// More info: https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing
	// +kubebuilder:validation:Required
	RebalanceStrategy RebalanceStrategy `json:"rebalanceStrategy"`
}

RebalanceSpec represents the desired spec of Rebalance

func (*RebalanceSpec) DeepCopy

func (in *RebalanceSpec) DeepCopy() *RebalanceSpec

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

func (*RebalanceSpec) DeepCopyInto

func (in *RebalanceSpec) DeepCopyInto(out *RebalanceSpec)

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

type RebalanceState

type RebalanceState struct {
	// State represents the state of emqx cluster rebalancing.
	State string `json:"state,omitempty"`
	// SessionEvictionRate represents the node session evacuation rate per second.
	SessionEvictionRate int32 `json:"session_eviction_rate,omitempty"`
	// Recipients represent the target node for rebalancing.
	Recipients []string `json:"recipients,omitempty"`
	// Node represents the rebalancing scheduling node.
	Node string `json:"node,omitempty"`
	// Donors represent the source nodes for rebalancing.
	Donors []string `json:"donors,omitempty"`
	// CoordinatorNode represents the node currently undergoing rebalancing.
	CoordinatorNode string `json:"coordinator_node,omitempty"`
	// ConnectionEvictionRate represents the node session evacuation rate per second.
	ConnectionEvictionRate int32 `json:"connection_eviction_rate,omitempty"`
}

Rebalance defines the observed Rebalancing state of EMQX

func (*RebalanceState) DeepCopy

func (in *RebalanceState) DeepCopy() *RebalanceState

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

func (*RebalanceState) DeepCopyInto

func (in *RebalanceState) DeepCopyInto(out *RebalanceState)

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

type RebalanceStatus

type RebalanceStatus struct {
	// The latest available observations of an object's current state.
	// When Rebalance fails, the condition will have type "Failed" and status false.
	// When Rebalance is in processing, the condition will have a type "Processing" and status true.
	// When Rebalance is completed, the condition will have a type "Complete" and status true.
	Conditions []RebalanceCondition `json:"conditions,omitempty"`
	// Phase represents the phase of Rebalance.
	Phase           RebalancePhase   `json:"phase,omitempty"`
	RebalanceStates []RebalanceState `json:"rebalanceStates,omitempty"`
	// StartedTime Represents the time when rebalance job start.
	StartedTime metav1.Time `json:"startedTime,omitempty"`
	// CompletedTime Represents the time when the rebalance job was completed.
	CompletedTime metav1.Time `json:"completedTime,omitempty"`
}

RebalanceStatus represents the current state of Rebalance

func (*RebalanceStatus) DeepCopy

func (in *RebalanceStatus) DeepCopy() *RebalanceStatus

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

func (*RebalanceStatus) DeepCopyInto

func (in *RebalanceStatus) DeepCopyInto(out *RebalanceStatus)

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

func (*RebalanceStatus) SetCompleted

func (s *RebalanceStatus) SetCompleted(condition RebalanceCondition) error

func (*RebalanceStatus) SetCondition

func (s *RebalanceStatus) SetCondition(condition RebalanceCondition)

func (*RebalanceStatus) SetFailed

func (s *RebalanceStatus) SetFailed(condition RebalanceCondition) error

func (*RebalanceStatus) SetProcessing

func (s *RebalanceStatus) SetProcessing(condition RebalanceCondition) error

type RebalanceStrategy

type RebalanceStrategy struct {
	// ConnEvictRate represents the source node client disconnect rate per second.
	// same to conn-evict-rate in [EMQX Rebalancing](https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing)
	// The value must be greater than 0
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum=1
	ConnEvictRate int32 `json:"connEvictRate"`
	// SessEvictRate represents the source node session evacuation rate per second.
	// same to sess-evict-rate in [EMQX Rebalancing](https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing)
	// The value must be greater than 0
	// Defaults to 500.
	// +kubebuilder:default:=500
	SessEvictRate int32 `json:"sessEvictRate,omitempty"`
	// WaitTakeover represents the time in seconds to wait for a client to
	// reconnect to take over the session after all connections are disconnected.
	// same to wait-takeover in [EMQX Rebalancing](https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing)
	// The value must be greater than 0
	// Defaults to 60 seconds.
	// +kubebuilder:default:=60
	WaitTakeover int32 `json:"waitTakeover,omitempty"`
	// WaitHealthCheck represents the time (in seconds) to wait for the LB to
	// remove the source node from the list of active backend nodes. After the
	// specified waiting time is exceeded,the rebalancing task will start.
	// same to wait-health-check in [EMQX Rebalancing](https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing)
	// The value must be greater than 0
	// Defaults to 60 seconds.
	// +kubebuilder:default:=60
	WaitHealthCheck int32 `json:"waitHealthCheck,omitempty"`
	// AbsConnThreshold represents the absolute threshold for checking connection balance.
	// same to abs-conn-threshold in [EMQX Rebalancing](https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing)
	// The value must be greater than 0
	// Defaults to 1000.
	// +kubebuilder:default:=1000
	AbsConnThreshold int32 `json:"absConnThreshold,omitempty"`
	// RelConnThreshold represents the relative threshold for checkin connection balance.
	// same to rel-conn-threshold in [EMQX Rebalancing](https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing)
	// the usage of float highly discouraged, as support for them varies across languages.
	// So we define the RelConnThreshold field as string type and you not float type
	// The value must be greater than "1.0"
	// Defaults to "1.1".
	// +kubebuilder:default:="1.1"
	RelConnThreshold string `json:"relConnThreshold,omitempty"`
	// AbsSessThreshold represents the absolute threshold for checking session connection balance.
	// same to abs-sess-threshold in [EMQX Rebalancing](https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing)
	// The value must be greater than 0
	// Default to 1000.
	// +kubebuilder:default:=1000
	AbsSessThreshold int32 `json:"absSessThreshold,omitempty"`
	// RelSessThreshold represents the relative threshold for checking session connection balance.
	// same to rel-sess-threshold in [EMQX Rebalancing](https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing)
	// the usage of float highly discouraged, as support for them varies across languages.
	// So we define the RelSessThreshold field as string type and you not float type
	// The value must be greater than "1.0"
	// Defaults to "1.1".
	// +kubebuilder:default:="1.1"
	RelSessThreshold string `json:"relSessThreshold,omitempty"`
}

RebalanceStrategy represents the strategy of EMQX rebalancing

func (*RebalanceStrategy) DeepCopy

func (in *RebalanceStrategy) DeepCopy() *RebalanceStrategy

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

func (*RebalanceStrategy) DeepCopyInto

func (in *RebalanceStrategy) DeepCopyInto(out *RebalanceStrategy)

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

type ServiceTemplate

type ServiceTemplate struct {
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              corev1.ServiceSpec `json:"spec,omitempty"`
}

func (*ServiceTemplate) DeepCopy

func (in *ServiceTemplate) DeepCopy() *ServiceTemplate

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

func (*ServiceTemplate) DeepCopyInto

func (in *ServiceTemplate) DeepCopyInto(out *ServiceTemplate)

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