v1beta1

package
v0.2.5-rc0 Latest Latest
Warning

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

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

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 v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=zookeeper.pravega.io

Index

Constants

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 = "latest"

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

Variables

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

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

Functions

This section is empty.

Types

type ContainerImage

type ContainerImage struct {
	Repository string        `json:"repository"`
	Tag        string        `json:"tag"`
	PullPolicy v1.PullPolicy `json:"pullPolicy"`
}

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 MembersStatus

type MembersStatus struct {
	Ready   []string `json:"ready"`
	Unready []string `json:"unready"`
}

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.
	VolumeReclaimPolicy VolumeReclaimPolicy `json:"reclaimPolicy,omitempty"`
	// PersistentVolumeClaimSpec is the spec to describe PVC for the container
	// This field is optional. If no PVC spec, stateful containers will use
	// emptyDir as volume.
	PersistentVolumeClaimSpec v1.PersistentVolumeClaimSpec `json:"spec,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.
	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"`

	// 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"`

	// TerminationGracePeriodSeconds is the amount of time that kubernetes will
	// give for a pod instance to shutdown normally.
	// The default value is 1800.
	TerminationGracePeriodSeconds int64 `json:"terminationGracePeriodSeconds"`
}

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
}

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 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 +k8s:openapi-gen=true

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

func (z *ZookeeperCluster) GetClientServiceName() string

GetClientServiceName returns the name of the client service for the cluster

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:latest
	Image ContainerImage `json:"image,omitempty"`

	// Labels specifies the labels to attach to pods the operator creates for
	// the zookeeper cluster.
	Labels map[string]string `json:"labels,omitempty"`

	// Size (DEPRECATED) is the expected size of the zookeeper cluster. This
	// has been replaced with "Replicas"
	//
	// The valid range of size is from 1 to 7.
	Size int32 `json:"size,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.
	Replicas int32 `json:"replicas"`

	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"`

	// Persistence is the configuration for zookeeper persistent layer.
	// PersistentVolumeClaimSpec and VolumeReclaimPolicy can be specified in here.
	Persistence *Persistence `json:"persistence,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"`
}

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"`

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

	// ReadyReplicas is the number of number of ready replicas in the cluster
	ReadyReplicas int32 `json:"readyReplicas"`

	// InternalClientEndpoint is the internal client IP and port
	InternalClientEndpoint string `json:"internalClientEndpoint"`

	// ExternalClientEndpoint is the internal client IP and port
	ExternalClientEndpoint string `json:"externalClientEndpoint"`
}

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.

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"`

	// 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"`

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

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