Documentation ¶
Index ¶
- Constants
- func AddErrand(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func AddJob(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func NewErrandReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, ...) reconcile.Reconciler
- func NewJobReconciler(ctx context.Context, config *config.Config, mgr manager.Manager) (reconcile.Reconciler, error)
- type ErrandReconciler
- type JobCreator
- type OutputPersistor
- type ReconcileJob
Constants ¶
const ( // EnvKubeAz is set by available zone name EnvKubeAz = "KUBE_AZ" // EnvBoshAz is set by available zone name EnvBoshAz = "BOSH_AZ" // EnvReplicas describes the number of replicas in the quarks job EnvReplicas = "REPLICAS" // EnvCFOperatorAZIndex is set by available zone index EnvCFOperatorAZIndex = "AZ_INDEX" // EnvPodOrdinal is the pod's index EnvPodOrdinal = "POD_ORDINAL" )
const ( // EnvNamespace is the namespace in which the jobs run, used by // persist-output to create the secrets EnvNamespace = "NAMESPACE" )
Variables ¶
This section is empty.
Functions ¶
func AddErrand ¶
AddErrand creates a new QuarksJob controller to start errands, when their trigger strategy matches 'now' or 'once', or their configuration changed.
func AddJob ¶
AddJob creates a new Job controller to collect the output from jobs, persist that output as a secret and delete the k8s job afterwards.
func NewErrandReconciler ¶
func NewErrandReconciler( ctx context.Context, config *config.Config, mgr manager.Manager, f setOwnerReferenceFunc, store vss.VersionedSecretStore, ) reconcile.Reconciler
NewErrandReconciler returns a new reconciler for errand jobs.
Types ¶
type ErrandReconciler ¶
type ErrandReconciler struct {
// contains filtered or unexported fields
}
ErrandReconciler implements the Reconciler interface.
type JobCreator ¶
type JobCreator interface {
Create(ctx context.Context, qJob qjv1a1.QuarksJob) (retry bool, err error)
}
JobCreator is the interface that wraps the basic Create method.
func NewJobCreator ¶
func NewJobCreator(client crc.Client, scheme *runtime.Scheme, f setOwnerReferenceFunc, config *config.Config, store vss.VersionedSecretStore) JobCreator
NewJobCreator returns a new job creator
type OutputPersistor ¶
type OutputPersistor struct {
// contains filtered or unexported fields
}
OutputPersistor creates a kubernetes secret for each container in the in the qJob pod.
func NewOutputPersistor ¶
func NewOutputPersistor(log *zap.SugaredLogger, namespace string, podName string, clientSet kubernetes.Interface, versionedClientSet versioned.Interface, outputFilePathPrefix string) *OutputPersistor
NewOutputPersistor returns a persist output interface which can create kubernetes secrets.
type ReconcileJob ¶
type ReconcileJob struct {
// contains filtered or unexported fields
}
ReconcileJob reconciles an Job object
func (*ReconcileJob) Reconcile ¶
Reconcile reads that state of the cluster for a Job object that is owned by an QuarksJob and makes changes based on the state read and what is in the QuarksJob.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.