v1alpha1

package
v1.10.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

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

type CassandraCommand string
const (
	CommandCleanup CassandraCommand = "cleanup"
	CommandRebuild CassandraCommand = "rebuild"
)

type CassandraJob

type CassandraJob struct {
	Name string `json:"name"`

	// Command defines what is run against Cassandra pods
	Command CassandraCommand `json:"command"`

	// +optional
	Arguments map[string]string `json:"args,omitempty"`
}

func (*CassandraJob) DeepCopy

func (in *CassandraJob) DeepCopy() *CassandraJob

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

func (*CassandraJob) DeepCopyInto

func (in *CassandraJob) DeepCopyInto(out *CassandraJob)

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

type CassandraTask

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

	Spec   CassandraTaskSpec   `json:"spec,omitempty"`
	Status CassandraTaskStatus `json:"status,omitempty"`
}

+kubebuilder:printcolumn:name="Datacenter",type=string,JSONPath=".spec.datacenter.name",description="Datacenter which the task targets" +kubebuilder:printcolumn:name="Job",type=string,JSONPath=".spec.jobs[0].command",description="The job that is executed" +kubebuilder:printcolumn:name="Scheduled",type="date",JSONPath=".spec.scheduledTime",description="When the execution of the task is allowed at earliest" +kubebuilder:printcolumn:name="Started",type="date",JSONPath=".status.startTime",description="When the execution of the task started" +kubebuilder:printcolumn:name="Completed",type="date",JSONPath=".status.completionTime",description="When the execution of the task finished" CassandraTask is the Schema for the cassandrajobs API

func (*CassandraTask) DeepCopy

func (in *CassandraTask) DeepCopy() *CassandraTask

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

func (*CassandraTask) DeepCopyInto

func (in *CassandraTask) DeepCopyInto(out *CassandraTask)

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

func (*CassandraTask) DeepCopyObject

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

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

type CassandraTaskList

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

CassandraTaskList contains a list of CassandraJob

func (*CassandraTaskList) DeepCopy

func (in *CassandraTaskList) DeepCopy() *CassandraTaskList

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

func (*CassandraTaskList) DeepCopyInto

func (in *CassandraTaskList) DeepCopyInto(out *CassandraTaskList)

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

func (*CassandraTaskList) DeepCopyObject

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

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

type CassandraTaskSpec

type CassandraTaskSpec struct {

	// ScheduledTime indicates the earliest possible time this task is executed. This does not necessarily
	// equal to the time it is actually executed (if other tasks are blocking for example). If not set,
	// the task will be executed immediately.
	// +optional
	ScheduledTime *metav1.Time `json:"scheduledTime,omitempty"`

	// Which datacenter this task is targetting. Note, this must be a datacenter which the current cass-operator
	// can access
	Datacenter corev1.ObjectReference `json:"datacenter,omitempty"`

	// Jobs defines the jobs this task will execute (and their order)
	Jobs []CassandraJob `json:"jobs,omitempty"`

	// RestartPolicy indicates the behavior n case of failure. Default is Never.
	// +optional
	RestartPolicy corev1.RestartPolicy `json:"restartPolicy,omitempty"`

	// TTLSecondsAfterFinished defines how long the completed job will kept before being cleaned up. If set to 0
	// the task will not be cleaned up by the cass-operator. If unset, the default time (86400s) is used.
	// +optional
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`

	// Specifics if this task can be run concurrently with other active tasks. Valid values are:
	// - "Allow": allows multiple Tasks to run concurrently on Cassandra cluster
	// - "Forbid" (default): only a single task is executed at once
	// The "Allow" property is only valid if all the other active Tasks have "Allow" as well.
	// +optional
	ConcurrencyPolicy batchv1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"`
}

CassandraTaskSpec defines the desired state of CassandraTask

func (*CassandraTaskSpec) DeepCopy

func (in *CassandraTaskSpec) DeepCopy() *CassandraTaskSpec

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

func (*CassandraTaskSpec) DeepCopyInto

func (in *CassandraTaskSpec) DeepCopyInto(out *CassandraTaskSpec)

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

type CassandraTaskStatus

type CassandraTaskStatus struct {

	// The latest available observations of an object's current state. When a Job
	// fails, one of the conditions will have type "Failed" and status true. When
	// a Job is suspended, one of the conditions will have type "Suspended" and
	// status true; when the Job is resumed, the status of this condition will
	// become false. When a Job is completed, one of the conditions will have
	// type "Complete" and status true.
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=atomic
	Conditions []JobCondition `json:"conditions,omitempty"`

	// Represents time when the job controller started processing a job. When a
	// Job is created in the suspended state, this field is not set until the
	// first time it is resumed. This field is reset every time a Job is resumed
	// from suspension. It is represented in RFC3339 form and is in UTC.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// Represents time when the job was completed. It is not guaranteed to
	// be set in happens-before order across separate operations.
	// It is represented in RFC3339 form and is in UTC.
	// The completion time is only set when the job finishes successfully.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// The number of actively running pods.
	// +optional
	Active int `json:"active,omitempty"`

	// The number of pods which reached phase Succeeded.
	// +optional
	Succeeded int `json:"succeeded,omitempty"`

	// The number of pods which reached phase Failed.
	// +optional
	Failed int `json:"failed,omitempty"`
}

CassandraTaskStatus defines the observed state of CassandraJob

func (*CassandraTaskStatus) DeepCopy

func (in *CassandraTaskStatus) DeepCopy() *CassandraTaskStatus

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

func (*CassandraTaskStatus) DeepCopyInto

func (in *CassandraTaskStatus) DeepCopyInto(out *CassandraTaskStatus)

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

type JobCondition

type JobCondition struct {
	// Type of job condition, Complete or Failed.
	Type JobConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// Last time the condition was checked.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
	// Last time the condition transit from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// (brief) reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// Human readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty"`
}

func (*JobCondition) DeepCopy

func (in *JobCondition) DeepCopy() *JobCondition

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

func (*JobCondition) DeepCopyInto

func (in *JobCondition) DeepCopyInto(out *JobCondition)

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

type JobConditionType

type JobConditionType string
const (
	// JobComplete means the job has completed its execution.
	JobComplete JobConditionType = "Complete"
	// JobFailed means the job has failed its execution.
	JobFailed JobConditionType = "Failed"
	// JobRunning means the job is currently executing
	JobRunning JobConditionType = "Running"
)

Jump to

Keyboard shortcuts

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