v1beta1

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Overview

Package v1beta1 contains API Schema definitions for the zookeeper v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=zookeeper.pravega.io

Package v1beta1 contains API Schema definitions for the zookeeper.pravega.io v1beta1 API group +kubebuilder:object:generate=true +groupName=zookeeper.pravega.io.zookeeper.pravega.io

Index

Constants

View Source
const (
	ClusterConditionPodsReady ClusterConditionType = "PodsReady"
	ClusterConditionUpgrading                      = "Upgrading"
	ClusterConditionError                          = "Error"

	// Reasons for cluster upgrading condition
	UpdatingZookeeperReason = "Updating Zookeeper"
	UpgradeErrorReason      = "Upgrade Error"
)
View Source
const (
	// DefaultZkContainerRepository is the default docker repo for the zookeeper
	// container
	DefaultZkContainerRepository = "pravega/zookeeper"

	// DefaultZkContainerVersion is the default tag used for for the zookeeper
	// container
	DefaultZkContainerVersion = "0.2.14"

	// DefaultZkContainerPolicy is the default container pull policy used
	DefaultZkContainerPolicy = "Always"

	// DefaultTerminationGracePeriod is the default time given before the
	// container is stopped. This gives clients time to disconnect from a
	// specific node gracefully.
	DefaultTerminationGracePeriod = 30

	// DefaultZookeeperCacheVolumeSize is the default volume size for the
	// Zookeeper cache volume
	DefaultZookeeperCacheVolumeSize = "20Gi"

	// DefaultReadinessProbeInitialDelaySeconds is the default initial delay (in seconds)
	// for the readiness probe
	DefaultReadinessProbeInitialDelaySeconds = 10

	// DefaultReadinessProbePeriodSeconds is the default probe period (in seconds)
	// for the readiness probe
	DefaultReadinessProbePeriodSeconds = 10

	// DefaultReadinessProbeFailureThreshold is the default probe failure threshold
	// for the readiness probe
	DefaultReadinessProbeFailureThreshold = 3

	// DefaultReadinessProbeSuccessThreshold is the default probe success threshold
	// for the readiness probe
	DefaultReadinessProbeSuccessThreshold = 1

	// DefaultReadinessProbeTimeoutSeconds is the default probe timeout (in seconds)
	// for the readiness probe
	DefaultReadinessProbeTimeoutSeconds = 10

	// DefaultLivenessProbeInitialDelaySeconds is the default initial delay (in seconds)
	// for the liveness probe
	DefaultLivenessProbeInitialDelaySeconds = 10

	// DefaultLivenessProbePeriodSeconds is the default probe period (in seconds)
	// for the liveness probe
	DefaultLivenessProbePeriodSeconds = 10

	// DefaultLivenessProbeFailureThreshold is the default probe failure threshold
	// for the liveness probe
	DefaultLivenessProbeFailureThreshold = 3

	// DefaultLivenessProbeTimeoutSeconds is the default probe timeout (in seconds)
	// for the liveness probe
	DefaultLivenessProbeTimeoutSeconds = 10
)

Variables

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

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

type AdminServerServicePolicy struct {
	// Annotations specifies the annotations to attach to AdminServer service the operator
	// creates.
	Annotations map[string]string `json:"annotations,omitempty"`

	External bool `json:"external,omitempty"`
}

func (*AdminServerServicePolicy) DeepCopy

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

func (*AdminServerServicePolicy) DeepCopyInto

func (in *AdminServerServicePolicy) DeepCopyInto(out *AdminServerServicePolicy)

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

type ClientServicePolicy

type ClientServicePolicy struct {
	// Annotations specifies the annotations to attach to client service the operator
	// creates.
	Annotations map[string]string `json:"annotations,omitempty"`
}

func (*ClientServicePolicy) DeepCopy

func (in *ClientServicePolicy) DeepCopy() *ClientServicePolicy

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

func (*ClientServicePolicy) DeepCopyInto

func (in *ClientServicePolicy) DeepCopyInto(out *ClientServicePolicy)

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

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 v1.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 ContainerImage

type ContainerImage struct {
	Repository string `json:"repository,omitempty"`
	Tag        string `json:"tag,omitempty"`
	// +kubebuilder:validation:Enum="Always";"Never";"IfNotPresent"
	PullPolicy v1.PullPolicy `json:"pullPolicy,omitempty"`
}

ContainerImage defines the fields needed for a Docker repository image. The format here matches the predominant format used in Helm charts.

func (*ContainerImage) DeepCopy

func (in *ContainerImage) DeepCopy() *ContainerImage

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

func (*ContainerImage) DeepCopyInto

func (in *ContainerImage) DeepCopyInto(out *ContainerImage)

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

func (*ContainerImage) ToString

func (c *ContainerImage) ToString() string

ToString formats a container image struct as a docker compatible repository string.

type Ephemeral

type Ephemeral struct {
	//EmptyDirVolumeSource is optional and this will create the emptydir volume
	//It has two parameters Medium and SizeLimit which are optional as well
	//Medium specifies What type of storage medium should back this directory.
	//SizeLimit specifies Total amount of local storage required for this EmptyDir volume.
	EmptyDirVolumeSource v1.EmptyDirVolumeSource `json:"emptydirvolumesource,omitempty"`
}

func (*Ephemeral) DeepCopy

func (in *Ephemeral) DeepCopy() *Ephemeral

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

func (*Ephemeral) DeepCopyInto

func (in *Ephemeral) DeepCopyInto(out *Ephemeral)

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

type HeadlessServicePolicy

type HeadlessServicePolicy struct {
	// Annotations specifies the annotations to attach to headless service the operator
	// creates.
	Annotations map[string]string `json:"annotations,omitempty"`
}

func (*HeadlessServicePolicy) DeepCopy

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

func (*HeadlessServicePolicy) DeepCopyInto

func (in *HeadlessServicePolicy) DeepCopyInto(out *HeadlessServicePolicy)

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 Persistence

type Persistence struct {
	// VolumeReclaimPolicy is a zookeeper operator configuration. If it's set to Delete,
	// the corresponding PVCs will be deleted by the operator when zookeeper cluster is deleted.
	// The default value is Retain.
	// +kubebuilder:validation:Enum="Delete";"Retain"
	VolumeReclaimPolicy VolumeReclaimPolicy `json:"reclaimPolicy,omitempty"`
	// PersistentVolumeClaimSpec is the spec to describe PVC for the container
	// This field is optional. If no PVC is specified default persistentvolume
	// will get created.
	PersistentVolumeClaimSpec v1.PersistentVolumeClaimSpec `json:"spec,omitempty"`
	// Annotations specifies the annotations to attach to pvc the operator
	// creates.
	Annotations map[string]string `json:"annotations,omitempty"`
}

func (*Persistence) DeepCopy

func (in *Persistence) DeepCopy() *Persistence

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

func (*Persistence) DeepCopyInto

func (in *Persistence) DeepCopyInto(out *Persistence)

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

type PodPolicy

type PodPolicy struct {
	// Labels specifies the labels to attach to pods the operator creates for the
	// zookeeper cluster. Overrides any values specified in Spec.Labels.
	Labels map[string]string `json:"labels,omitempty"`

	// NodeSelector specifies a map of key-value pairs. For the pod to be
	// eligible to run on a node, the node must have each of the indicated
	// key-value pairs as labels.
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// The scheduling constraints on pods.
	Affinity *v1.Affinity `json:"affinity,omitempty"`

	// TopologySpreadConstraints to apply to the pods
	TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`

	// Resources is the resource requirements for the container.
	// This field cannot be updated once the cluster is created.
	Resources v1.ResourceRequirements `json:"resources,omitempty"`

	// Tolerations specifies the pod's tolerations.
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`

	// List of environment variables to set in the container.
	// This field cannot be updated.
	Env []v1.EnvVar `json:"env,omitempty"`

	// Annotations specifies the annotations to attach to pods the operator
	// creates.
	Annotations map[string]string `json:"annotations,omitempty"`

	// SecurityContext specifies the security context for the entire pod
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context
	SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"`

	// +kubebuilder:validation:Minimum=0
	// TerminationGracePeriodSeconds is the amount of time that kubernetes will
	// give for a pod instance to shutdown normally.
	// The default value is 30.
	TerminationGracePeriodSeconds int64 `json:"terminationGracePeriodSeconds,omitempty"`
	// Service Account to be used in pods
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
	ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

PodPolicy defines the common pod configuration for Pods, including when used in deployments, stateful-sets, etc.

func (*PodPolicy) DeepCopy

func (in *PodPolicy) DeepCopy() *PodPolicy

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

func (*PodPolicy) DeepCopyInto

func (in *PodPolicy) DeepCopyInto(out *PodPolicy)

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

type Ports

type Ports struct {
	Client      int32
	Quorum      int32
	Leader      int32
	Metrics     int32
	AdminServer int32
}

Ports groups the ports for a zookeeper cluster node for easy access

func (*Ports) DeepCopy

func (in *Ports) DeepCopy() *Ports

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

func (*Ports) DeepCopyInto

func (in *Ports) DeepCopyInto(out *Ports)

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

type Probe

type Probe struct {
	// +kubebuilder:validation:Minimum=0
	// +optional
	InitialDelaySeconds int32 `json:"initialDelaySeconds"`
	// +kubebuilder:validation:Minimum=0
	// +optional
	PeriodSeconds int32 `json:"periodSeconds"`
	// +kubebuilder:validation:Minimum=0
	// +optional
	FailureThreshold int32 `json:"failureThreshold"`
	// +kubebuilder:validation:Minimum=0
	// +optional
	SuccessThreshold int32 `json:"successThreshold"`
	// +kubebuilder:validation:Minimum=0
	// +optional
	TimeoutSeconds int32 `json:"timeoutSeconds"`
}

func (*Probe) DeepCopy

func (in *Probe) DeepCopy() *Probe

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

func (*Probe) DeepCopyInto

func (in *Probe) DeepCopyInto(out *Probe)

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

type Probes

type Probes struct {
	// +optional
	ReadinessProbe *Probe `json:"readinessProbe,omitempty"`
	// +optional
	LivenessProbe *Probe `json:"livenessProbe,omitempty"`
}

func (*Probes) DeepCopy

func (in *Probes) DeepCopy() *Probes

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

func (*Probes) DeepCopyInto

func (in *Probes) DeepCopyInto(out *Probes)

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

type VolumeReclaimPolicy

type VolumeReclaimPolicy string
const (
	VolumeReclaimPolicyRetain VolumeReclaimPolicy = "Retain"
	VolumeReclaimPolicyDelete VolumeReclaimPolicy = "Delete"
)

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) ConfigMapName

func (z *ZookeeperCluster) ConfigMapName() string

ConfigMapName returns the name of the cluster config-map

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) GetAdminServerServiceName

func (z *ZookeeperCluster) GetAdminServerServiceName() string

GetAdminServerServiceName returns the name of the admin server service for the cluster

func (*ZookeeperCluster) GetClientServiceName

func (z *ZookeeperCluster) GetClientServiceName() string

GetClientServiceName returns the name of the client service for the cluster

func (*ZookeeperCluster) GetKubernetesClusterDomain

func (z *ZookeeperCluster) GetKubernetesClusterDomain() string

GetKubernetesClusterDomain returns the cluster domain of kubernetes

func (*ZookeeperCluster) GetTriggerRollingRestart

func (z *ZookeeperCluster) GetTriggerRollingRestart() bool

func (*ZookeeperCluster) SetTriggerRollingRestart

func (z *ZookeeperCluster) SetTriggerRollingRestart(val bool)

set the value of triggerRollingRestart function

func (*ZookeeperCluster) WithDefaults

func (z *ZookeeperCluster) WithDefaults() bool

WithDefaults set default values when not defined in the spec.

func (*ZookeeperCluster) ZookeeperPorts

func (z *ZookeeperCluster) ZookeeperPorts() Ports

ZookeeperPorts returns a struct of ports

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 {
	// Image is the  container image. default is zookeeper:0.2.10
	Image ContainerImage `json:"image,omitempty"`

	// Labels specifies the labels to attach to all resources the operator
	// creates for the zookeeper cluster, including StatefulSet, Pod,
	// PersistentVolumeClaim, Service, ConfigMap, et al.
	Labels map[string]string `json:"labels,omitempty"`

	// Replicas is the expected size of the zookeeper cluster.
	// The pravega-operator will eventually make the size of the running cluster
	// equal to the expected size.
	//
	// The valid range of size is from 1 to 7.
	// +kubebuilder:validation:Minimum=1
	Replicas int32 `json:"replicas,omitempty"`

	Ports []v1.ContainerPort `json:"ports,omitempty"`

	// Pod defines the policy to create pod for the zookeeper cluster.
	// Updating the Pod does not take effect on any existing pods.
	Pod PodPolicy `json:"pod,omitempty"`

	// AdminServerService defines the policy to create AdminServer Service
	// for the zookeeper cluster.
	AdminServerService AdminServerServicePolicy `json:"adminServerService,omitempty"`

	// ClientService defines the policy to create client Service
	// for the zookeeper cluster.
	ClientService ClientServicePolicy `json:"clientService,omitempty"`

	// TriggerRollingRestart if set to true will instruct operator to restart all
	// the pods in the zookeeper cluster, after which this value will be set to false
	TriggerRollingRestart bool `json:"triggerRollingRestart,omitempty"`

	// HeadlessService defines the policy to create headless Service
	// for the zookeeper cluster.
	HeadlessService HeadlessServicePolicy `json:"headlessService,omitempty"`

	//StorageType is used to tell which type of storage we will be using
	//It can take either Ephemeral or persistence
	//Default StorageType is Persistence storage
	StorageType string `json:"storageType,omitempty"`

	// Persistence is the configuration for zookeeper persistent layer.
	// PersistentVolumeClaimSpec and VolumeReclaimPolicy can be specified in here.
	Persistence *Persistence `json:"persistence,omitempty"`

	// Ephemeral is the configuration which helps create ephemeral storage
	// At anypoint only one of Persistence or Ephemeral should be present in the manifest
	Ephemeral *Ephemeral `json:"ephemeral,omitempty"`

	// Conf is the zookeeper configuration, which will be used to generate the
	// static zookeeper configuration. If no configuration is provided required
	// default values will be provided, and optional values will be excluded.
	Conf ZookeeperConfig `json:"config,omitempty"`

	// External host name appended for dns annotation
	DomainName string `json:"domainName,omitempty"`

	// Domain of the kubernetes cluster, defaults to cluster.local
	KubernetesClusterDomain string `json:"kubernetesClusterDomain,omitempty"`

	// Containers defines to support multi containers
	Containers []v1.Container `json:"containers,omitempty"`

	// Init containers to support initialization
	InitContainers []v1.Container `json:"initContainers,omitempty"`

	// Volumes defines to support customized volumes
	Volumes []v1.Volume `json:"volumes,omitempty"`

	// VolumeMounts defines to support customized volumeMounts
	VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`

	// Probes specifies the timeout values for the Readiness and Liveness Probes
	// for the zookeeper pods.
	// +optional
	Probes *Probes `json:"probes,omitempty"`

	// MaxUnavailableReplicas defines the
	// MaxUnavailable Replicas in pdb.
	// Default is 1.
	MaxUnavailableReplicas int32 `json:"maxUnavailableReplicas,omitempty"`
}

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 {
	// Members is the zookeeper members in the cluster
	Members MembersStatus `json:"members,omitempty"`

	// Replicas is the number of number of desired replicas in the cluster
	Replicas int32 `json:"replicas,omitempty"`

	// ReadyReplicas is the number of 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"`

	MetaRootCreated bool `json:"metaRootCreated,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

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)

type ZookeeperConfig

type ZookeeperConfig struct {
	// InitLimit is the amount of time, in ticks, to allow followers to connect
	// and sync to a leader.
	//
	// Default value is 10.
	InitLimit int `json:"initLimit,omitempty"`

	// TickTime is the length of a single tick, which is the basic time unit used
	// by Zookeeper, as measured in milliseconds
	//
	// The default value is 2000.
	TickTime int `json:"tickTime,omitempty"`

	// SyncLimit is the amount of time, in ticks, to allow followers to sync with
	// Zookeeper.
	//
	// The default value is 2.
	SyncLimit int `json:"syncLimit,omitempty"`

	// Clients can submit requests faster than ZooKeeper can process them, especially
	// if there are a lot of clients. Zookeeper will throttle Clients so that requests
	// won't exceed global outstanding limit.
	//
	// The default value is 1000
	GlobalOutstandingLimit int `json:"globalOutstandingLimit,omitempty"`

	// To avoid seeks ZooKeeper allocates space in the transaction log file in
	// blocks of preAllocSize kilobytes
	//
	// The default value is 64M
	PreAllocSize int `json:"preAllocSize,omitempty"`

	// ZooKeeper records its transactions using snapshots and a transaction log
	// The number of transactions recorded in the transaction log before a snapshot
	// can be taken is determined by snapCount
	//
	// The default value is 100,000
	SnapCount int `json:"snapCount,omitempty"`

	// Zookeeper maintains an in-memory list of last committed requests for fast
	// synchronization with followers
	//
	// The default value is 500
	CommitLogCount int `json:"commitLogCount,omitempty"`

	// Snapshot size limit in Kb
	//
	// The defult value is 4GB
	SnapSizeLimitInKb int `json:"snapSizeLimitInKb,omitempty"`

	// Limits the total number of concurrent connections that can be made to a
	//zookeeper server
	//
	// The defult value is 0, indicating no limit
	MaxCnxns int `json:"maxCnxns,omitempty"`

	// Limits the number of concurrent connections that a single client, identified
	// by IP address, may make to a single member of the ZooKeeper ensemble.
	//
	// The default value is 60
	MaxClientCnxns int `json:"maxClientCnxns,omitempty"`

	// The minimum session timeout in milliseconds that the server will allow the
	// client to negotiate
	//
	// The default value is 4000
	MinSessionTimeout int `json:"minSessionTimeout,omitempty"`

	// The maximum session timeout in milliseconds that the server will allow the
	// client to negotiate.
	//
	// The default value is 40000
	MaxSessionTimeout int `json:"maxSessionTimeout,omitempty"`

	// Retain the snapshots according to retain count
	//
	// The default value is 3
	AutoPurgeSnapRetainCount int `json:"autoPurgeSnapRetainCount,omitempty"`

	// The time interval in hours for which the purge task has to be triggered
	//
	// Disabled by default
	AutoPurgePurgeInterval int `json:"autoPurgePurgeInterval,omitempty"`

	// QuorumListenOnAllIPs when set to true the ZooKeeper server will listen for
	// connections from its peers on all available IP addresses, and not only the
	// address configured in the server list of the configuration file. It affects
	// the connections handling the ZAB protocol and the Fast Leader Election protocol.
	//
	// The default value is false.
	QuorumListenOnAllIPs bool `json:"quorumListenOnAllIPs,omitempty"`

	// key-value map of additional zookeeper configuration parameters
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	AdditionalConfig map[string]string `json:"additionalConfig,omitempty"`
}

ZookeeperConfig is the current configuration of each Zookeeper node, which sets these values in the config-map

func (*ZookeeperConfig) DeepCopy

func (in *ZookeeperConfig) DeepCopy() *ZookeeperConfig

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

func (*ZookeeperConfig) DeepCopyInto

func (in *ZookeeperConfig) DeepCopyInto(out *ZookeeperConfig)

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