v1alpha1

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

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

Index

Constants

View Source
const (
	// DefaultZookeeperUri is the default ZooKeeper URI in the form of "hostname:port"
	DefaultZookeeperUri = "zk-client:2181"

	// DefaultServiceType is the default service type for external access
	DefaultServiceType = v1.ServiceTypeLoadBalancer

	// DefaultPravegaVersion is the default tag used for for the Pravega
	// Docker image
	DefaultBookkeeperVersion = "0.6.1"

	// the BookKeeper image
	DefaultBookkeeperImageRepository = "pravega/bookkeeper"

	// DefaultbookkeeperImagePullPolicy is the default image pull policy used
	// for the Bookkeeper Docker image
	DefaultBookkeeperImagePullPolicy = v1.PullAlways

	// DefaultBookkeeperLedgerVolumeSize is the default volume size for the
	// Bookkeeper ledger volume
	DefaultBookkeeperLedgerVolumeSize = "10Gi"

	// DefaultBookkeeperJournalVolumeSize is the default volume size for the
	// Bookkeeper journal volume
	DefaultBookkeeperJournalVolumeSize = "10Gi"

	// DefaultBookkeeperIndexVolumeSize is the default volume size for the
	// Bookkeeper index volume
	DefaultBookkeeperIndexVolumeSize = "10Gi"

	// MinimumBookkeeperReplicas is the minimum number of Bookkeeper replicas
	// accepted
	MinimumBookkeeperReplicas = 3

	// DefaultBookkeeperRequestCPU is the default CPU request for BookKeeper
	DefaultBookkeeperRequestCPU = "500m"

	// DefaultBookkeeperLimitCPU is the default CPU limit for BookKeeper
	DefaultBookkeeperLimitCPU = "1"

	// DefaultBookkeeperRequestMemory is the default memory request for BookKeeper
	DefaultBookkeeperRequestMemory = "1Gi"

	// DefaultBookkeeperLimitMemory is the limit memory limit for BookKeeper
	DefaultBookkeeperLimitMemory = "2Gi"
)
View Source
const (
	ClusterConditionPodsReady ClusterConditionType = "PodsReady"
	ClusterConditionUpgrading                      = "Upgrading"
	ClusterConditionRollback                       = "RollbackInProgress"
	ClusterConditionError                          = "Error"

	// Reasons for cluster upgrading condition
	UpdatingBookkeeperReason = "Updating Bookkeeper"
	UpgradeErrorReason       = "Upgrade Error"
	RollbackErrorReason      = "Rollback Error"
)

Variables

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

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

Functions

This section is empty.

Types

type BookkeeperCluster

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

	Spec   BookkeeperClusterSpec   `json:"spec,omitempty"`
	Status BookkeeperClusterStatus `json:"status,omitempty"`
}

BookkeeperCluster is the Schema for the BookkeeperClusters API +k8s:openapi-gen=true

func (*BookkeeperCluster) DeepCopy

func (in *BookkeeperCluster) DeepCopy() *BookkeeperCluster

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

func (*BookkeeperCluster) DeepCopyInto

func (in *BookkeeperCluster) DeepCopyInto(out *BookkeeperCluster)

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

func (*BookkeeperCluster) DeepCopyObject

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

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

func (*BookkeeperCluster) WithDefaults

func (bk *BookkeeperCluster) WithDefaults() (changed bool)

WithDefaults set default values when not defined in the spec.

type BookkeeperClusterList

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

BookkeeperClusterList contains a list of BookkeeperCluster

func (*BookkeeperClusterList) DeepCopy

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

func (*BookkeeperClusterList) DeepCopyInto

func (in *BookkeeperClusterList) DeepCopyInto(out *BookkeeperClusterList)

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

func (*BookkeeperClusterList) DeepCopyObject

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

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

type BookkeeperClusterSpec

type BookkeeperClusterSpec struct {
	// ZookeeperUri specifies the hostname/IP address and port in the format
	// "hostname:port".
	// By default, the value "zk-client:2181" is used, that corresponds to the
	// default Zookeeper service created by the Pravega Zookkeeper operator
	// available at: https://github.com/pravega/zookeeper-operator
	ZookeeperUri string `json:"zookeeperUri"`

	// Image defines the BookKeeper Docker image to use.
	// By default, "pravega/bookkeeper" will be used.
	Image *BookkeeperImageSpec `json:"image"`

	// Replicas defines the number of BookKeeper replicas.
	// Minimum is 3. Defaults to 3.
	Replicas int32 `json:"replicas"`

	// Storage configures the storage for BookKeeper
	Storage *BookkeeperStorageSpec `json:"storage"`

	// AutoRecovery indicates whether or not BookKeeper auto recovery is enabled.
	// Defaults to true.
	AutoRecovery *bool `json:"autoRecovery"`

	// ServiceAccountName configures the service account used on BookKeeper instances
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// BookieResources specifies the request and limit of resources that bookie can have.
	// BookieResources includes CPU and memory resources
	Resources *v1.ResourceRequirements `json:"resources,omitempty"`

	// Options is the Bookkeeper configuration that is to override the bk_server.conf
	// in bookkeeper. Some examples can be found here
	// https://github.com/apache/bookkeeper/blob/master/docker/README.md
	Options map[string]string `json:"options"`

	// JVM is the JVM options for bookkeeper. It will be passed to the JVM for performance tuning.
	// If this field is not specified, the operator will use a set of default
	// options that is good enough for general deployment.
	JVMOptions *JVMOptions `json:"jvmOptions"`

	// Provides the name of the configmap created by the user to provide additional key-value pairs
	// that need to be configured into the bookie pods as environmental variables
	EnvVars string `json:"envVars,omitempty"`

	// Version is the expected version of the Pravega cluster.
	// The pravega-operator will eventually make the Pravega cluster version
	// equal to the expected version.
	//
	// The version must follow the [semver]( http://semver.org) format, for example "3.2.13".
	// Only Pravega released versions are supported: https://github.com/pravega/pravega/releases
	//
	// If version is not set, default is "0.4.0".
	Version string `json:"version"`
}

ClusterSpec defines the desired state of BookkeeperCluster

func (*BookkeeperClusterSpec) DeepCopy

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

func (*BookkeeperClusterSpec) DeepCopyInto

func (in *BookkeeperClusterSpec) DeepCopyInto(out *BookkeeperClusterSpec)

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

type BookkeeperClusterStatus

type BookkeeperClusterStatus struct {
	// Conditions list all the applied conditions
	Conditions []ClusterCondition `json:"conditions,omitempty"`

	// CurrentVersion is the current cluster version
	CurrentVersion string `json:"currentVersion,omitempty"`

	// TargetVersion is the version the cluster upgrading to.
	// If the cluster is not upgrading, TargetVersion is empty.
	TargetVersion string `json:"targetVersion,omitempty"`

	VersionHistory []string `json:"versionHistory,omitempty"`

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

	// CurrentReplicas is the number of current replicas in the cluster
	CurrentReplicas int32 `json:"currentReplicas"`

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

	// Members is the Bookkeeper members in the cluster
	Members MembersStatus `json:"members"`
}

BookkeeperClusterStatus defines the observed state of BookkeeperCluster

func (*BookkeeperClusterStatus) AddToVersionHistory

func (ps *BookkeeperClusterStatus) AddToVersionHistory(version string)

func (*BookkeeperClusterStatus) DeepCopy

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

func (*BookkeeperClusterStatus) DeepCopyInto

func (in *BookkeeperClusterStatus) DeepCopyInto(out *BookkeeperClusterStatus)

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

func (*BookkeeperClusterStatus) GetClusterCondition

func (ps *BookkeeperClusterStatus) GetClusterCondition(t ClusterConditionType) (int, *ClusterCondition)

func (*BookkeeperClusterStatus) GetLastCondition

func (ps *BookkeeperClusterStatus) GetLastCondition() (lastCondition *ClusterCondition)

func (*BookkeeperClusterStatus) GetLastVersion

func (ps *BookkeeperClusterStatus) GetLastVersion() (previousVersion string)

func (*BookkeeperClusterStatus) Init

func (ps *BookkeeperClusterStatus) Init()

func (*BookkeeperClusterStatus) IsClusterInErrorState

func (ps *BookkeeperClusterStatus) IsClusterInErrorState() bool

func (*BookkeeperClusterStatus) IsClusterInReadyState

func (ps *BookkeeperClusterStatus) IsClusterInReadyState() bool

func (*BookkeeperClusterStatus) IsClusterInRollbackFailedState

func (ps *BookkeeperClusterStatus) IsClusterInRollbackFailedState() bool

func (*BookkeeperClusterStatus) IsClusterInRollbackState

func (ps *BookkeeperClusterStatus) IsClusterInRollbackState() bool

func (*BookkeeperClusterStatus) IsClusterInUpgradeFailedOrRollbackState

func (ps *BookkeeperClusterStatus) IsClusterInUpgradeFailedOrRollbackState() bool

func (*BookkeeperClusterStatus) IsClusterInUpgradeFailedState

func (ps *BookkeeperClusterStatus) IsClusterInUpgradeFailedState() bool

func (*BookkeeperClusterStatus) IsClusterInUpgradingState

func (ps *BookkeeperClusterStatus) IsClusterInUpgradingState() bool

func (*BookkeeperClusterStatus) SetErrorConditionFalse

func (ps *BookkeeperClusterStatus) SetErrorConditionFalse()

func (*BookkeeperClusterStatus) SetErrorConditionTrue

func (ps *BookkeeperClusterStatus) SetErrorConditionTrue(reason, message string)

func (*BookkeeperClusterStatus) SetPodsReadyConditionFalse

func (ps *BookkeeperClusterStatus) SetPodsReadyConditionFalse()

func (*BookkeeperClusterStatus) SetPodsReadyConditionTrue

func (ps *BookkeeperClusterStatus) SetPodsReadyConditionTrue()

func (*BookkeeperClusterStatus) SetRollbackConditionFalse

func (ps *BookkeeperClusterStatus) SetRollbackConditionFalse()

func (*BookkeeperClusterStatus) SetRollbackConditionTrue

func (ps *BookkeeperClusterStatus) SetRollbackConditionTrue(reason, message string)

func (*BookkeeperClusterStatus) SetUpgradingConditionFalse

func (ps *BookkeeperClusterStatus) SetUpgradingConditionFalse()

func (*BookkeeperClusterStatus) SetUpgradingConditionTrue

func (ps *BookkeeperClusterStatus) SetUpgradingConditionTrue(reason, message string)

func (*BookkeeperClusterStatus) UpdateProgress

func (ps *BookkeeperClusterStatus) UpdateProgress(reason, updatedReplicas string)

type BookkeeperImageSpec

type BookkeeperImageSpec struct {
	ImageSpec
}

BookkeeperImageSpec defines the fields needed for a BookKeeper Docker image

func (*BookkeeperImageSpec) DeepCopy

func (in *BookkeeperImageSpec) DeepCopy() *BookkeeperImageSpec

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

func (*BookkeeperImageSpec) DeepCopyInto

func (in *BookkeeperImageSpec) DeepCopyInto(out *BookkeeperImageSpec)

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

type BookkeeperStorageSpec

type BookkeeperStorageSpec struct {
	// LedgerVolumeClaimTemplate is the spec to describe PVC for the BookKeeper ledger
	// This field is optional. If no PVC spec and there is no default storage class,
	// stateful containers will use emptyDir as volume
	LedgerVolumeClaimTemplate *v1.PersistentVolumeClaimSpec `json:"ledgerVolumeClaimTemplate"`

	// JournalVolumeClaimTemplate is the spec to describe PVC for the BookKeeper journal
	// This field is optional. If no PVC spec and there is no default storage class,
	// stateful containers will use emptyDir as volume
	JournalVolumeClaimTemplate *v1.PersistentVolumeClaimSpec `json:"journalVolumeClaimTemplate"`

	// IndexVolumeClaimTemplate is the spec to describe PVC for the BookKeeper index
	// This field is optional. If no PVC spec and there is no default storage class,
	// stateful containers will use emptyDir as volume
	IndexVolumeClaimTemplate *v1.PersistentVolumeClaimSpec `json:"indexVolumeClaimTemplate"`
}

BookkeeperStorageSpec is the configuration of the volumes used in BookKeeper

func (*BookkeeperStorageSpec) DeepCopy

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

func (*BookkeeperStorageSpec) DeepCopyInto

func (in *BookkeeperStorageSpec) DeepCopyInto(out *BookkeeperStorageSpec)

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

type ClusterCondition

type ClusterCondition struct {
	// Type of Bookkeeper cluster condition.
	Type ClusterConditionType `json:"type"`

	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`

	// 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 Bookkeeper 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 ImageSpec

type ImageSpec struct {
	Repository string `json:"repository"`

	// Deprecated: Use `spec.Version` instead
	Tag string `json:"tag,omitempty"`

	PullPolicy v1.PullPolicy `json:"pullPolicy"`
}

ImageSpec defines the fields needed for a Docker repository image

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 JVMOptions

type JVMOptions struct {
	MemoryOpts    []string `json:"memoryOpts"`
	GcOpts        []string `json:"gcOpts"`
	GcLoggingOpts []string `json:"gcLoggingOpts"`
	ExtraOpts     []string `json:"extraOpts"`
}

func (*JVMOptions) DeepCopy

func (in *JVMOptions) DeepCopy() *JVMOptions

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

func (*JVMOptions) DeepCopyInto

func (in *JVMOptions) DeepCopyInto(out *JVMOptions)

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

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.

Jump to

Keyboard shortcuts

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