v1alpha1

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	AdminPortName          = "http-admin"
	ClientPortName         = "tcp-client"
	LeaderPortName         = "tcp-leader"
	QuorumPortName         = "tcp-quorum"
	ServiceMetricsPortName = "http-metrics"
	SecureClientPortName   = "tls-secure-client"
)
View Source
const (
	// VolumeReclaimPolicyDelete deletes the volume after the cluster is deleted
	VolumeReclaimPolicyDelete = "Delete"
	// VolumeReclaimPolicyRetain retains the volume after the cluster is deleted
	VolumeReclaimPolicyRetain = "Retain"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "zookeeper.monime.sl", 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 Directories added in v0.1.1

type Directories struct {
	Data string `json:"data,omitempty"`
	Log  string `json:"log,omitempty"`
}

func (*Directories) DeepCopy added in v0.1.1

func (in *Directories) DeepCopy() *Directories

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

func (*Directories) DeepCopyInto added in v0.1.1

func (in *Directories) DeepCopyInto(out *Directories)

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

type Metadata

type Metadata struct {
	Size                  int32   `json:"size,omitempty"`
	ServiceMonitorVersion *string `json:"serviceMonitorVersion,omitempty"`
}

Metadata defines the metadata status of the ZookeeperCluster

func (*Metadata) DeepCopy

func (in *Metadata) DeepCopy() *Metadata

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

func (*Metadata) DeepCopyInto

func (in *Metadata) DeepCopyInto(out *Metadata)

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

type Persistence added in v0.2.0

type Persistence struct {
	// ReclaimPolicy decides the fate of the PVCs after the cluster is deleted.
	// If it's set to Delete and the zookeeper cluster is deleted, the corresponding PVCs will be deleted.
	// The default value is Retain.
	// +kubebuilder:validation:Enum="Delete";"Retain"
	ReclaimPolicy VolumeReclaimPolicy `json:"reclaimPolicy,omitempty"`
	// ClaimSpec describes the common attributes of storage devices
	// and allows a Source for provider-specific attributes
	ClaimSpec v1.PersistentVolumeClaimSpec `json:"claimSpec,omitempty"`
}

Persistence defines cluster node persistence volume is configured

func (*Persistence) DeepCopy added in v0.2.0

func (in *Persistence) DeepCopy() *Persistence

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

func (*Persistence) DeepCopyInto added in v0.2.0

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

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

type Ports

type Ports struct {
	Client       int32 `json:"client,omitempty"`
	SecureClient int32 `json:"secureClient,omitempty"`
	Metrics      int32 `json:"metrics,omitempty"`
	Quorum       int32 `json:"quorum,omitempty"`
	Leader       int32 `json:"leader,omitempty"`
	Admin        int32 `json:"admin,omitempty"`
}

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 VolumeReclaimPolicy

type VolumeReclaimPolicy string

VolumeReclaimPolicy defines the possible volume reclaim policy: Delete or Retain

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

func (in *ZookeeperCluster) ClientServiceFQDN() string

ClientServiceFQDN defines the FQDN of the client service object

func (*ZookeeperCluster) ClientServiceName

func (in *ZookeeperCluster) ClientServiceName() string

ClientServiceName defines the name of the client service object

func (*ZookeeperCluster) ConfigMapName

func (in *ZookeeperCluster) ConfigMapName() string

ConfigMapName defines the name of the configmap object

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 added in v0.2.0

func (in *ZookeeperCluster) Default()

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

func (*ZookeeperCluster) GenerateAnnotations added in v0.2.0

func (in *ZookeeperCluster) GenerateAnnotations() map[string]string

func (*ZookeeperCluster) GenerateLabels added in v0.2.0

func (in *ZookeeperCluster) GenerateLabels() map[string]string

func (*ZookeeperCluster) HeadlessServiceName

func (in *ZookeeperCluster) HeadlessServiceName() string

HeadlessServiceName defines the name of the headless service object

func (*ZookeeperCluster) Image added in v0.2.0

func (in *ZookeeperCluster) Image() basetype.Image

Image the bookkeeper docker image for the cluster

func (*ZookeeperCluster) IsSslClientSupported

func (in *ZookeeperCluster) IsSslClientSupported() bool

IsSslClientSupported returns whether SSL client is supported

func (*ZookeeperCluster) SetSpecDefaults

func (in *ZookeeperCluster) SetSpecDefaults() bool

SetSpecDefaults set the defaults for the cluster spec and returns true otherwise false

func (*ZookeeperCluster) SetStatusDefaults

func (in *ZookeeperCluster) SetStatusDefaults() bool

SetStatusDefaults set the defaults for the cluster status and returns true otherwise false

func (*ZookeeperCluster) SetupWebhookWithManager added in v0.2.0

func (in *ZookeeperCluster) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager needed for webhook test suite

func (*ZookeeperCluster) ShouldDeleteStorage added in v0.2.0

func (in *ZookeeperCluster) ShouldDeleteStorage() bool

ShouldDeleteStorage returns whether the PV should should be deleted or not

func (*ZookeeperCluster) StatefulSetName

func (in *ZookeeperCluster) StatefulSetName() string

StatefulSetName defines the name of the statefulset object

func (*ZookeeperCluster) ValidateCreate added in v0.2.0

func (in *ZookeeperCluster) ValidateCreate() (admission.Warnings, error)

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

func (*ZookeeperCluster) ValidateDelete added in v0.2.0

func (in *ZookeeperCluster) ValidateDelete() (warnings admission.Warnings, err error)

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

func (*ZookeeperCluster) ValidateUpdate added in v0.2.0

func (in *ZookeeperCluster) ValidateUpdate(_ runtime.Object) (admission.Warnings, error)

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

func (*ZookeeperCluster) WaitClusterTermination added in v0.2.0

func (in *ZookeeperCluster) WaitClusterTermination(kubeClient client.Client) (err error)

WaitClusterTermination wait for all the bookkeeper pods in cluster to terminated

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
	// +kubebuilder:validation:Minimum=0
	Size *int32 `json:"size,omitempty"`

	Directories *Directories `json:"directories,omitempty"`

	Ports *Ports `json:"ports,omitempty"`

	// ZookeeperVersion defines the version of zookeeper to use
	ZookeeperVersion string `json:"zookeeperVersion,omitempty"`
	// ImagePullPolicy describes a policy for if/when to pull the image
	// +optional
	ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// ZkConfig defines the zoo.cfg data
	ZkConfig string `json:"zkCfg,omitempty"`

	// Log4jProps defines the log4j.properties data
	Log4jProps string `json:"log4jProps,omitempty"`

	// Log4jQuietProps defines the log4j-quiet.properties data
	Log4jQuietProps string `json:"log4jQuietProps,omitempty"`

	// Persistence configures your node storage
	// +optional
	Persistence *Persistence `json:"persistence,omitempty"`

	// PodConfig defines common configuration for the zookeeper pods
	PodConfig basetype.PodConfig `json:"podConfig,omitempty"`
	// ProbeConfig defines the probing settings for the zookeeper containers
	ProbeConfig *pod.Probes `json:"probeConfig,omitempty"`

	// Labels defines the labels to attach to the zookeeper statefulset pods
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations defines the annotations to attach to the zookeeper statefulset and services
	Annotations map[string]string `json:"annotations,omitempty"`

	// ClusterDomain defines the cluster domain for the cluster
	// It defaults to cluster.local
	ClusterDomain string `json:"clusterDomain,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 {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	Metadata Metadata `json:"metadata,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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL