v1beta1

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// DefaultPravegaImageRepository is the default Docker repository for
	// the Pravega image
	DefaultPravegaImageRepository = "pravega/pravega"

	// DefaultPravegaImagePullPolicy is the default image pull policy used
	// for the Pravega Docker image
	DefaultPravegaImagePullPolicy = v1.PullAlways

	// DefaultPravegaCacheVolumeSize is the default volume size for the
	// Pravega SegmentStore cache volume
	DefaultPravegaCacheVolumeSize = "20Gi"

	// DefaultPravegaLTSClaimName is the default volume claim name used as Tier 2
	DefaultPravegaLTSClaimName = "pravega-tier2"

	// DefaultControllerReplicas is the default number of replicas for the Pravega
	// Controller component
	DefaultControllerReplicas = 1

	// DefaultSegmentStoreReplicas is the default number of replicas for the Pravega
	// Segment Store component
	DefaultSegmentStoreReplicas = 1

	// DefaultControllerRequestCPU is the default CPU request for Pravega
	DefaultControllerRequestCPU = "250m"

	// DefaultControllerLimitCPU is the default CPU limit for Pravega
	DefaultControllerLimitCPU = "500m"

	// DefaultControllerRequestMemory is the default memory request for Pravega
	DefaultControllerRequestMemory = "512Mi"

	// DefaultControllerLimitMemory is the default memory limit for Pravega
	DefaultControllerLimitMemory = "1Gi"

	// DefaultSegmentStoreRequestCPU is the default CPU request for Pravega
	DefaultSegmentStoreRequestCPU = "500m"

	// DefaultSegmentStoreLimitCPU is the default CPU limit for Pravega
	DefaultSegmentStoreLimitCPU = "1"

	// DefaultSegmentStoreRequestMemory is the default memory request for Pravega
	DefaultSegmentStoreRequestMemory = "1Gi"

	// DefaultSegmentStoreLimitMemory is the default memory limit for Pravega
	DefaultSegmentStoreLimitMemory = "2Gi"

	// DefaultInfluxDBSecretMountDir is the default mountpath of influxdb secret
	DefaultInfluxDBSecretMountDir = "/etc/influxdb-secret-volume"

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

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

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

	// DefaultReadinessProbeSuccessThreshold is the default probe success threshold
	// for the readiness probe
	DefaultControllerReadinessProbeSuccessThreshold = 3

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

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

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

	// DefaultLivenessProbeFailureThreshold is the default probe failure threshold
	// for the liveness probe
	DefaultControllerLivenessProbeFailureThreshold = 4

	// DefaultLivenessProbeSuccessThreshold is the default probe success threshold
	// for the liveness probe
	DefaultControllerLivenessProbeSuccessThreshold = 1

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

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

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

	// DefaultReadinessProbeFailureThreshold is the default probe failure threshold
	// for the readiness probe
	DefaultSegmentStoreReadinessProbeFailureThreshold = 30

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

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

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

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

	// DefaultLivenessProbeFailureThreshold is the default probe failure threshold
	// for the liveness probe
	DefaultSegmentStoreLivenessProbeFailureThreshold = 4

	// DefaultLivenessProbeSuccessThreshold is the default probe success threshold
	// for the liveness probe
	DefaultSegmentStoreLivenessProbeSuccessThreshold = 1

	// DefaultLivenessProbeTimeoutSeconds is the default probe timeout (in seconds)
	// for the liveness probe
	DefaultSegmentStoreLivenessProbeTimeoutSeconds = 5
)
View Source
const (
	// DefaultZookeeperUri is the default ZooKeeper URI in the form of "hostname:port"
	DefaultZookeeperUri = "zookeeper-client:2181"

	// DefaultBookkeeperUri is the default ZooKeeper URI in the form of "hostname:port"
	DefaultBookkeeperUri = "" /* 233-byte string literal not displayed */

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

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

	// OperatorNameEnvVar is env variable for operator name
	OperatorNameEnvVar = "OPERATOR_NAME"
)
View Source
const (
	ClusterConditionPodsReady ClusterConditionType = "PodsReady"
	ClusterConditionUpgrading                      = "Upgrading"
	ClusterConditionRollback                       = "RollbackInProgress"
	ClusterConditionError                          = "Error"

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

Variables

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

func OperatorName

func OperatorName() (string, error)

OperatorName returns the operator name

Types

type AuthHandlerSpec

type AuthHandlerSpec struct {
	Image  string `json:"image"`
	Source string `json:"source"`
}

Contains details of auth handler

func (*AuthHandlerSpec) DeepCopy

func (in *AuthHandlerSpec) DeepCopy() *AuthHandlerSpec

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

func (*AuthHandlerSpec) DeepCopyInto

func (in *AuthHandlerSpec) DeepCopyInto(out *AuthHandlerSpec)

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

type AuthImplementationSpec

type AuthImplementationSpec struct {
	MountPath    string            `json:"mountPath,omitempty"`
	AuthHandlers []AuthHandlerSpec `json:"authHandlers"`
}

AuthImpemenationSpec helps to inject plugins to contoller pod

func (*AuthImplementationSpec) DeepCopy

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

func (*AuthImplementationSpec) DeepCopyInto

func (in *AuthImplementationSpec) DeepCopyInto(out *AuthImplementationSpec)

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

type AuthenticationParameters

type AuthenticationParameters struct {
	// Enabled specifies whether or not authentication is enabled
	// By default, authentication is not enabled
	// +optional
	Enabled bool `json:"enabled"`

	// name of Secret containing Password based Authentication Parameters like username, password and acl
	// optional - used only by PasswordAuthHandler for authentication
	PasswordAuthSecret string `json:"passwordAuthSecret,omitempty"`

	// name of secret containg TokenSigningKey
	ControllerTokenSecret string `json:"controllerTokenSecret,omitempty"`

	// name of secret containg TokenSigningKey and AuthToken
	SegmentStoreTokenSecret string `json:"segmentStoreTokenSecret,omitempty"`
}

func (*AuthenticationParameters) DeepCopy

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

func (*AuthenticationParameters) DeepCopyInto

func (in *AuthenticationParameters) DeepCopyInto(out *AuthenticationParameters)

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

func (*AuthenticationParameters) IsEnabled

func (ap *AuthenticationParameters) IsEnabled() bool

type ClusterCondition

type ClusterCondition struct {
	// Type of Pravega cluster condition.
	// +optional
	Type ClusterConditionType `json:"type"`

	// Status of the condition, one of True, False, Unknown.
	// +optional
	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 Pravega 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 ClusterSpec

type ClusterSpec struct {
	// ZookeeperUri specifies the hostname/IP address and port in the format
	// "hostname:port".
	// By default, the value "zookeeper-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
	// +optional
	ZookeeperUri string `json:"zookeeperUri"`

	// ExternalAccess specifies whether or not to allow external access
	// to clients and the service type to use to achieve it
	// By default, external access is not enabled
	// +optional
	ExternalAccess *ExternalAccess `json:"externalAccess"`

	// TLS is the Pravega security configuration that is passed to the Pravega processes.
	// See the following file for a complete list of options:
	// https://github.com/pravega/pravega/blob/master/documentation/src/docs/security/pravega-security-configurations.md
	// +optional
	TLS *TLSPolicy `json:"tls,omitempty"`

	// Authentication can be enabled for authorizing all communication from clients to controller and segment store
	// See the following file for a complete list of options:
	// https://github.com/pravega/pravega/blob/master/documentation/src/docs/security/pravega-security-configurations.md
	Authentication *AuthenticationParameters `json:"authentication,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 value will be set.
	// +optional
	Version string `json:"version"`

	// BookkeeperUri specifies the hostname/IP address and port in the format
	// "hostname:port".
	// comma delimited list of BK server URLs
	// bookkeeper-bookie-0.bookkeeper-bookie-headless.default:3181,
	// bookkeeper-bookie-1.bookkeeper-bookie-headless.default:3181,
	// bookkeeper-bookie-2.bookkeeper-bookie-headless.default:3181
	// +optional
	BookkeeperUri string `json:"bookkeeperUri"`

	// Pravega configuration
	// +optional
	Pravega *PravegaSpec `json:"pravega"`
}

ClusterSpec defines the desired state of PravegaCluster

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

type ClusterStatus

type ClusterStatus 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
	// +optional
	Replicas int32 `json:"replicas"`

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

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

	// Members is the Pravega members in the cluster
	// +optional
	Members MembersStatus `json:"members"`
}

ClusterStatus defines the observed state of PravegaCluster

func (*ClusterStatus) AddToVersionHistory

func (ps *ClusterStatus) AddToVersionHistory(version string)

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

func (*ClusterStatus) GetClusterCondition

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

func (*ClusterStatus) GetLastCondition

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

func (*ClusterStatus) GetLastVersion

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

func (*ClusterStatus) Init

func (ps *ClusterStatus) Init()

func (*ClusterStatus) IsClusterInErrorState

func (ps *ClusterStatus) IsClusterInErrorState() bool

func (*ClusterStatus) IsClusterInReadyState

func (ps *ClusterStatus) IsClusterInReadyState() bool

func (*ClusterStatus) IsClusterInRollbackFailedState

func (ps *ClusterStatus) IsClusterInRollbackFailedState() bool

func (*ClusterStatus) IsClusterInRollbackState

func (ps *ClusterStatus) IsClusterInRollbackState() bool

func (*ClusterStatus) IsClusterInUpgradeFailedOrRollbackState

func (ps *ClusterStatus) IsClusterInUpgradeFailedOrRollbackState() bool

func (*ClusterStatus) IsClusterInUpgradeFailedState

func (ps *ClusterStatus) IsClusterInUpgradeFailedState() bool

func (*ClusterStatus) IsClusterInUpgradingState

func (ps *ClusterStatus) IsClusterInUpgradingState() bool

func (*ClusterStatus) SetErrorConditionFalse

func (ps *ClusterStatus) SetErrorConditionFalse()

func (*ClusterStatus) SetErrorConditionTrue

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

func (*ClusterStatus) SetPodsReadyConditionFalse

func (ps *ClusterStatus) SetPodsReadyConditionFalse()

func (*ClusterStatus) SetPodsReadyConditionTrue

func (ps *ClusterStatus) SetPodsReadyConditionTrue()

func (*ClusterStatus) SetRollbackConditionFalse

func (ps *ClusterStatus) SetRollbackConditionFalse()

func (*ClusterStatus) SetRollbackConditionTrue

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

func (*ClusterStatus) SetUpgradingConditionFalse

func (ps *ClusterStatus) SetUpgradingConditionFalse()

func (*ClusterStatus) SetUpgradingConditionTrue

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

func (*ClusterStatus) UpdateProgress

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

type CustomSpec

type CustomSpec struct {
	Options map[string]string `json:"options,omitempty"`
	Env     map[string]string `json:"env"`
}

CustomSpec contains the options and env variables to be passed to segmentstore

func (*CustomSpec) DeepCopy

func (in *CustomSpec) DeepCopy() *CustomSpec

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

func (*CustomSpec) DeepCopyInto

func (in *CustomSpec) DeepCopyInto(out *CustomSpec)

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

type ECSSpec

type ECSSpec struct {
	// +optional
	ConfigUri string `json:"configUri"`
	// +optional
	Bucket string `json:"bucket"`
	// +optional
	Prefix string `json:"prefix"`
	// +optional
	Credentials string `json:"credentials"`
}

ECSSpec contains the connection details to a Dell EMC ECS system

func (*ECSSpec) DeepCopy

func (in *ECSSpec) DeepCopy() *ECSSpec

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

func (*ECSSpec) DeepCopyInto

func (in *ECSSpec) DeepCopyInto(out *ECSSpec)

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

type ExternalAccess

type ExternalAccess struct {
	// Enabled specifies whether or not external access is enabled
	// By default, external access is not enabled
	// +optional
	Enabled bool `json:"enabled"`

	// Type specifies the service type to achieve external access.
	// Options are "LoadBalancer" and "NodePort".
	// By default, if external access is enabled, it will use "LoadBalancer"
	Type corev1.ServiceType `json:"type,omitempty"`

	// Domain Name to be used for External Access
	// This value is ignored if External Access is disabled
	DomainName string `json:"domainName,omitempty"`
}

ExternalAccess defines the configuration of the external access

func (*ExternalAccess) DeepCopy

func (in *ExternalAccess) DeepCopy() *ExternalAccess

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

func (*ExternalAccess) DeepCopyInto

func (in *ExternalAccess) DeepCopyInto(out *ExternalAccess)

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

type FileSystemSpec

type FileSystemSpec struct {
	// +optional
	PersistentVolumeClaim *v1.PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim"`
}

FileSystemSpec contains the reference to a PVC.

func (*FileSystemSpec) DeepCopy

func (in *FileSystemSpec) DeepCopy() *FileSystemSpec

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

func (*FileSystemSpec) DeepCopyInto

func (in *FileSystemSpec) DeepCopyInto(out *FileSystemSpec)

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

type HDFSSpec

type HDFSSpec struct {
	// +optional
	Uri string `json:"uri"`
	// +optional
	Root string `json:"root"`
	// +optional
	ReplicationFactor int32 `json:"replicationFactor"`
}

HDFSSpec contains the connection details to an HDFS system

func (*HDFSSpec) DeepCopy

func (in *HDFSSpec) DeepCopy() *HDFSSpec

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

func (*HDFSSpec) DeepCopyInto

func (in *HDFSSpec) DeepCopyInto(out *HDFSSpec)

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

type ImageSpec

type ImageSpec struct {
	// +optional
	Repository string `json:"repository"`
	// +optional
	PullPolicy corev1.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 InfluxDBSecret

type InfluxDBSecret struct {
	// Secret specifies the name of Secret which needs to be configured
	Secret string `json:"secret"`

	// Path to the volume where the secret will be mounted
	// This value is considered only when the secret is provided
	// If this value is provided, the secret is mounted to specified Volume
	// else default mount path is used.
	// +optional
	MountPath string `json:"mountPath"`
}

InfluxDBSecret defines the configuration of the secret for controller and segmentstore

func (*InfluxDBSecret) DeepCopy

func (in *InfluxDBSecret) DeepCopy() *InfluxDBSecret

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

func (*InfluxDBSecret) DeepCopyInto

func (in *InfluxDBSecret) DeepCopyInto(out *InfluxDBSecret)

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

type LongTermStorageSpec

type LongTermStorageSpec struct {
	// FileSystem is used to configure a pre-created Persistent Volume Claim
	// as Tier 2 backend.
	// It is default Tier 2 mode.
	FileSystem *FileSystemSpec `json:"filesystem,omitempty"`

	// Ecs is used to configure a Dell EMC ECS system as a Tier 2 backend
	Ecs *ECSSpec `json:"ecs,omitempty"`

	// Hdfs is used to configure an HDFS system as a Tier 2 backend
	Hdfs *HDFSSpec `json:"hdfs,omitempty"`

	// Custom Storage as a Tier2 backend
	Custom *CustomSpec `json:"custom,omitempty"`
}

LongTermStorageSpec configures the Tier 2 storage type to use with Pravega. If not specified, Tier 2 will be configured in filesystem mode and will try to use a PersistentVolumeClaim with the name "pravega-longterm"

func (*LongTermStorageSpec) DeepCopy

func (in *LongTermStorageSpec) DeepCopy() *LongTermStorageSpec

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

func (*LongTermStorageSpec) DeepCopyInto

func (in *LongTermStorageSpec) DeepCopyInto(out *LongTermStorageSpec)

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

type MembersStatus

type MembersStatus struct {
	// +optional
	// +nullable
	Ready []string `json:"ready"`
	// +optional
	// +nullable
	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 PravegaCluster

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

	Spec   ClusterSpec   `json:"spec,omitempty"`
	Status ClusterStatus `json:"status,omitempty"`
}

Generate CRD using kubebuilder +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:resource:shortName=pk +kubebuilder:printcolumn:name="Version",type=string,JSONPath=`.status.currentVersion`,description="The current pravega version" +kubebuilder:printcolumn:name="Desired Version",type=string,JSONPath=`.spec.version`,description="The desired pravega version" +kubebuilder:printcolumn:name="Desired Members",type=integer,JSONPath=`.status.replicas`,description="The number of desired pravega members" +kubebuilder:printcolumn:name="Ready Members",type=integer,JSONPath=`.status.readyReplicas`,description="The number of ready pravega members" +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` PravegaCluster is the Schema for the pravegaclusters API +k8s:openapi-gen=true

func (*PravegaCluster) AnnotationsForController

func (p *PravegaCluster) AnnotationsForController() map[string]string

func (*PravegaCluster) AnnotationsForSegmentStore

func (p *PravegaCluster) AnnotationsForSegmentStore() map[string]string

func (*PravegaCluster) ConfigMapNameForController

func (p *PravegaCluster) ConfigMapNameForController() string

func (*PravegaCluster) ConfigMapNameForSegmentstore

func (p *PravegaCluster) ConfigMapNameForSegmentstore() string

func (*PravegaCluster) DeepCopy

func (in *PravegaCluster) DeepCopy() *PravegaCluster

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

func (*PravegaCluster) DeepCopyInto

func (in *PravegaCluster) DeepCopyInto(out *PravegaCluster)

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

func (*PravegaCluster) DeepCopyObject

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

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

func (*PravegaCluster) DeploymentNameForController

func (p *PravegaCluster) DeploymentNameForController() string

func (*PravegaCluster) GetClusterExpectedSize

func (p *PravegaCluster) GetClusterExpectedSize() (size int)

func (*PravegaCluster) HeadlessServiceNameForBookie

func (p *PravegaCluster) HeadlessServiceNameForBookie() string

func (*PravegaCluster) HeadlessServiceNameForSegmentStore

func (p *PravegaCluster) HeadlessServiceNameForSegmentStore() string

func (*PravegaCluster) LabelsForController

func (p *PravegaCluster) LabelsForController() map[string]string

func (*PravegaCluster) LabelsForPravegaCluster

func (pravegaCluster *PravegaCluster) LabelsForPravegaCluster() map[string]string

func (*PravegaCluster) LabelsForSegmentStore

func (p *PravegaCluster) LabelsForSegmentStore() map[string]string

func (*PravegaCluster) NewApplicationEvent

func (p *PravegaCluster) NewApplicationEvent(name string, reason string, message string, eventType string) *corev1.Event

func (*PravegaCluster) NewEvent

func (p *PravegaCluster) NewEvent(name string, reason string, message string, eventType string) *corev1.Event

func (*PravegaCluster) PdbNameForController

func (p *PravegaCluster) PdbNameForController() string

func (*PravegaCluster) PdbNameForSegmentstore

func (p *PravegaCluster) PdbNameForSegmentstore() string

func (*PravegaCluster) PravegaControllerServiceURL

func (p *PravegaCluster) PravegaControllerServiceURL() string

func (*PravegaCluster) PravegaImage

func (p *PravegaCluster) PravegaImage() (image string)

func (*PravegaCluster) PravegaTargetImage

func (p *PravegaCluster) PravegaTargetImage() (string, error)

func (*PravegaCluster) ServiceNameForController

func (p *PravegaCluster) ServiceNameForController() string

func (*PravegaCluster) ServiceNameForSegmentStore

func (p *PravegaCluster) ServiceNameForSegmentStore(index int32) string

func (*PravegaCluster) ServiceNameForSegmentStoreAbove07

func (p *PravegaCluster) ServiceNameForSegmentStoreAbove07(index int32) string

func (*PravegaCluster) ServiceNameForSegmentStoreBelow07

func (p *PravegaCluster) ServiceNameForSegmentStoreBelow07(index int32) string

func (*PravegaCluster) SetupWebhookWithManager

func (r *PravegaCluster) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*PravegaCluster) StatefulSetNameForSegmentstore

func (p *PravegaCluster) StatefulSetNameForSegmentstore() string

to return name of segmentstore based on the version

func (*PravegaCluster) StatefulSetNameForSegmentstoreAbove07

func (p *PravegaCluster) StatefulSetNameForSegmentstoreAbove07() string

if version is above or equals to 0.7 this name will be assigned

func (*PravegaCluster) StatefulSetNameForSegmentstoreBelow07

func (p *PravegaCluster) StatefulSetNameForSegmentstoreBelow07() string

if version is below 0.7 this name will be assigned

func (*PravegaCluster) ValidateAuthenticationSettings

func (p *PravegaCluster) ValidateAuthenticationSettings() error

ValidateAuthenticationSettings checks for correct options passed to pravega when authentication is enabled/disabled.

func (*PravegaCluster) ValidateBookkeperSettings

func (p *PravegaCluster) ValidateBookkeperSettings() error

ValidateBookkeeperSettings checks that the value passed for the options bookkeeper.ensemble.size (E) bookkeeper.write.quorum.size (W) and bookkeeper.ack.quorum.size (A) adheres to the following rule, E >= W >= A. The method also checks for the option bookkeeper.write.quorum.racks.minimumCount.enable which should be set to false when bookkeeper.ensemble.size is 1. Note: The default value of E , W and A is 3.

func (*PravegaCluster) ValidateCreate

func (p *PravegaCluster) ValidateCreate() error

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

func (*PravegaCluster) ValidateDelete

func (p *PravegaCluster) ValidateDelete() error

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

func (*PravegaCluster) ValidatePravegaVersion

func (p *PravegaCluster) ValidatePravegaVersion() error

func (*PravegaCluster) ValidateSegmentStoreMemorySettings

func (p *PravegaCluster) ValidateSegmentStoreMemorySettings() error

ValidateSegmentStoreMemorySettings checks whether the user has passed the required values for segment store memory settings. The required values includes: SegmentStoreResources.limits.memory, pravegaservice.cache.size.max , -XX:MaxDirectMemorySize and -Xmx. Once the required values are set, the method also checks whether the following conditions are met: Total Memory > JVM Heap (-Xmx) + JVM Direct Memory (-XX:MaxDirectMemorySize) JVM Direct memory > Segment Store read cache size (pravegaservice.cache.size.max).

func (*PravegaCluster) ValidateUpdate

func (p *PravegaCluster) ValidateUpdate(old runtime.Object) error

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

func (*PravegaCluster) WaitForClusterToTerminate

func (p *PravegaCluster) WaitForClusterToTerminate(kubeClient client.Client) (err error)

Wait for pods in cluster to be terminated

func (*PravegaCluster) WithDefaults

func (p *PravegaCluster) WithDefaults() (changed bool)

WithDefaults set default values when not defined in the spec.

type PravegaClusterList

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

PravegaClusterList contains a list of PravegaCluster

func (*PravegaClusterList) DeepCopy

func (in *PravegaClusterList) DeepCopy() *PravegaClusterList

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

func (*PravegaClusterList) DeepCopyInto

func (in *PravegaClusterList) DeepCopyInto(out *PravegaClusterList)

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

func (*PravegaClusterList) DeepCopyObject

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

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

type PravegaSpec

type PravegaSpec struct {
	// ControllerReplicas defines the number of Controller replicas.
	// Defaults to 1.
	// +kubebuilder:validation:Minimum=0
	// +optional
	ControllerReplicas int32 `json:"controllerReplicas"`

	// SegmentStoreReplicas defines the number of Segment Store replicas.
	// Defaults to 1.
	// +kubebuilder:validation:Minimum=0
	// +optional
	SegmentStoreReplicas int32 `json:"segmentStoreReplicas"`

	// MaxUnavailableSegmentStoreReplicas defines the
	// MaxUnavailable SegmentStore Replicas
	// Default is 1.
	// +optional
	MaxUnavailableSegmentStoreReplicas int32 `json:"maxUnavailableSegmentStoreReplicas"`

	// MaxUnavailableControllerReplicas defines the
	// MaxUnavailable Controller Replicas
	// Default is 1.
	// +optional
	MaxUnavailableControllerReplicas int32 `json:"maxUnavailableControllerReplicas"`

	// DebugLogging indicates whether or not debug level logging is enabled.
	// Defaults to false.
	// +optional
	DebugLogging bool `json:"debugLogging"`

	// Image defines the Pravega Docker image to use.
	// By default, "pravega/pravega" will be used.
	// +optional
	Image *ImageSpec `json:"image"`

	// Options is the Pravega configuration that is passed to the Pravega processes
	// as JAVA_OPTS. See the following file for a complete list of options:
	// https://github.com/pravega/pravega/blob/master/config/config.properties
	// +optional
	Options map[string]string `json:"options"`

	// ControllerJvmOptions is the JVM options for controller. 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.
	// +optional
	ControllerJvmOptions []string `json:"controllerjvmOptions"`

	// SegmentStoreJVMOptions is the JVM options for Segmentstore. 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.
	// +optional
	SegmentStoreJVMOptions []string `json:"segmentStoreJVMOptions"`

	// CacheVolumeClaimTemplate is the spec to describe PVC for the Pravega cache.
	// This field is optional. If no PVC spec, stateful containers will use
	// emptyDir as volume
	// +optional
	CacheVolumeClaimTemplate *v1.PersistentVolumeClaimSpec `json:"cacheVolumeClaimTemplate,omitempty"`

	// LongTermStorage is the configuration of Pravega's tier 2 storage. If no configuration
	// is provided, it will assume that a PersistentVolumeClaim called "pravega-longterm"
	// is present and it will use it as Tier 2
	// +optional
	LongTermStorage *LongTermStorageSpec `json:"longtermStorage"`

	// ControllerServiceAccountName configures the service account used on controller instances.
	// If not specified, Kubernetes will automatically assign the default service account in the namespace
	ControllerServiceAccountName string `json:"controllerServiceAccountName,omitempty"`

	// SegmentStoreServiceAccountName configures the service account used on segment store instances.
	// If not specified, Kubernetes will automatically assign the default service account in the namespace
	SegmentStoreServiceAccountName string `json:"segmentStoreServiceAccountName,omitempty"`

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

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

	// Provides the name of the configmap created by the user to provide additional key-value pairs
	// that need to be configured into the ss pod as environmental variables
	SegmentStoreEnvVars string `json:"segmentStoreEnvVars,omitempty"`

	// Provides the list of env variables that can be passed to segmentStore pods.
	SegmentStoreContainerEnv []v1.EnvVar `json:"segmentStoreContainerEnv,omitempty"`

	// Provides the list of env variables that can be passed to controller pods.
	ControllerEnvVars []v1.EnvVar `json:"controllerEnvVars,omitempty"`

	// SegmentStoreSecret specifies whether or not any secret needs to be configured into the ss pod
	// either as an environment variable or by mounting it to a volume
	// +optional
	SegmentStoreSecret *SegmentStoreSecret `json:"segmentStoreSecret"`

	// Type specifies the service type to achieve external access.
	// Options are "LoadBalancer" and "NodePort".
	// By default, if external access is enabled, it will use "LoadBalancer"
	ControllerExternalServiceType v1.ServiceType `json:"controllerExtServiceType,omitempty"`

	// Annotations to be added to the external service
	// +optional
	ControllerServiceAnnotations map[string]string `json:"controllerSvcAnnotations"`
	// Labels to be added to the Controller pods
	// +optional
	ControllerPodLabels map[string]string `json:"controllerPodLabels"`

	// Annotations to be added to controller pods
	// +optional
	ControllerPodAnnotations map[string]string `json:"controllerPodAnnotations"`

	// Type specifies the service type to achieve external access.
	// Options are "LoadBalancer" and "NodePort".
	// By default, if external access is enabled, it will use "LoadBalancer"
	SegmentStoreExternalServiceType v1.ServiceType `json:"segmentStoreExtServiceType,omitempty"`

	// Annotations to be added to the external service
	// +optional
	SegmentStoreServiceAnnotations map[string]string `json:"segmentStoreSvcAnnotations"`

	// Labels to be added to the SegmentStore pods
	// +optional
	SegmentStorePodLabels map[string]string `json:"segmentStorePodLabels"`

	// Annotations to be added to the SegmentStore pods
	// +optional
	SegmentStorePodAnnotations map[string]string `json:"segmentStorePodAnnotations"`

	// Specifying this IP would ensure we use same IP address for all the ss services
	SegmentStoreLoadBalancerIP string `json:"segmentStoreLoadBalancerIP,omitempty"`

	// SegmentStoreExternalTrafficPolicy defines the ExternalTrafficPolicy it can have cluster or local
	SegmentStoreExternalTrafficPolicy string `json:"segmentStoreExternalTrafficPolicy,omitempty"`

	// SegmentStoreSecurityContext holds security configuration that will be applied to a container
	SegmentStoreSecurityContext *corev1.PodSecurityContext `json:"segmentStoreSecurityContext,omitempty"`

	// ControllerSecurityContext holds security configuration that will be applied to a container
	ControllerSecurityContext *corev1.PodSecurityContext `json:"controllerSecurityContext,omitempty"`

	// The scheduling constraints on Controller pods.
	ControllerPodAffinity *corev1.Affinity `json:"controllerPodAffinity,omitempty"`

	// The scheduling constraints on Segementstore pods.
	SegmentStorePodAffinity *corev1.Affinity `json:"segmentStorePodAffinity,omitempty"`

	// This is used to schedule the timeout value for rollback
	RollbackTimeout int32 `json:"rollbacktimeout,omitempty"`

	// This is used as suffix for controller service name
	ControllerSvcNameSuffix string `json:"controllerSvcNameSuffix,omitempty"`

	// This is used as suffix for segmentstore sts name
	SegmentStoreStsNameSuffix string `json:"segmentStoreStsNameSuffix,omitempty"`

	// This is used as suffix for segmentstore headless service name
	SegmentStoreHeadlessSvcNameSuffix string `json:"segmentStoreHeadlessSvcNameSuffix,omitempty"`

	// InitContainers to be added to controller pods
	ControllerInitContainers []v1.Container `json:"controllerInitContainers,omitempty"`

	// InitContainers to be added to segmentstore pods
	SegmentStoreInitContainers []v1.Container `json:"segmentStoreInitContainers,omitempty"`

	// Details of authplugin to be copied into pravega controller
	AuthImplementations *AuthImplementationSpec `json:"authImplementations,omitempty"`

	// InfluxDB Secret specifies the secret name containing credentials and mount path volume
	// that has to be configured in controller and segmentstore pods
	InfluxDBSecret *InfluxDBSecret `json:"influxDBSecret,omitempty"`

	// ControllerProbes specifies the values for configurable fields of Readiness and Liveness Probes
	// for the controller pods.
	ControllerProbes *Probes `json:"controllerProbes,omitempty"`

	// SegmentStoreProbes specifies the values for configurable fields of Readiness and Liveness Probes
	// for the segmentstore pods.
	SegmentStoreProbes *Probes `json:"segmentStoreProbes,omitempty"`

	// Tolerations for the Controller pods.
	ControllerPodTolerations []corev1.Toleration `json:"controllerPodTolerations,omitempty"`

	// Tolerations for the SegmentStore pods.
	SegmentStorePodTolerations []corev1.Toleration `json:"segmentStorePodTolerations,omitempty"`

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

	// SegmentStoreAdditionalVolumes defines customised volumes to be used in SegmentStore pods
	SegmentStoreAdditionalVolumes []v1.Volume `json:"segmentStoreAdditionalVolumes,omitempty"`
}

PravegaSpec defines the configuration of Pravega

func (*PravegaSpec) DeepCopy

func (in *PravegaSpec) DeepCopy() *PravegaSpec

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

func (*PravegaSpec) DeepCopyInto

func (in *PravegaSpec) DeepCopyInto(out *PravegaSpec)

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
	InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"`
	// +kubebuilder:validation:Minimum=0
	PeriodSeconds int32 `json:"periodSeconds,omitempty"`
	// +kubebuilder:validation:Minimum=0
	FailureThreshold int32 `json:"failureThreshold,omitempty"`
	// +kubebuilder:validation:Minimum=0
	SuccessThreshold int32 `json:"successThreshold,omitempty"`
	// +kubebuilder:validation:Minimum=0
	TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
}

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 {
	ReadinessProbe *Probe `json:"readinessProbe,omitempty"`
	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 SegmentStoreSecret

type SegmentStoreSecret struct {
	// Secret specifies the name of Secret which needs to be configured
	// +optional
	Secret string `json:"secret"`

	// Path to the volume where the secret will be mounted
	// This value is considered only when the secret is provided
	// If this value is provided, the secret is mounted to a Volume
	// else the secret is exposed as an Environment Variable
	// +optional
	MountPath string `json:"mountPath"`
}

SegmentStoreSecret defines the configuration of the secret for the Segment Store

func (*SegmentStoreSecret) DeepCopy

func (in *SegmentStoreSecret) DeepCopy() *SegmentStoreSecret

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

func (*SegmentStoreSecret) DeepCopyInto

func (in *SegmentStoreSecret) DeepCopyInto(out *SegmentStoreSecret)

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

type StaticTLS

type StaticTLS struct {
	ControllerSecret   string `json:"controllerSecret,omitempty"`
	SegmentStoreSecret string `json:"segmentStoreSecret,omitempty"`
	CaBundle           string `json:"caBundle,omitempty"`
}

func (*StaticTLS) DeepCopy

func (in *StaticTLS) DeepCopy() *StaticTLS

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

func (*StaticTLS) DeepCopyInto

func (in *StaticTLS) DeepCopyInto(out *StaticTLS)

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

type TLSPolicy

type TLSPolicy struct {
	// Static TLS means keys/certs are generated by the user and passed to an operator.
	Static *StaticTLS `json:"static,omitempty"`
}

func (*TLSPolicy) DeepCopy

func (in *TLSPolicy) DeepCopy() *TLSPolicy

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

func (*TLSPolicy) DeepCopyInto

func (in *TLSPolicy) DeepCopyInto(out *TLSPolicy)

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

func (*TLSPolicy) IsCaBundlePresent

func (tp *TLSPolicy) IsCaBundlePresent() bool

func (*TLSPolicy) IsSecureController

func (tp *TLSPolicy) IsSecureController() bool

func (*TLSPolicy) IsSecureSegmentStore

func (tp *TLSPolicy) IsSecureSegmentStore() bool

Jump to

Keyboard shortcuts

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