Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package cronjob
import (
"github.com/ankitrgadiya/operatorlib/pkg/container"
"github.com/ankitrgadiya/operatorlib/pkg/interfaces"
"github.com/ankitrgadiya/operatorlib/pkg/job"
"github.com/ankitrgadiya/operatorlib/pkg/meta"
"github.com/ankitrgadiya/operatorlib/pkg/pod"
batchv1beta1 "k8s.io/api/batch/v1beta1"
"k8s.io/apimachinery/pkg/runtime"
)
// GenConfigMapFunc defines a function which generates ConfigMap.
type GenCronJobFunc func(Conf) (*batchv1beta1.CronJob, error)
type GenSuccessfulJobsHistoryLimitFunc func() (*int32, error)
type GenFailedJobsHistoryLimitHistoryLimitFunc func() (*int32, error)
type GenConcurrencyPolicyFunc func() (batchv1beta1.ConcurrencyPolicy, error)
type GenSuspendPolicyFunc func() (bool, error)
type GenStartingDeadlineSecondsSecondsFunc func() (*int64, error)
type GenScheduleFunc func() (string, error)
// type GenSelectorFunc func(interfaces.Object) (*metav1.LabelSelector, error)
type Conf struct {
Namespace string
Name string
Obj interfaces.Object
Reconcile interfaces.Reconcile
previousObject runtime.Object
Owner interfaces.Object
OwnerReference bool
GenFinalizers meta.GenFinalizers
GenLabels meta.GenLabels
GenAnnotations meta.GenAnnotations
ManualSelector bool
GenParallelismFunc job.GenParallelismFunc
GenCompletionsFunc job.GenCompletionsFunc
GenActiveDeadlineSecondsFunc job.GenActiveDeadlineSecondsFunc
GenBackoffLimitFunc job.GenBackoffLimitFunc
// GenSelectorFunc
GenSuccessfulJobsHistoryLimitFunc
GenFailedJobsHistoryLimitHistoryLimitFunc
GenConcurrencyPolicyFunc
GenSuspendPolicyFunc
GenStartingDeadlineSecondsSecondsFunc
GenScheduleFunc
GenVolumesFunc pod.GenVolumesFunc
GenSecurityContextFunc pod.GenSecurityContextFunc
GenRestartPolicyFunc pod.GenRestartPolicyFunc
GenContainers []container.Mutate
}