Documentation ¶
Index ¶
- Constants
- func JobStatusToPodAnnotations(taskId string, annotations map[string]string, jobStatus JobStatus) error
- func SetCondition(task *api.CassandraTask, condition api.JobConditionType, ...) bool
- type AsyncTaskExecutorFunc
- type CassandraTaskReconciler
- type JobStatus
- type PodFilterFunc
- type ProcessFunc
- type SyncTaskExecutorFunc
- type TaskConfiguration
- type ValidatorFunc
Constants ¶
View Source
const (
// PodJobAnnotationPrefix defines the prefix key for a job data (json serialized) in the annotations of the pod
PodJobAnnotationPrefix = "control.k8ssandra.io/job"
)
*
Jobs executing something on every pod in the datacenter
*
Variables ¶
This section is empty.
Functions ¶
func SetCondition ¶ added in v1.10.6
func SetCondition(task *api.CassandraTask, condition api.JobConditionType, status corev1.ConditionStatus) bool
Types ¶
type AsyncTaskExecutorFunc ¶
type AsyncTaskExecutorFunc func(httphelper.NodeMgmtClient, *corev1.Pod, *TaskConfiguration) (string, error)
AsyncTaskExecutorFunc is called for all methods that support async processing
type CassandraTaskReconciler ¶
CassandraTaskReconciler reconciles a CassandraJob object
func (*CassandraTaskReconciler) HasCondition ¶ added in v1.10.6
func (r *CassandraTaskReconciler) HasCondition(task api.CassandraTask, condition api.JobConditionType, status corev1.ConditionStatus) bool
func (*CassandraTaskReconciler) SetupWithManager ¶
func (r *CassandraTaskReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type JobStatus ¶
type PodFilterFunc ¶ added in v1.13.0
type PodFilterFunc func(*corev1.Pod, *TaskConfiguration) bool
PodFilterFunc approves or rejects the target pod for processing purposes.
type ProcessFunc ¶ added in v1.13.0
type ProcessFunc func(*TaskConfiguration) error
ProcessFunc is a function that's run before the pods are being processed individually, or after the pods have been processed.
type SyncTaskExecutorFunc ¶
type SyncTaskExecutorFunc func(httphelper.NodeMgmtClient, *corev1.Pod, *TaskConfiguration) error
SyncTaskExecutorFunc is called as a backup if async one isn't supported
type TaskConfiguration ¶
type TaskConfiguration struct { // Meta / status Id string TaskStartTime *metav1.Time Datacenter *cassapi.CassandraDatacenter Context context.Context // Input parameters RestartPolicy corev1.RestartPolicy Arguments api.JobArguments // Execution functionality per pod AsyncFeature httphelper.Feature AsyncFunc AsyncTaskExecutorFunc SyncFunc SyncTaskExecutorFunc PodFilter PodFilterFunc // Functions not targeting the pod ValidateFunc ValidatorFunc PreProcessFunc ProcessFunc }
TaskConfiguration sets the command's functions to execute
func (*TaskConfiguration) Filter ¶ added in v1.13.0
func (t *TaskConfiguration) Filter(pod *corev1.Pod) bool
func (*TaskConfiguration) PreProcess ¶ added in v1.13.0
func (t *TaskConfiguration) PreProcess() error
func (*TaskConfiguration) Validate ¶ added in v1.13.0
func (t *TaskConfiguration) Validate() error
type ValidatorFunc ¶ added in v1.13.0
type ValidatorFunc func(*TaskConfiguration) error
ValidatorFunc validates that necessary parameters are set for the task
Click to show internal directories.
Click to hide internal directories.