v1alpha1

package
v0.0.0-...-91b2ab8 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	DefaultRepository      = "quay.io/zncdatadev"
	DefaultProductVersion  = "3.9.2"
	DefaultProductName     = "zookeeper"
	DefaultKubedoopVersion = "0.0.0-dev"
)
View Source
const (
	ZooCfgFileName   = "zoo.cfg"
	SecurityFileName = "security.properties"
	LogbackFileName  = "logback.xml"
	JavaEnvFileName  = "java.env"
)
View Source
const (
	MaxZKLogFileSize         = "10Mi"
	ConsoleConversionPattern = "%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n"
)
View Source
const (
	ClientPortName     = "client"
	SecurityClientName = "secureClient"
	LeaderPortName     = "leader"
	ElectionPortName   = "election"
	MetricsPortName    = "metrics"

	ClientPort       = 2181
	SecureClientPort = 2282
	LeaderPort       = 2888
	ElectionPort     = 3888
	MetricsPort      = 9505

	AdminPort = 8080
)
View Source
const (
	DataDirName      = "data"
	LogDirName       = "log"
	ConfigDirName    = "config"
	LogConfigDirName = "log-config"
)

volume name

Variables

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

func TransformImage

func TransformImage(imageSpec *ImageSpec) *util.Image

Types

type AuthenticationSpec

type AuthenticationSpec struct {
	//
	// ## mTLS
	//
	// Only affects client connections. This setting controls:
	// - If clients need to authenticate themselves against the server via TLS
	// - Which ca.crt to use when validating the provided client certs
	// This will override the server TLS settings (if set) in `spec.clusterConfig.tls.serverSecretClass`.
	AuthenticationClass []string `json:"authenticationClass,omitempty"`
}

func (*AuthenticationSpec) DeepCopy

func (in *AuthenticationSpec) DeepCopy() *AuthenticationSpec

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

func (*AuthenticationSpec) DeepCopyInto

func (in *AuthenticationSpec) DeepCopyInto(out *AuthenticationSpec)

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
	// +kubebuilder:validation:Enum="cluster-internal";"external-unstable"
	// +kubebuilder:default="cluster-internal"
	ListenerClass constants.ListenerClass `json:"listenerClass"`

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

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

	// +kubebuilder:validation:Optional
	Authentication *AuthenticationSpec `json:"authentication,omitempty"`

	// +kubebuilder:validation:Optional
	Tls *ZookeeperTls `json:"tls,omitempty"`

	// +kubebuilder:validation:Optional
	VectorAggregatorConfigMapName *string `json:"vectorAggregatorConfigMapName,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 ConfigSpec

type ConfigSpec struct {
	*commonsv1alpha1.RoleGroupConfigSpec `json:",inline"`

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

	// +kubebuilder:validation:Optional
	ExtraSecret map[string]string `json:"extraSecret,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 ImageSpec

type ImageSpec struct {
	// +kubebuilder:validation:Optional
	Custom string `json:"custom,omitempty"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:default=quay.io/zncdatadev
	Repo string `json:"repository,omitempty"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:default="0.0.0-dev"
	KubedoopVersion string `json:"kubedoopVersion,omitempty"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:default="3.9.2"
	ProductVersion string `json:"productVersion,omitempty"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=IfNotPresent
	PullPolicy *corev1.PullPolicy `json:"pullPolicy,omitempty"`

	// +kubebuilder:validation:Optional
	PullSecretName string `json:"pullSecretName,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 ListenerClass

type ListenerClass string
const (
	ClusterInternal  ListenerClass = "cluster-internal"
	ExternalUnstable ListenerClass = "external-unstable"
)

type RoleGroupSpec

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

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

	*commonsv1alpha1.OverridesSpec `json:",inline"`
}

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
	RoleConfig *commonsv1alpha1.RoleConfigSpec `json:"roleConfig,omitempty"`

	*commonsv1alpha1.OverridesSpec `json:",inline"`
}

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 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:Optional
	Image *ImageSpec `json:"image"`
	// +kubebuilder:validation:Optional
	ClusterOperationSpec *commonsv1alpha1.ClusterOperationSpec `json:"clusterOperation,omitempty"`
	// +kubebuilder:validation:Optional
	ClusterConfig *ClusterConfigSpec `json:"clusterConfig,omitempty"`
	// +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 ZookeeperTls

type ZookeeperTls struct {

	// +kubebuilder:validation:Required
	// +kubebuilder:default=tls
	QuorumSecretClass string `json:"quorumSecretClass,omitempty"`

	// +kubebuilder:validation:Optional
	ServerSecretClass string `json:"serverSecretClass,omitempty"`

	// todo: use secret resource
	// +kubebuilder:validation:Optional
	// +kubebuilder:default="changeit"
	SSLStorePassword string `json:"sslStorePassword,omitempty"`
}

ZookeeperTls defines the tls setting for zookeeper cluster

func (*ZookeeperTls) DeepCopy

func (in *ZookeeperTls) DeepCopy() *ZookeeperTls

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

func (*ZookeeperTls) DeepCopyInto

func (in *ZookeeperTls) DeepCopyInto(out *ZookeeperTls)

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