v1alpha1

package
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the flinkoperator v1alpha1 API group +kubebuilder:object:generate=true +groupName=flinkoperator.k8s.io

Index

Constants

View Source
const (
	ClusterStateCreating         = "Creating"
	ClusterStateRunning          = "Running"
	ClusterStateReconciling      = "Reconciling"
	ClusterStateStopping         = "Stopping"
	ClusterStatePartiallyStopped = "PartiallyStopped"
	ClusterStateStopped          = "Stopped"
)

ClusterState defines states for a cluster.

View Source
const (
	ComponentStateNotReady = "NotReady"
	ComponentStateReady    = "Ready"
	ComponentStateDeleted  = "Deleted"
)

ComponentState defines states for a cluster component.

View Source
const (
	JobStatePending   = "Pending"
	JobStateRunning   = "Running"
	JobStateSucceeded = "Succeeded"
	JobStateFailed    = "Failed"
	JobStateCancelled = "Cancelled"
	JobStateUnknown   = "Unknown"
)

JobState defines states for a Flink job.

View Source
const (
	AccessScopeCluster  = "Cluster"
	AccessScopeVPC      = "VPC"
	AccessScopeExternal = "External"
)

AccessScope defines the access scope of JobManager service.

View Source
const (
	// JobRestartPolicyNever - never restarts a failed job.
	JobRestartPolicyNever = "Never"

	// JobRestartPolicyFromSavepointOnFailure - restart the job from the latest
	// savepoint if available, otherwise do not restart.
	JobRestartPolicyFromSavepointOnFailure = "FromSavepointOnFailure"
)
View Source
const (
	// CleanupActionKeepCluster - keep the entire cluster.
	CleanupActionKeepCluster = "KeepCluster"
	// CleanupActionDeleteCluster - delete the entire cluster.
	CleanupActionDeleteCluster = "DeleteCluster"
	// CleanupActionDeleteTaskManager - delete task manager, keep job manager.
	CleanupActionDeleteTaskManager = "DeleteTaskManager"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "flinkoperator.k8s.io", 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 CleanupAction

type CleanupAction string

CleanupAction defines the action to take after job finishes.

type CleanupPolicy

type CleanupPolicy struct {
	// Action to take after job succeeds.
	AfterJobSucceeds CleanupAction `json:"afterJobSucceeds,omitempty"`
	// Action to take after job fails.
	AfterJobFails CleanupAction `json:"afterJobFails,omitempty"`
	// Action to take after job is cancelled.
	AfterJobCancelled CleanupAction `json:"afterJobCancelled,omitempty"`
}

CleanupPolicy defines the action to take after job finishes.

func (*CleanupPolicy) DeepCopy

func (in *CleanupPolicy) DeepCopy() *CleanupPolicy

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

func (*CleanupPolicy) DeepCopyInto

func (in *CleanupPolicy) DeepCopyInto(out *CleanupPolicy)

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

type FlinkCluster

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

	Spec   FlinkClusterSpec   `json:"spec"`
	Status FlinkClusterStatus `json:"status,omitempty"`
}

FlinkCluster is the Schema for the flinkclusters API +kubebuilder:subresource:status

func (*FlinkCluster) DeepCopy

func (in *FlinkCluster) DeepCopy() *FlinkCluster

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

func (*FlinkCluster) DeepCopyInto

func (in *FlinkCluster) DeepCopyInto(out *FlinkCluster)

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

func (*FlinkCluster) DeepCopyObject

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

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

func (*FlinkCluster) Default

func (cluster *FlinkCluster) Default()

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

func (*FlinkCluster) SetupWebhookWithManager

func (cluster *FlinkCluster) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager adds webhook for FlinkCluster.

func (*FlinkCluster) ValidateCreate

func (cluster *FlinkCluster) ValidateCreate() error

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

func (*FlinkCluster) ValidateDelete

func (cluster *FlinkCluster) ValidateDelete() error

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

func (*FlinkCluster) ValidateUpdate

func (cluster *FlinkCluster) ValidateUpdate(old runtime.Object) error

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

type FlinkClusterComponentState

type FlinkClusterComponentState struct {
	// The resource name of the component.
	Name string `json:"name"`

	// The state of the component.
	State string `json:"state"`
}

FlinkClusterComponentState defines the observed state of a component of a FlinkCluster.

func (*FlinkClusterComponentState) DeepCopy

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

func (*FlinkClusterComponentState) DeepCopyInto

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

type FlinkClusterComponentsStatus

type FlinkClusterComponentsStatus struct {
	// The state of configMap.
	ConfigMap FlinkClusterComponentState `json:"configMap"`

	// The state of JobManager deployment.
	JobManagerDeployment FlinkClusterComponentState `json:"jobManagerDeployment"`

	// The state of JobManager service.
	JobManagerService FlinkClusterComponentState `json:"jobManagerService"`

	// The state of JobManager ingress.
	JobManagerIngress *JobManagerIngressStatus `json:"jobManagerIngress,omitempty"`

	// The state of TaskManager deployment.
	TaskManagerDeployment FlinkClusterComponentState `json:"taskManagerDeployment"`

	// The status of the job, available only when JobSpec is provided.
	Job *JobStatus `json:"job,omitempty"`
}

FlinkClusterComponentsStatus defines the observed status of the components of a FlinkCluster.

func (*FlinkClusterComponentsStatus) DeepCopy

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

func (*FlinkClusterComponentsStatus) DeepCopyInto

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

type FlinkClusterList

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

FlinkClusterList contains a list of FlinkCluster

func (*FlinkClusterList) DeepCopy

func (in *FlinkClusterList) DeepCopy() *FlinkClusterList

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

func (*FlinkClusterList) DeepCopyInto

func (in *FlinkClusterList) DeepCopyInto(out *FlinkClusterList)

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

func (*FlinkClusterList) DeepCopyObject

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

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

type FlinkClusterSpec

type FlinkClusterSpec struct {
	// Flink image spec for the cluster's components.
	Image ImageSpec `json:"image"`

	// Flink JobManager spec.
	JobManager JobManagerSpec `json:"jobManager"`

	// Flink TaskManager spec.
	TaskManager TaskManagerSpec `json:"taskManager"`

	// (Optional) Job spec. If specified, this cluster is an ephemeral Job
	// Cluster, which will be automatically terminated after the job finishes;
	// otherwise, it is a long-running Session Cluster.
	Job *JobSpec `json:"job,omitempty"`

	// Environment variables shared by all JobManager, TaskManager and job
	// containers.
	EnvVars []corev1.EnvVar `json:"envVars,omitempty"`

	// Flink properties which are appened to flink-conf.yaml.
	FlinkProperties map[string]string `json:"flinkProperties,omitempty"`

	// Config for Hadoop.
	HadoopConfig *HadoopConfig `json:"hadoopConfig,omitempty"`

	// Config for GCP.
	GCPConfig *GCPConfig `json:"gcpConfig,omitempty"`
}

FlinkClusterSpec defines the desired state of FlinkCluster

func (*FlinkClusterSpec) DeepCopy

func (in *FlinkClusterSpec) DeepCopy() *FlinkClusterSpec

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

func (*FlinkClusterSpec) DeepCopyInto

func (in *FlinkClusterSpec) DeepCopyInto(out *FlinkClusterSpec)

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

type FlinkClusterStatus

type FlinkClusterStatus struct {

	// The overall state of the Flink cluster.
	State string `json:"state"`

	// The status of the components.
	Components FlinkClusterComponentsStatus `json:"components"`

	// Last update timestamp for this status.
	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
}

FlinkClusterStatus defines the observed state of FlinkCluster

func (*FlinkClusterStatus) DeepCopy

func (in *FlinkClusterStatus) DeepCopy() *FlinkClusterStatus

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

func (*FlinkClusterStatus) DeepCopyInto

func (in *FlinkClusterStatus) DeepCopyInto(out *FlinkClusterStatus)

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

type GCPConfig

type GCPConfig struct {
	// GCP service account.
	ServiceAccount *GCPServiceAccount `json:"serviceAccount,omitempty"`
}

GCPConfig defines configs for GCP.

func (*GCPConfig) DeepCopy

func (in *GCPConfig) DeepCopy() *GCPConfig

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

func (*GCPConfig) DeepCopyInto

func (in *GCPConfig) DeepCopyInto(out *GCPConfig)

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

type GCPServiceAccount

type GCPServiceAccount struct {
	// The name of the Secret holding the GCP service account key file.
	// The Secret must be in the same namespace as the FlinkCluster.
	SecretName string `json:"secretName,omitempty"`

	// The name of the service account key file.
	KeyFile string `json:"keyFile,omitempty"`

	// The path where to mount the Volume of the Secret.
	MountPath string `json:"mountPath,omitempty"`
}

GCPServiceAccount defines the config about GCP service account.

func (*GCPServiceAccount) DeepCopy

func (in *GCPServiceAccount) DeepCopy() *GCPServiceAccount

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

func (*GCPServiceAccount) DeepCopyInto

func (in *GCPServiceAccount) DeepCopyInto(out *GCPServiceAccount)

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

type HadoopConfig

type HadoopConfig struct {
	// The name of the ConfigMap which contains the Hadoop config files.
	// The ConfigMap must be in the same namespace as the FlinkCluster.
	ConfigMapName string `json:"configMapName,omitempty"`

	// The path where to mount the Volume of the ConfigMap.
	MountPath string `json:"mountPath,omitempty"`
}

HadoopConfig defines configs for Hadoop.

func (*HadoopConfig) DeepCopy

func (in *HadoopConfig) DeepCopy() *HadoopConfig

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

func (*HadoopConfig) DeepCopyInto

func (in *HadoopConfig) DeepCopyInto(out *HadoopConfig)

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

type ImageSpec

type ImageSpec struct {
	// Flink image name.
	Name string `json:"name"`

	// Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always
	// if :latest tag is specified, or IfNotPresent otherwise.
	PullPolicy corev1.PullPolicy `json:"pullPolicy,omitempty"`

	// Secrets for image pull.
	PullSecrets []corev1.LocalObjectReference `json:"pullSecrets,omitempty"`
}

ImageSpec defines Flink image of JobManager and TaskManager containers.

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 JobManagerIngressSpec

type JobManagerIngressSpec struct {
	// Ingress host format. ex) {{$clusterName}}.example.com
	HostFormat *string `json:"hostFormat,omitempty"`

	// Ingress annotations.
	Annotations map[string]string `json:"annotations,omitempty"`

	// TLS use.
	UseTLS *bool `json:"useTls,omitempty"`

	// TLS secret name.
	TLSSecretName *string `json:"tlsSecretName,omitempty"`
}

JobManagerIngressSpec defines ingress of JobManager

func (*JobManagerIngressSpec) DeepCopy

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

func (*JobManagerIngressSpec) DeepCopyInto

func (in *JobManagerIngressSpec) DeepCopyInto(out *JobManagerIngressSpec)

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

type JobManagerIngressStatus

type JobManagerIngressStatus struct {
	// The name of the Kubernetes ingress resource.
	Name string `json:"name"`

	// The state of the component.
	State string `json:"state"`

	// The URLs of ingress.
	URLs []string `json:"urls,omitempty"`
}

JobManagerIngressStatus defines the status of a JobManager ingress.

func (*JobManagerIngressStatus) DeepCopy

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

func (*JobManagerIngressStatus) DeepCopyInto

func (in *JobManagerIngressStatus) DeepCopyInto(out *JobManagerIngressStatus)

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

type JobManagerPorts

type JobManagerPorts struct {
	// RPC port, default: 6123.
	RPC *int32 `json:"rpc,omitempty"`

	// Blob port, default: 6124.
	Blob *int32 `json:"blob,omitempty"`

	// Query port, default: 6125.
	Query *int32 `json:"query,omitempty"`

	// UI port, default: 8081.
	UI *int32 `json:"ui,omitempty"`
}

JobManagerPorts defines ports of JobManager.

func (*JobManagerPorts) DeepCopy

func (in *JobManagerPorts) DeepCopy() *JobManagerPorts

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

func (*JobManagerPorts) DeepCopyInto

func (in *JobManagerPorts) DeepCopyInto(out *JobManagerPorts)

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

type JobManagerSpec

type JobManagerSpec struct {
	// The number of replicas.
	Replicas *int32 `json:"replicas,omitempty"`

	// Access scope, enum("Cluster", "VPC", "External").
	AccessScope string `json:"accessScope"`

	// (Optional) Ingress.
	Ingress *JobManagerIngressSpec `json:"ingress,omitempty"`

	// Ports.
	Ports JobManagerPorts `json:"ports,omitempty"`

	// Compute resources required by each JobManager container.
	// If omitted, a default value will be used.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Percentage of off-heap memory in containers, as a safety margin to avoid OOM kill, default: 25
	MemoryOffHeapRatio *int32 `json:"memoryOffHeapRatio,omitempty"`

	// Minimum amount of off-heap memory in containers, as a safety margin to avoid OOM kill, default: 600M
	// You can express this value like 600M, 572Mi and 600e6
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory
	MemoryOffHeapMin resource.Quantity `json:"memoryOffHeapMin,omitempty"`

	// Volumes in the JobManager pod.
	Volumes []corev1.Volume `json:"volumes,omitempty"`

	// Volume mounts in the JobManager container.
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`

	// Selector which must match a node's labels for the JobManager pod to be
	// scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

JobManagerSpec defines properties of JobManager.

func (*JobManagerSpec) DeepCopy

func (in *JobManagerSpec) DeepCopy() *JobManagerSpec

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

func (*JobManagerSpec) DeepCopyInto

func (in *JobManagerSpec) DeepCopyInto(out *JobManagerSpec)

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

type JobRestartPolicy

type JobRestartPolicy = string

JobRestartPolicy defines the restart policy when a job fails.

type JobSpec

type JobSpec struct {
	// JAR file of the job.
	JarFile string `json:"jarFile"`

	// Fully qualified Java class name of the job.
	ClassName *string `json:"className,omitempty"`

	// Args of the job.
	Args []string `json:"args,omitempty"`

	// FromSavepoint where to restore the job from (e.g., gs://my-savepoint/1234).
	FromSavepoint *string `json:"fromSavepoint,omitempty"`

	// Allow non-restored state, default: false.
	AllowNonRestoredState *bool `json:"allowNonRestoredState,omitempty"`

	// Savepoints dir where to store savepoints of the job.
	SavepointsDir *string `json:"savepointsDir,omitempty"`

	// Automatically take a savepoint to the `savepointsDir` every n seconds.
	AutoSavepointSeconds *int32 `json:"autoSavepointSeconds,omitempty"`

	// Update this field to `jobStatus.savepointGeneration + 1` for a running job
	// cluster to trigger a new savepoint to `savepointsDir` on demand.
	SavepointGeneration int32 `json:"savepointGeneration,omitempty"`

	// Job parallelism, default: 1.
	Parallelism *int32 `json:"parallelism,omitempty"`

	// No logging output to STDOUT, default: false.
	NoLoggingToStdout *bool `json:"noLoggingToStdout,omitempty"`

	// Volumes in the Job pod.
	// More info: https://kubernetes.io/docs/concepts/storage/volumes/
	Volumes []corev1.Volume `json:"volumes,omitempty"`

	// Volume mounts in the Job container.
	// More info: https://kubernetes.io/docs/concepts/storage/volumes/
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`

	// Init containers of the Job pod. A typical use case could be using an init
	// container to download a remote job jar to a local path which is
	// referenced by the `jarFile` property.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
	InitContainers []corev1.Container `json:"initContainers,omitempty"`

	// Restart policy when the job fails, "Never" or "FromSavepointOnFailure",
	// default: "Never".
	//
	// "Never" means the operator will never try to restart a failed job, manual
	// cleanup and restart is required.
	//
	// "FromSavepointOnFailure" means the operator will try to restart the failed
	// job from the savepoint recorded in the job status if available; otherwise,
	// the job will stay in failed state. This option is usually used together
	// with `autoSavepointSeconds` and `savepointsDir`.
	RestartPolicy *JobRestartPolicy `json:"restartPolicy"`

	// The action to take after job finishes.
	CleanupPolicy *CleanupPolicy `json:"cleanupPolicy,omitempty"`

	// Request the job to be cancelled. Only applies to running jobs. If
	// `savePointsDir` is provided, a savepoint will be taken before stopping the
	// job.
	CancelRequested *bool `json:"cancelRequested,omitempty"`
}

JobSpec defines properties of a Flink job.

func (*JobSpec) DeepCopy

func (in *JobSpec) DeepCopy() *JobSpec

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

func (*JobSpec) DeepCopyInto

func (in *JobSpec) DeepCopyInto(out *JobSpec)

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

type JobStatus

type JobStatus struct {
	// The name of the Kubernetes job resource.
	Name string `json:"name"`

	// The ID of the Flink job.
	ID string `json:"id"`

	// The state of the Kubernetes job.
	State string `json:"state"`

	// The actual savepoint from which this job started.
	// In case of restart, it might be different from the savepoint in the job
	// spec.
	FromSavepoint string `json:"fromSavepoint,omitempty"`

	// The generation of the savepoint in `savepointsDir` taken by the operator.
	// The value starts from 0 when there is no savepoint and increases by 1 for
	// each successful savepoint.
	SavepointGeneration int32 `json:"savepointGeneration,omitempty"`

	// Savepoint location.
	SavepointLocation string `json:"savepointLocation,omitempty"`

	// Last savepoint trigger ID.
	LastSavepointTriggerID string `json:"lastSavepointTriggerID,omitempty"`

	// Last successful or failed savepoint operation timestamp.
	LastSavepointTime string `json:"lastSavepointTime,omitempty"`

	// The number of restarts.
	RestartCount int32 `json:"restartCount,omitempty"`
}

JobStatus defines the status of a job.

func (*JobStatus) DeepCopy

func (in *JobStatus) DeepCopy() *JobStatus

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

func (*JobStatus) DeepCopyInto

func (in *JobStatus) DeepCopyInto(out *JobStatus)

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

type TaskManagerPorts

type TaskManagerPorts struct {
	// Data port, default: 6121.
	Data *int32 `json:"data,omitempty"`

	// RPC port, default: 6122.
	RPC *int32 `json:"rpc,omitempty"`

	// Query port.
	Query *int32 `json:"query,omitempty"`
}

TaskManagerPorts defines ports of TaskManager.

func (*TaskManagerPorts) DeepCopy

func (in *TaskManagerPorts) DeepCopy() *TaskManagerPorts

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

func (*TaskManagerPorts) DeepCopyInto

func (in *TaskManagerPorts) DeepCopyInto(out *TaskManagerPorts)

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

type TaskManagerSpec

type TaskManagerSpec struct {
	// The number of replicas.
	Replicas int32 `json:"replicas"`

	// Ports.
	Ports TaskManagerPorts `json:"ports,omitempty"`

	// Compute resources required by each TaskManager container.
	// If omitted, a default value will be used.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Percentage of off-heap memory in containers, as a safety margin to avoid OOM kill, default: 25
	MemoryOffHeapRatio *int32 `json:"memoryOffHeapRatio,omitempty"`

	// Minimum amount of off-heap memory in containers, as a safety margin to avoid OOM kill, default: 600M
	// You can express this value like 600M, 572Mi and 600e6
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory
	MemoryOffHeapMin resource.Quantity `json:"memoryOffHeapMin,omitempty"`

	// Volumes in the TaskManager pods.
	// More info: https://kubernetes.io/docs/concepts/storage/volumes/
	Volumes []corev1.Volume `json:"volumes,omitempty"`

	// Volume mounts in the TaskManager containers.
	// More info: https://kubernetes.io/docs/concepts/storage/volumes/
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`

	// Selector which must match a node's labels for the TaskManager pod to be
	// scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Sidecar containers running alongside with the TaskManager container in the
	// pod.
	Sidecars []corev1.Container `json:"sidecars,omitempty"`
}

TaskManagerSpec defines properties of TaskManager.

func (*TaskManagerSpec) DeepCopy

func (in *TaskManagerSpec) DeepCopy() *TaskManagerSpec

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

func (*TaskManagerSpec) DeepCopyInto

func (in *TaskManagerSpec) DeepCopyInto(out *TaskManagerSpec)

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

type Validator

type Validator struct{}

Validator validates CUD requests for the CR.

func (*Validator) DeepCopy

func (in *Validator) DeepCopy() *Validator

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

func (*Validator) DeepCopyInto

func (in *Validator) DeepCopyInto(out *Validator)

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

func (*Validator) ValidateCreate

func (v *Validator) ValidateCreate(cluster *FlinkCluster) error

ValidateCreate validates create request.

func (*Validator) ValidateUpdate

func (v *Validator) ValidateUpdate(old *FlinkCluster, new *FlinkCluster) error

ValidateUpdate validates update request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL