v1alpha1

package
v0.0.0-...-1b11d85 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: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the zookeeper v1alpha1 API group +kubebuilder:object:generate=true +groupName=zookeeper.zncdata.dev

Index

Constants

View Source
const (
	CpuMin      = "1"
	CpuMax      = "1.5"
	MemoryLimit = "1.5Gi"
)
View Source
const (
	ZooCfgFileName  = "zoo.cfg"
	LogbackFileName = "logback.xml"
	JavaEnvFileName = "java.env"
)
View Source
const (
	ClientPortName   = "client"
	FollowerPortName = "follower"
	ElectionPortName = "election"

	ClientPort   = 2181
	FollowerPort = 2888
	ElectionPort = 3888

	ServiceClientPort   = 2181
	ServiceFollowerPort = 2888
	ServiceElectionPort = 3888
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "zookeeper.zncdata.dev", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type CPUResource

type CPUResource struct {
	// +kubebuilder:validation:Optional
	Max *resource.Quantity `json:"max,omitempty"`

	// +kubebuilder:validation:Optional
	Min *resource.Quantity `json:"min,omitempty"`
}

func (*CPUResource) DeepCopy

func (in *CPUResource) DeepCopy() *CPUResource

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

func (*CPUResource) DeepCopyInto

func (in *CPUResource) DeepCopyInto(out *CPUResource)

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

type ClusterConfigSpec

type ClusterConfigSpec struct {
	// +kubebuilder:validation:Optional
	Service *ServiceSpec `json:"service,omitempty"`

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

	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=1
	MinServerId int32 `json:"minServerId,omitempty"`
}

func (*ClusterConfigSpec) DeepCopy

func (in *ClusterConfigSpec) DeepCopy() *ClusterConfigSpec

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

func (*ClusterConfigSpec) DeepCopyInto

func (in *ClusterConfigSpec) DeepCopyInto(out *ClusterConfigSpec)

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

type ClusterRefSpec

type ClusterRefSpec struct {
	// +kubebuilder:validation:Required
	Name string `json:"name"`
	// +kubebuilder:validation:Optional
	Namespace string `json:"namespace"`
}

func (*ClusterRefSpec) DeepCopy

func (in *ClusterRefSpec) DeepCopy() *ClusterRefSpec

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

func (*ClusterRefSpec) DeepCopyInto

func (in *ClusterRefSpec) DeepCopyInto(out *ClusterRefSpec)

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

type ConfigOverridesSpec

type ConfigOverridesSpec struct {
	ZooCfg map[string]string `json:"zoo.cfg,omitempty"`
}

func (*ConfigOverridesSpec) DeepCopy

func (in *ConfigOverridesSpec) DeepCopy() *ConfigOverridesSpec

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

func (*ConfigOverridesSpec) DeepCopyInto

func (in *ConfigOverridesSpec) DeepCopyInto(out *ConfigOverridesSpec)

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

type ConfigSpec

type ConfigSpec struct {
	// +kubebuilder:validation:Optional
	Resources *ResourcesSpec `json:"resources,omitempty"`

	// +kubebuilder:validation:Optional
	SecurityContext *corev1.PodSecurityContext `json:"securityContext"`

	// +kubebuilder:validation:Optional
	Affinity *corev1.Affinity `json:"affinity"`

	// +kubebuilder:validation:Optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// +kubebuilder:validation:Optional
	Tolerations []corev1.Toleration `json:"tolerations"`

	// +kubebuilder:validation:Optional
	PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`

	// +kubebuilder:validation:Optional
	StorageClass string `json:"storageClass,omitempty"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:default="8Gi"
	StorageSize string `json:"storageSize,omitempty"`

	// +kubebuilder:validation:Optional
	ExtraEnv map[string]string `json:"extraEnv,omitempty"`

	// +kubebuilder:validation:Optional
	ExtraSecret map[string]string `json:"extraSecret,omitempty"`

	// +kubebuilder:validation:Optional
	Logging *ContainerLoggingSpec `json:"logging,omitempty"`
}

func (*ConfigSpec) DeepCopy

func (in *ConfigSpec) DeepCopy() *ConfigSpec

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

func (*ConfigSpec) DeepCopyInto

func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec)

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

type ContainerLoggingSpec

type ContainerLoggingSpec struct {
	// +kubebuilder:validation:Optional
	Zookeeper *LoggingConfigSpec `json:"zookeeperCluster,omitempty"`
}

func (*ContainerLoggingSpec) DeepCopy

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

func (*ContainerLoggingSpec) DeepCopyInto

func (in *ContainerLoggingSpec) DeepCopyInto(out *ContainerLoggingSpec)

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

type ImageSpec

type ImageSpec struct {
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=bitnami/zookeeper
	Repository string `json:"repository,omitempty"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:="423"
	Tag string `json:"tag,omitempty"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=IfNotPresent
	PullPolicy corev1.PullPolicy `json:"pullPolicy,omitempty"`
}

func (*ImageSpec) DeepCopy

func (in *ImageSpec) DeepCopy() *ImageSpec

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

func (*ImageSpec) DeepCopyInto

func (in *ImageSpec) DeepCopyInto(out *ImageSpec)

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

type LogLevelSpec

type LogLevelSpec struct {
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:="INFO"
	// +kubebuilder:validation:Enum=FATAL;ERROR;WARN;INFO;DEBUG;TRACE
	Level string `json:"level,omitempty"`
}

LogLevelSpec level mapping example |---------------------|-----------------| | superset log level | zds log level | |---------------------|-----------------| | CRITICAL | FATAL | | ERROR | ERROR | | WARNING | WARN | | INFO | INFO | | DEBUG | DEBUG | | DEBUG | TRACE | |---------------------|-----------------|

func (*LogLevelSpec) DeepCopy

func (in *LogLevelSpec) DeepCopy() *LogLevelSpec

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

func (*LogLevelSpec) DeepCopyInto

func (in *LogLevelSpec) DeepCopyInto(out *LogLevelSpec)

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

type LoggingConfigSpec

type LoggingConfigSpec struct {
	// +kubebuilder:validation:Optional
	Loggers map[string]*LogLevelSpec `json:"loggers,omitempty"`

	// +kubebuilder:validation:Optional
	Console *LogLevelSpec `json:"console,omitempty"`

	// +kubebuilder:validation:Optional
	File *LogLevelSpec `json:"file,omitempty"`
}

func (*LoggingConfigSpec) DeepCopy

func (in *LoggingConfigSpec) DeepCopy() *LoggingConfigSpec

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

func (*LoggingConfigSpec) DeepCopyInto

func (in *LoggingConfigSpec) DeepCopyInto(out *LoggingConfigSpec)

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

type MemoryResource

type MemoryResource struct {
	// +kubebuilder:validation:Optional
	Limit *resource.Quantity `json:"limit,omitempty"`
}

func (*MemoryResource) DeepCopy

func (in *MemoryResource) DeepCopy() *MemoryResource

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

func (*MemoryResource) DeepCopyInto

func (in *MemoryResource) DeepCopyInto(out *MemoryResource)

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

type PodDisruptionBudgetSpec

type PodDisruptionBudgetSpec struct {
	// +kubebuilder:validation:Optional
	MinAvailable int32 `json:"minAvailable,omitempty"`

	// +kubebuilder:validation:Optional
	MaxUnavailable int32 `json:"maxUnavailable,omitempty"`
}

func (*PodDisruptionBudgetSpec) DeepCopy

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

func (*PodDisruptionBudgetSpec) DeepCopyInto

func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec)

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

type ResourcesSpec

type ResourcesSpec struct {
	// +kubebuilder:validation:Optional
	CPU *CPUResource `json:"cpu,omitempty"`

	// +kubebuilder:validation:Optional
	Memory *MemoryResource `json:"memory,omitempty"`

	// +kubebuilder:validation:Optional
	Storage *StorageResource `json:"storage,omitempty"`
}

func (*ResourcesSpec) DeepCopy

func (in *ResourcesSpec) DeepCopy() *ResourcesSpec

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

func (*ResourcesSpec) DeepCopyInto

func (in *ResourcesSpec) DeepCopyInto(out *ResourcesSpec)

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

type RoleGroupSpec

type RoleGroupSpec struct {
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=1
	Replicas int32 `json:"replicas,omitempty"`

	// +kubebuilder:validation:Required
	Config *ConfigSpec `json:"config,omitempty"`

	// +kubebuilder:validation:Optional
	CommandArgsOverrides []string `json:"commandArgsOverrides,omitempty"`

	// +kubebuilder:validation:Optional
	ConfigOverrides *ConfigOverridesSpec `json:"configOverrides,omitempty"`

	// +kubebuilder:validation:Optional
	EnvOverrides map[string]string `json:"envOverrides,omitempty"`
}

func (*RoleGroupSpec) DeepCopy

func (in *RoleGroupSpec) DeepCopy() *RoleGroupSpec

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

func (*RoleGroupSpec) DeepCopyInto

func (in *RoleGroupSpec) DeepCopyInto(out *RoleGroupSpec)

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

type ServerSpec

type ServerSpec struct {
	// +kubebuilder:validation:Optional
	Config *ConfigSpec `json:"config,omitempty"`

	// +kubebuilder:validation:Optional
	RoleGroups map[string]*RoleGroupSpec `json:"roleGroups,omitempty"`

	// +kubebuilder:validation:Optional
	PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`

	// +kubebuilder:validation:Optional
	CommandArgsOverrides []string `json:"commandArgsOverrides,omitempty"`

	// +kubebuilder:validation:Optional
	ConfigOverrides *ConfigOverridesSpec `json:"configOverrides,omitempty"`

	// +kubebuilder:validation:Optional
	EnvOverrides map[string]string `json:"envOverrides,omitempty"`
}

func (*ServerSpec) DeepCopy

func (in *ServerSpec) DeepCopy() *ServerSpec

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

func (*ServerSpec) DeepCopyInto

func (in *ServerSpec) DeepCopyInto(out *ServerSpec)

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

type ServiceSpec

type ServiceSpec struct {
	// +kubebuilder:validation:Optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:enum=ClusterIP;NodePort;LoadBalancer;ExternalName
	// +kubebuilder:default=ClusterIP
	Type corev1.ServiceType `json:"type,omitempty"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	// +kubebuilder:default=2181
	Port int32 `json:"port,omitempty"`
}

func (*ServiceSpec) DeepCopy

func (in *ServiceSpec) DeepCopy() *ServiceSpec

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

func (*ServiceSpec) DeepCopyInto

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

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

type StorageResource

type StorageResource struct {
	// +kubebuilder:validation:Optional
	// +kubebuilder:default="10Gi"
	Capacity resource.Quantity `json:"capacity,omitempty"`

	// +kubebuilder:validation:Optional
	StorageClass string `json:"storageClass,omitempty"`
}

func (*StorageResource) DeepCopy

func (in *StorageResource) DeepCopy() *StorageResource

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

func (*StorageResource) DeepCopyInto

func (in *StorageResource) DeepCopyInto(out *StorageResource)

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

type StorageResourceSpec

type StorageResourceSpec struct {
	Data *StorageResource `json:"data"`
}

func (*StorageResourceSpec) DeepCopy

func (in *StorageResourceSpec) DeepCopy() *StorageResourceSpec

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

func (*StorageResourceSpec) DeepCopyInto

func (in *StorageResourceSpec) DeepCopyInto(out *StorageResourceSpec)

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.

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

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 {
	// +kubebuilder:validation:Required
	Image *ImageSpec `json:"image"`
	// +kubebuilder:validation:Required
	ClusterConfig *ClusterConfigSpec `json:"clusterConfig"`
	// +kubebuilder:validation:Required
	Server *ServerSpec `json:"server"`
}

ZookeeperClusterSpec defines the desired state of ZookeeperCluster

func (*ZookeeperClusterSpec) DeepCopy

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 {
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// +kubebuilder:validation:Optional
	ClientConnections map[string]string `json:"clientConnections"`
}

func (*ZookeeperClusterStatus) DeepCopy

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.

type ZookeeperZnode

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

	Spec   ZookeeperZnodeSpec     `json:"spec,omitempty"`
	Status ZookeeperClusterStatus `json:"status,omitempty"`
}

ZookeeperZnode is the Schema for the zookeeperznodes API

func (*ZookeeperZnode) DeepCopy

func (in *ZookeeperZnode) DeepCopy() *ZookeeperZnode

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

func (*ZookeeperZnode) DeepCopyInto

func (in *ZookeeperZnode) DeepCopyInto(out *ZookeeperZnode)

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

func (*ZookeeperZnode) DeepCopyObject

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

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

type ZookeeperZnodeList

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

func (*ZookeeperZnodeList) DeepCopy

func (in *ZookeeperZnodeList) DeepCopy() *ZookeeperZnodeList

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

func (*ZookeeperZnodeList) DeepCopyInto

func (in *ZookeeperZnodeList) DeepCopyInto(out *ZookeeperZnodeList)

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

func (*ZookeeperZnodeList) DeepCopyObject

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

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

type ZookeeperZnodeSpec

type ZookeeperZnodeSpec struct {
	// +kubebuilder:validation:Required
	ClusterRef *ClusterRefSpec `json:"clusterRef"`
}

func (*ZookeeperZnodeSpec) DeepCopy

func (in *ZookeeperZnodeSpec) DeepCopy() *ZookeeperZnodeSpec

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

func (*ZookeeperZnodeSpec) DeepCopyInto

func (in *ZookeeperZnodeSpec) DeepCopyInto(out *ZookeeperZnodeSpec)

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