control

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: 20 Imported by: 0

Documentation

Index

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 JobStatusToPodAnnotations

func JobStatusToPodAnnotations(taskId string, annotations map[string]string, jobStatus JobStatus) error

Types

type AsyncTaskExecutorFunc

type AsyncTaskExecutorFunc func(httphelper.NodeMgmtClient, *corev1.Pod, map[string]string) (string, error)

AsyncTaskExecutorFunc is called for all methods that support async processing

type CassandraTaskReconciler

type CassandraTaskReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

CassandraTaskReconciler reconciles a CassandraJob object

func (*CassandraTaskReconciler) Reconcile

func (r *CassandraTaskReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*CassandraTaskReconciler) SetupWithManager

func (r *CassandraTaskReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type JobStatus

type JobStatus struct {
	Id      string `json:"id,omitempty"`
	Status  string `json:"status,omitempty"`
	Handler string `json:"handler,omitempty"`
	Retries int    `json:"retries,omitempty"`
}

func GetJobStatusFromPodAnnotations

func GetJobStatusFromPodAnnotations(taskId string, annotations map[string]string) (JobStatus, error)

GetJobStatusFromPodAnnotations gets the json serialized pod job statusfrom Pod.Annotations and converts it to the Affinity type in api.

type SyncTaskExecutorFunc

type SyncTaskExecutorFunc func(httphelper.NodeMgmtClient, *corev1.Pod, map[string]string) error

SyncTaskExecutorFunc is called as a backup if async one isn't supported

type TaskConfiguration

type TaskConfiguration struct {
	Id            string
	AsyncFunc     AsyncTaskExecutorFunc
	SyncFunc      SyncTaskExecutorFunc
	AsyncFeature  httphelper.Feature
	RestartPolicy corev1.RestartPolicy
	Arguments     map[string]string
}

TaskConfiguration sets the command's functions to execute

Jump to

Keyboard shortcuts

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