-
Notifications
You must be signed in to change notification settings - Fork 208
/
bindings.go
77 lines (65 loc) · 1.9 KB
/
bindings.go
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package types
import (
"time"
"github.com/flant/shell-operator/pkg/kube_events_manager"
. "github.com/flant/shell-operator/pkg/schedule_manager/types"
"github.com/flant/shell-operator/pkg/webhook/admission"
"github.com/flant/shell-operator/pkg/webhook/conversion"
)
type BindingType string
const (
Schedule BindingType = "schedule"
OnStartup BindingType = "onStartup"
OnKubernetesEvent BindingType = "kubernetes"
KubernetesConversion BindingType = "kubernetesCustomResourceConversion"
KubernetesValidating BindingType = "kubernetesValidating"
KubernetesMutating BindingType = "kubernetesMutating"
)
// Types for effective binding configs
type CommonBindingConfig struct {
BindingName string
AllowFailure bool
}
type OnStartupConfig struct {
CommonBindingConfig
Order float64
}
type ScheduleConfig struct {
CommonBindingConfig
ScheduleEntry ScheduleEntry
IncludeSnapshotsFrom []string
Queue string
Group string
}
type OnKubernetesEventConfig struct {
CommonBindingConfig
Monitor *kube_events_manager.MonitorConfig
IncludeSnapshotsFrom []string
Queue string
Group string
ExecuteHookOnSynchronization bool
WaitForSynchronization bool
KeepFullObjectsInMemory bool
}
type ConversionConfig struct {
CommonBindingConfig
IncludeSnapshotsFrom []string
Group string
Webhook *conversion.WebhookConfig
}
type ValidatingConfig struct {
CommonBindingConfig
IncludeSnapshotsFrom []string
Group string
Webhook *admission.ValidatingWebhookConfig
}
type MutatingConfig struct {
CommonBindingConfig
IncludeSnapshotsFrom []string
Group string
Webhook *admission.MutatingWebhookConfig
}
type Settings struct {
ExecutionMinInterval time.Duration
ExecutionBurst int
}