Documentation ¶
Overview ¶
Package v1 +k8s:deepcopy-gen=package +groupName=zookeeper.nineinfra.tech
Package v1 contains API Schema definitions for the zookeeper v1 API group +kubebuilder:object:generate=true +groupName=zookeeper.nineinfra.tech
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type ClusterCondition
- type ClusterConditionType
- type ImageConfig
- type MembersStatus
- type ResourceConfig
- type ZookeeperCluster
- func (in *ZookeeperCluster) DeepCopy() *ZookeeperCluster
- func (in *ZookeeperCluster) DeepCopyInto(out *ZookeeperCluster)
- func (in *ZookeeperCluster) DeepCopyObject() runtime.Object
- func (r *ZookeeperCluster) Default()
- func (r *ZookeeperCluster) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *ZookeeperCluster) ValidateCreate() (admission.Warnings, error)
- func (r *ZookeeperCluster) ValidateDelete() (admission.Warnings, error)
- func (r *ZookeeperCluster) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type ZookeeperClusterList
- type ZookeeperClusterSpec
- type ZookeeperClusterStatus
- func (in *ZookeeperClusterStatus) DeepCopy() *ZookeeperClusterStatus
- func (in *ZookeeperClusterStatus) DeepCopyInto(out *ZookeeperClusterStatus)
- func (zs *ZookeeperClusterStatus) GetClusterCondition(t ClusterConditionType) (int, *ClusterCondition)
- func (zs *ZookeeperClusterStatus) GetLastCondition() (lastCondition *ClusterCondition)
- func (zs *ZookeeperClusterStatus) Init()
- func (zs *ZookeeperClusterStatus) IsClusterInReadyState() bool
- func (zs *ZookeeperClusterStatus) IsClusterInUpgradeFailedState() bool
- func (zs *ZookeeperClusterStatus) IsClusterInUpgradingState() bool
- func (zs *ZookeeperClusterStatus) SetErrorConditionFalse()
- func (zs *ZookeeperClusterStatus) SetErrorConditionTrue(reason, message string)
- func (zs *ZookeeperClusterStatus) SetPodsReadyConditionFalse()
- func (zs *ZookeeperClusterStatus) SetPodsReadyConditionTrue()
- func (zs *ZookeeperClusterStatus) SetUpgradingConditionFalse()
- func (zs *ZookeeperClusterStatus) SetUpgradingConditionTrue(reason, message string)
- func (zs *ZookeeperClusterStatus) UpdateProgress(reason, updatedReplicas string)
Constants ¶
const ( ClusterConditionPodsReady ClusterConditionType = "PodsReady" ClusterConditionUpgrading = "Upgrading" ClusterConditionError = "Error" // UpdatingZookeeperReason Reasons for cluster upgrading condition UpdatingZookeeperReason = "Updating Zookeeper" UpgradeErrorReason = "Upgrade Error" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "zookeeper.nineinfra.tech", Version: "v1"} // 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 )
var SchemeGroupVersion = GroupVersion
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type ClusterCondition ¶
type ClusterCondition struct { // Type of Zookeeper cluster condition. Type ClusterConditionType `json:"type,omitempty"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status,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"` // The last time this condition was updated. LastUpdateTime string `json:"lastUpdateTime,omitempty"` // Last time the condition transitioned from one status to another. LastTransitionTime string `json:"lastTransitionTime,omitempty"` }
ClusterCondition shows the current condition of a Zookeeper cluster. Comply with k8s API conventions
func (*ClusterCondition) DeepCopy ¶
func (in *ClusterCondition) DeepCopy() *ClusterCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCondition.
func (*ClusterCondition) DeepCopyInto ¶
func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterConditionType ¶
type ClusterConditionType string
type ImageConfig ¶
type ImageConfig struct { Repository string `json:"repository"` // Image tag. Usually the vesion of the kyuubi, default: `latest`. // +optional Tag string `json:"tag,omitempty"` // Image pull policy. One of `Always, Never, IfNotPresent`, default: `Always`. // +kubebuilder:default:=Always // +kubebuilder:validation:Enum=Always;Never;IfNotPresent // +optional PullPolicy string `json:"pullPolicy,omitempty"` // Secrets for image pull. // +optional PullSecrets string `json:"pullSecret,omitempty"` }
func (*ImageConfig) DeepCopy ¶
func (in *ImageConfig) DeepCopy() *ImageConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageConfig.
func (*ImageConfig) DeepCopyInto ¶
func (in *ImageConfig) DeepCopyInto(out *ImageConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MembersStatus ¶
type MembersStatus struct { //+nullable Ready []string `json:"ready,omitempty"` //+nullable Unready []string `json:"unready,omitempty"` }
MembersStatus is the status of the members of the cluster with both ready and unready node membership lists
func (*MembersStatus) DeepCopy ¶
func (in *MembersStatus) DeepCopy() *MembersStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MembersStatus.
func (*MembersStatus) DeepCopyInto ¶
func (in *MembersStatus) DeepCopyInto(out *MembersStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceConfig ¶
type ResourceConfig struct { // The replicas of the cluster workload.Default value is 1 // +optional Replicas int32 `json:"replicas"` // the storage class. default value is nineinfra-default // +optional StorageClass string `json:"storageClass"` // The resource requirements of the cluster workload. // +optional ResourceRequirements corev1.ResourceRequirements `json:"resourceRequirements"` }
func (*ResourceConfig) DeepCopy ¶
func (in *ResourceConfig) DeepCopy() *ResourceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceConfig.
func (*ResourceConfig) DeepCopyInto ¶
func (in *ResourceConfig) DeepCopyInto(out *ResourceConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ZookeeperCluster ¶
type ZookeeperCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ZookeeperClusterSpec `json:"spec,omitempty"` Status ZookeeperClusterStatus `json:"status,omitempty"` }
ZookeeperCluster is the Schema for the zookeeperclusters API
func (*ZookeeperCluster) DeepCopy ¶
func (in *ZookeeperCluster) DeepCopy() *ZookeeperCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperCluster.
func (*ZookeeperCluster) DeepCopyInto ¶
func (in *ZookeeperCluster) DeepCopyInto(out *ZookeeperCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ZookeeperCluster) DeepCopyObject ¶
func (in *ZookeeperCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ZookeeperCluster) Default ¶
func (r *ZookeeperCluster) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*ZookeeperCluster) SetupWebhookWithManager ¶
func (r *ZookeeperCluster) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*ZookeeperCluster) ValidateCreate ¶
func (r *ZookeeperCluster) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*ZookeeperCluster) ValidateDelete ¶
func (r *ZookeeperCluster) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*ZookeeperCluster) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type ZookeeperClusterList ¶
type ZookeeperClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ZookeeperCluster `json:"items"` }
ZookeeperClusterList contains a list of ZookeeperCluster
func (*ZookeeperClusterList) DeepCopy ¶
func (in *ZookeeperClusterList) DeepCopy() *ZookeeperClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperClusterList.
func (*ZookeeperClusterList) DeepCopyInto ¶
func (in *ZookeeperClusterList) DeepCopyInto(out *ZookeeperClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ZookeeperClusterList) DeepCopyObject ¶
func (in *ZookeeperClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ZookeeperClusterSpec ¶
type ZookeeperClusterSpec struct { // Version. version of the zookeeper cluster. Version string `json:"version"` // Image. image config of the zookeeper cluster. Image ImageConfig `json:"image"` // Resource. resouce config of the zookeeper cluster. // +optional Resource ResourceConfig `json:"resource,omitempty"` // Conf. k/v configs for the zoo.cfg. // +optional Conf map[string]string `json:"conf,omitempty"` // K8sConf. k/v configs for the zookeeper cluster in k8s.such as the cluster domain // +optional K8sConf map[string]string `json:"k8sConf,omitempty"` }
ZookeeperClusterSpec defines the desired state of ZookeeperCluster
func (*ZookeeperClusterSpec) DeepCopy ¶
func (in *ZookeeperClusterSpec) DeepCopy() *ZookeeperClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperClusterSpec.
func (*ZookeeperClusterSpec) DeepCopyInto ¶
func (in *ZookeeperClusterSpec) DeepCopyInto(out *ZookeeperClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ZookeeperClusterStatus ¶
type ZookeeperClusterStatus struct { // Members is the zookeeper members in the cluster Members MembersStatus `json:"members,omitempty"` // Replicas is the number of desired replicas in the cluster Replicas int32 `json:"replicas,omitempty"` // ReadyReplicas is the number of ready replicas in the cluster ReadyReplicas int32 `json:"readyReplicas,omitempty"` // InternalClientEndpoint is the internal client IP and port InternalClientEndpoint string `json:"internalClientEndpoint,omitempty"` // ExternalClientEndpoint is the internal client IP and port ExternalClientEndpoint string `json:"externalClientEndpoint,omitempty"` // CurrentVersion is the current cluster version CurrentVersion string `json:"currentVersion,omitempty"` TargetVersion string `json:"targetVersion,omitempty"` // Conditions list all the applied conditions Conditions []ClusterCondition `json:"conditions,omitempty"` }
ZookeeperClusterStatus defines the observed state of ZookeeperCluster
func (*ZookeeperClusterStatus) DeepCopy ¶
func (in *ZookeeperClusterStatus) DeepCopy() *ZookeeperClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperClusterStatus.
func (*ZookeeperClusterStatus) DeepCopyInto ¶
func (in *ZookeeperClusterStatus) DeepCopyInto(out *ZookeeperClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ZookeeperClusterStatus) GetClusterCondition ¶
func (zs *ZookeeperClusterStatus) GetClusterCondition(t ClusterConditionType) (int, *ClusterCondition)
func (*ZookeeperClusterStatus) GetLastCondition ¶
func (zs *ZookeeperClusterStatus) GetLastCondition() (lastCondition *ClusterCondition)
func (*ZookeeperClusterStatus) Init ¶
func (zs *ZookeeperClusterStatus) Init()
func (*ZookeeperClusterStatus) IsClusterInReadyState ¶
func (zs *ZookeeperClusterStatus) IsClusterInReadyState() bool
func (*ZookeeperClusterStatus) IsClusterInUpgradeFailedState ¶
func (zs *ZookeeperClusterStatus) IsClusterInUpgradeFailedState() bool
func (*ZookeeperClusterStatus) IsClusterInUpgradingState ¶
func (zs *ZookeeperClusterStatus) IsClusterInUpgradingState() bool
func (*ZookeeperClusterStatus) SetErrorConditionFalse ¶
func (zs *ZookeeperClusterStatus) SetErrorConditionFalse()
func (*ZookeeperClusterStatus) SetErrorConditionTrue ¶
func (zs *ZookeeperClusterStatus) SetErrorConditionTrue(reason, message string)
func (*ZookeeperClusterStatus) SetPodsReadyConditionFalse ¶
func (zs *ZookeeperClusterStatus) SetPodsReadyConditionFalse()
func (*ZookeeperClusterStatus) SetPodsReadyConditionTrue ¶
func (zs *ZookeeperClusterStatus) SetPodsReadyConditionTrue()
func (*ZookeeperClusterStatus) SetUpgradingConditionFalse ¶
func (zs *ZookeeperClusterStatus) SetUpgradingConditionFalse()
func (*ZookeeperClusterStatus) SetUpgradingConditionTrue ¶
func (zs *ZookeeperClusterStatus) SetUpgradingConditionTrue(reason, message string)
func (*ZookeeperClusterStatus) UpdateProgress ¶
func (zs *ZookeeperClusterStatus) UpdateProgress(reason, updatedReplicas string)