v1beta1

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 50

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=flink.k8s.io

Index

Constants

View Source
const (
	FlinkApplicationKind = "FlinkApplication"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: groupName, Version: version}
)

Functions

func GetMaxRunningJobs added in v0.5.0

func GetMaxRunningJobs(mode DeploymentMode) int32

func IsBlueGreenDeploymentMode added in v0.5.0

func IsBlueGreenDeploymentMode(mode DeploymentMode) bool

func IsRunningPhase

func IsRunningPhase(phase FlinkApplicationPhase) bool

func Kind

func Kind(kind string) schema.GroupKind

GetKind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type DeleteMode

type DeleteMode string
const (
	DeleteModeSavepoint   DeleteMode = "Savepoint"
	DeleteModeForceCancel DeleteMode = "ForceCancel"
	DeleteModeNone        DeleteMode = "None"
)

type DeploymentMode

type DeploymentMode string
const (
	DeploymentModeSingle    DeploymentMode = "Single"
	DeploymentModeDual      DeploymentMode = "Dual"
	DeploymentModeBlueGreen DeploymentMode = "BlueGreen"
)

type EnvironmentConfig

type EnvironmentConfig struct {
	EnvFrom []apiv1.EnvFromSource `json:"envFrom,omitempty"`
	Env     []apiv1.EnvVar        `json:"env,omitempty"`
}

func (*EnvironmentConfig) DeepCopy

func (in *EnvironmentConfig) DeepCopy() *EnvironmentConfig

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

func (*EnvironmentConfig) DeepCopyInto

func (in *EnvironmentConfig) DeepCopyInto(out *EnvironmentConfig)

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

type FlinkApplication

type FlinkApplication struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              FlinkApplicationSpec   `json:"spec"`
	Status            FlinkApplicationStatus `json:"status,omitempty"`
}

+genclient +genclient:noStatus +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:defaulter-gen=true

func (*FlinkApplication) DeepCopy

func (in *FlinkApplication) DeepCopy() *FlinkApplication

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

func (*FlinkApplication) DeepCopyInto

func (in *FlinkApplication) DeepCopyInto(out *FlinkApplication)

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

func (*FlinkApplication) DeepCopyObject

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

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

type FlinkApplicationError added in v0.3.0

type FlinkApplicationError struct {
	AppError            string       `json:"appError,omitempty"`
	Method              FlinkMethod  `json:"method,omitempty"`
	ErrorCode           string       `json:"errorCode,omitempty"`
	IsRetryable         bool         `json:"isRetryable,omitempty"`
	IsFailFast          bool         `json:"isFailFast,omitempty"`
	MaxRetries          int32        `json:"maxRetries,omitempty"`
	LastErrorUpdateTime *metav1.Time `json:"lastErrorUpdateTime,omitempty"`
}

FlinkApplicationError implements the error interface to make error handling more structured

func (*FlinkApplicationError) DeepCopy added in v0.3.0

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

func (*FlinkApplicationError) DeepCopyInto added in v0.3.0

func (in *FlinkApplicationError) DeepCopyInto(out *FlinkApplicationError)

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

func (*FlinkApplicationError) Error added in v0.3.0

func (f *FlinkApplicationError) Error() string

type FlinkApplicationList

type FlinkApplicationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []FlinkApplication `json:"items"`
}

func (*FlinkApplicationList) DeepCopy

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

func (*FlinkApplicationList) DeepCopyInto

func (in *FlinkApplicationList) DeepCopyInto(out *FlinkApplicationList)

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

func (*FlinkApplicationList) DeepCopyObject

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

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

type FlinkApplicationPhase

type FlinkApplicationPhase string
const (
	FlinkApplicationNew             FlinkApplicationPhase = ""
	FlinkApplicationUpdating        FlinkApplicationPhase = "Updating"
	FlinkApplicationRescaling       FlinkApplicationPhase = "Rescaling"
	FlinkApplicationClusterStarting FlinkApplicationPhase = "ClusterStarting"
	FlinkApplicationSubmittingJob   FlinkApplicationPhase = "SubmittingJob"
	FlinkApplicationRunning         FlinkApplicationPhase = "Running"
	FlinkApplicationSavepointing    FlinkApplicationPhase = "Savepointing"
	FlinkApplicationCancelling      FlinkApplicationPhase = "Cancelling"
	FlinkApplicationDeleting        FlinkApplicationPhase = "Deleting"
	FlinkApplicationRecovering      FlinkApplicationPhase = "Recovering"
	FlinkApplicationRollingBackJob  FlinkApplicationPhase = "RollingBackJob"
	FlinkApplicationDeployFailed    FlinkApplicationPhase = "DeployFailed"
	FlinkApplicationDualRunning     FlinkApplicationPhase = "DualRunning"
)

As you add more ApplicationPhase please add it to FlinkApplicationPhases list

func (FlinkApplicationPhase) VerboseString

func (p FlinkApplicationPhase) VerboseString() string

type FlinkApplicationSpec

type FlinkApplicationSpec struct {
	Image              string                       `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"`
	ImagePullPolicy    apiv1.PullPolicy             `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"`
	ImagePullSecrets   []apiv1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"`
	ServiceAccountName string                       `json:"serviceAccountName,omitempty"`
	SecurityContext    *apiv1.PodSecurityContext    `json:"securityContext,omitempty"`
	FlinkConfig        FlinkConfig                  `json:"flinkConfig"`
	FlinkVersion       string                       `json:"flinkVersion"`
	TaskManagerConfig  TaskManagerConfig            `json:"taskManagerConfig,omitempty"`
	JobManagerConfig   JobManagerConfig             `json:"jobManagerConfig,omitempty"`
	JarName            string                       `json:"jarName"`
	Parallelism        int32                        `json:"parallelism"`
	EntryClass         string                       `json:"entryClass,omitempty"`
	ProgramArgs        string                       `json:"programArgs,omitempty"`
	// Deprecated: use SavepointPath instead
	SavepointInfo                  SavepointInfo       `json:"savepointInfo,omitempty"`
	SavepointPath                  string              `json:"savepointPath,omitempty"`
	SavepointDisabled              bool                `json:"savepointDisabled"`
	DeploymentMode                 DeploymentMode      `json:"deploymentMode,omitempty"`
	RPCPort                        *int32              `json:"rpcPort,omitempty"`
	BlobPort                       *int32              `json:"blobPort,omitempty"`
	QueryPort                      *int32              `json:"queryPort,omitempty"`
	UIPort                         *int32              `json:"uiPort,omitempty"`
	MetricsQueryPort               *int32              `json:"metricsQueryPort,omitempty"`
	Volumes                        []apiv1.Volume      `json:"volumes,omitempty"`
	VolumeMounts                   []apiv1.VolumeMount `json:"volumeMounts,omitempty"`
	RestartNonce                   string              `json:"restartNonce"`
	DeleteMode                     DeleteMode          `json:"deleteMode,omitempty"`
	ScaleMode                      ScaleMode           `json:"scaleMode,omitempty"`
	AllowNonRestoredState          bool                `json:"allowNonRestoredState,omitempty"`
	ForceRollback                  bool                `json:"forceRollback"`
	MaxCheckpointRestoreAgeSeconds *int32              `json:"maxCheckpointRestoreAgeSeconds,omitempty"`
	TearDownVersionHash            string              `json:"tearDownVersionHash,omitempty"`
	FallbackWithoutState           bool                `json:"fallbackWithoutState"`
}

func (*FlinkApplicationSpec) DeepCopy

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

func (*FlinkApplicationSpec) DeepCopyInto

func (in *FlinkApplicationSpec) DeepCopyInto(out *FlinkApplicationSpec)

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

type FlinkApplicationStatus

type FlinkApplicationStatus struct {
	Phase                  FlinkApplicationPhase           `json:"phase"`
	StartedAt              *metav1.Time                    `json:"startedAt,omitempty"`
	LastUpdatedAt          *metav1.Time                    `json:"lastUpdatedAt,omitempty"`
	Reason                 string                          `json:"reason,omitempty"`
	DeployVersion          FlinkApplicationVersion         `json:"deployVersion,omitempty"`
	UpdatingVersion        FlinkApplicationVersion         `json:"updatingVersion,omitempty"`
	ClusterStatus          FlinkClusterStatus              `json:"clusterStatus,omitempty"`
	JobStatus              FlinkJobStatus                  `json:"jobStatus,omitempty"`
	VersionStatuses        []FlinkApplicationVersionStatus `json:"versionStatuses,omitempty"`
	FailedDeployHash       string                          `json:"failedDeployHash,omitempty"`
	RollbackHash           string                          `json:"rollbackHash,omitempty"`
	DeployHash             string                          `json:"deployHash"`
	UpdatingHash           string                          `json:"updatingHash,omitempty"`
	TeardownHash           string                          `json:"teardownHash,omitempty"`
	InPlaceUpdatedFromHash string                          `json:"inPlaceUpdatedFromHash,omitempty"`
	SavepointTriggerID     string                          `json:"savepointTriggerId,omitempty"`
	SavepointPath          string                          `json:"savepointPath,omitempty"`
	RetryCount             int32                           `json:"retryCount,omitempty"`
	LastSeenError          *FlinkApplicationError          `json:"lastSeenError,omitempty"`
	// We store deployment mode in the status to prevent incompatible migrations from
	// Dual --> BlueGreen and BlueGreen --> Dual
	DeploymentMode DeploymentMode `json:"deploymentMode,omitempty"`
}

func (*FlinkApplicationStatus) DeepCopy

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

func (*FlinkApplicationStatus) DeepCopyInto

func (in *FlinkApplicationStatus) DeepCopyInto(out *FlinkApplicationStatus)

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

func (*FlinkApplicationStatus) GetPhase

func (*FlinkApplicationStatus) TouchResource

func (in *FlinkApplicationStatus) TouchResource(reason string)

func (*FlinkApplicationStatus) UpdatePhase

func (in *FlinkApplicationStatus) UpdatePhase(phase FlinkApplicationPhase, reason string)

type FlinkApplicationVersion added in v0.5.0

type FlinkApplicationVersion string
const (
	BlueFlinkApplication  FlinkApplicationVersion = "blue"
	GreenFlinkApplication FlinkApplicationVersion = "green"
)

type FlinkApplicationVersionStatus added in v0.5.0

type FlinkApplicationVersionStatus struct {
	Version       FlinkApplicationVersion `json:"appVersion,omitempty"`
	VersionHash   string                  `json:"versionHash,omitempty"`
	ClusterStatus FlinkClusterStatus      `json:"clusterStatus,omitempty"`
	JobStatus     FlinkJobStatus          `json:"jobStatus,omitempty"`
}

func (*FlinkApplicationVersionStatus) DeepCopy added in v0.5.0

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

func (*FlinkApplicationVersionStatus) DeepCopyInto added in v0.5.0

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

type FlinkClusterStatus

type FlinkClusterStatus struct {
	ClusterOverviewURL   string       `json:"clusterOverviewURL,omitempty"`
	Health               HealthStatus `json:"health,omitempty"`
	NumberOfTaskManagers int32        `json:"numberOfTaskManagers,omitempty"`
	HealthyTaskManagers  int32        `json:"healthyTaskManagers,omitempty"`
	NumberOfTaskSlots    int32        `json:"numberOfTaskSlots,omitempty"`
	AvailableTaskSlots   int32        `json:"availableTaskSlots"`
}

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 FlinkConfig

type FlinkConfig map[string]interface{}

func (*FlinkConfig) DeepCopy

func (in *FlinkConfig) DeepCopy() *FlinkConfig

func (*FlinkConfig) DeepCopyInto

func (in *FlinkConfig) DeepCopyInto(out *FlinkConfig)

Workaround for https://github.com/kubernetes-sigs/kubebuilder/issues/528

type FlinkJobStatus

type FlinkJobStatus struct {
	JobOverviewURL string       `json:"jobOverviewURL,omitempty"`
	JobID          string       `json:"jobID,omitempty"`
	Health         HealthStatus `json:"health,omitempty"`
	State          JobState     `json:"state,omitempty"`

	JarName               string `json:"jarName"`
	Parallelism           int32  `json:"parallelism"`
	EntryClass            string `json:"entryClass,omitempty"`
	ProgramArgs           string `json:"programArgs,omitempty"`
	AllowNonRestoredState bool   `json:"allowNonRestoredState,omitempty"`

	StartTime                *metav1.Time `json:"startTime,omitempty"`
	JobRestartCount          int32        `json:"jobRestartCount,omitempty"`
	CompletedCheckpointCount int32        `json:"completedCheckpointCount,omitempty"`
	FailedCheckpointCount    int32        `json:"failedCheckpointCount,omitempty"`
	RestorePath              string       `json:"restorePath,omitempty"`
	RestoreTime              *metav1.Time `json:"restoreTime,omitempty"`
	LastFailingTime          *metav1.Time `json:"lastFailingTime,omitempty"`

	LastCheckpointPath string       `json:"lastCheckpoint,omitempty"`
	LastCheckpointTime *metav1.Time `json:"lastCheckpointTime,omitempty"`

	RunningTasks int32 `json:"runningTasks,omitempty"`
	TotalTasks   int32 `json:"totalTasks,omitempty"`
}

func (*FlinkJobStatus) DeepCopy

func (in *FlinkJobStatus) DeepCopy() *FlinkJobStatus

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

func (*FlinkJobStatus) DeepCopyInto

func (in *FlinkJobStatus) DeepCopyInto(out *FlinkJobStatus)

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

type FlinkMethod added in v0.3.0

type FlinkMethod string
const (
	CancelJobWithSavepoint FlinkMethod = "CancelJobWithSavepoint"
	ForceCancelJob         FlinkMethod = "ForceCancelJob"
	SubmitJob              FlinkMethod = "SubmitJob"
	CheckSavepointStatus   FlinkMethod = "CheckSavepointStatus"
	GetJobs                FlinkMethod = "GetJobs"
	GetClusterOverview     FlinkMethod = "GetClusterOverview"
	GetLatestCheckpoint    FlinkMethod = "GetLatestCheckpoint"
	GetJobConfig           FlinkMethod = "GetJobConfig"
	GetTaskManagers        FlinkMethod = "GetTaskManagers"
	GetCheckpointCounts    FlinkMethod = "GetCheckpointCounts"
	GetJobOverview         FlinkMethod = "GetJobOverview"
	SavepointJob           FlinkMethod = "SavepointJob"
)

type HealthStatus

type HealthStatus string
const (
	Green  HealthStatus = "Green"
	Yellow HealthStatus = "Yellow"
	Red    HealthStatus = "Red"
)

type JobManagerConfig

type JobManagerConfig struct {
	Resources             *apiv1.ResourceRequirements `json:"resources,omitempty"`
	EnvConfig             EnvironmentConfig           `json:"envConfig"`
	Replicas              *int32                      `json:"replicas,omitempty"`
	OffHeapMemoryFraction *float64                    `json:"offHeapMemoryFraction,omitempty"`
	SystemMemoryFraction  *float64                    `json:"systemMemoryFraction,omitempty"`
	NodeSelector          map[string]string           `json:"nodeSelector,omitempty"`
	Tolerations           []apiv1.Toleration          `json:"tolerations,omitempty"`
	Affinity              *apiv1.Affinity             `json:"affinity,omitempty"`
}

func (*JobManagerConfig) DeepCopy

func (in *JobManagerConfig) DeepCopy() *JobManagerConfig

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

func (*JobManagerConfig) DeepCopyInto

func (in *JobManagerConfig) DeepCopyInto(out *JobManagerConfig)

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

type JobState

type JobState string
const (
	Created     JobState = "CREATED"
	Running     JobState = "RUNNING"
	Failing     JobState = "FAILING"
	Failed      JobState = "FAILED"
	Cancelling  JobState = "CANCELLING"
	Canceled    JobState = "CANCELED"
	Finished    JobState = "FINISHED"
	Restarting  JobState = "RESTARTING"
	Suspended   JobState = "SUSPENDED"
	Reconciling JobState = "RECONCILING"
)

type SavepointInfo

type SavepointInfo struct {
	SavepointLocation string `json:"savepointLocation,omitempty"`
}

func (*SavepointInfo) DeepCopy

func (in *SavepointInfo) DeepCopy() *SavepointInfo

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

func (*SavepointInfo) DeepCopyInto

func (in *SavepointInfo) DeepCopyInto(out *SavepointInfo)

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

type ScaleMode added in v0.6.0

type ScaleMode string
const (
	ScaleModeNewCluster ScaleMode = "NewCluster"
	ScaleModeInPlace    ScaleMode = "InPlace"
)

type TaskManagerConfig

type TaskManagerConfig struct {
	Resources             *apiv1.ResourceRequirements `json:"resources,omitempty"`
	EnvConfig             EnvironmentConfig           `json:"envConfig"`
	TaskSlots             *int32                      `json:"taskSlots,omitempty"`
	OffHeapMemoryFraction *float64                    `json:"offHeapMemoryFraction,omitempty"`
	SystemMemoryFraction  *float64                    `json:"systemMemoryFraction,omitempty"`
	NodeSelector          map[string]string           `json:"nodeSelector,omitempty"`
	Tolerations           []apiv1.Toleration          `json:"tolerations,omitempty"`
	Affinity              *apiv1.Affinity             `json:"affinity,omitempty"`
}

func (*TaskManagerConfig) DeepCopy

func (in *TaskManagerConfig) DeepCopy() *TaskManagerConfig

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

func (*TaskManagerConfig) DeepCopyInto

func (in *TaskManagerConfig) DeepCopyInto(out *TaskManagerConfig)

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