@@ -62,69 +62,71 @@ type ScheduleConfig struct {
62
62
Name string `yaml:"name,omitempty" json:"name,omitempty"`
63
63
// Crontab is a schedule config in crontab format. (5 or 6 fields)
64
64
Crontab string `yaml:"crontab" json:"crontab"`
65
+
66
+ Queue string `yaml:"queue" json:"queue,omitempty"`
65
67
}
66
68
67
69
type FilterResult any
68
70
69
71
type FilterFunc func (* unstructured.Unstructured ) (FilterResult , error )
70
72
71
73
type NameSelector struct {
72
- MatchNames []string `json :"matchNames" yaml :"matchNames"`
74
+ MatchNames []string `yaml :"matchNames" json :"matchNames"`
73
75
}
74
76
75
77
type FieldSelectorRequirement struct {
76
- Field string `json:"field"`
77
- Operator string `json:"operator"`
78
- Value string `json:"value,omitempty"`
78
+ Field string `yaml:"field" json:"field"`
79
+ Operator string `yaml:"operator" json:"operator"`
80
+ Value string `yaml:"value,omitempty" json:"value,omitempty"`
79
81
}
80
82
81
83
type FieldSelector struct {
82
- MatchExpressions []FieldSelectorRequirement `json :"matchExpressions" yaml :"matchExpressions"`
84
+ MatchExpressions []FieldSelectorRequirement `yaml :"matchExpressions" json :"matchExpressions"`
83
85
}
84
86
85
87
type NamespaceSelector struct {
86
- NameSelector * NameSelector `json :"nameSelector,omitempty" yaml :"nameSelector,omitempty"`
87
- LabelSelector * metav1.LabelSelector `json :"labelSelector,omitempty" yaml :"labelSelector,omitempty"`
88
+ NameSelector * NameSelector `yaml :"nameSelector,omitempty" json :"nameSelector,omitempty"`
89
+ LabelSelector * metav1.LabelSelector `yaml :"labelSelector,omitempty" json :"labelSelector,omitempty"`
88
90
}
89
91
90
92
type KubernetesConfig struct {
91
- Name string `json:"name"`
93
+ Name string `yaml:"name" json:"name"`
92
94
// APIVersion of objects. "v1" is used if not set.
93
- APIVersion string `json:"apiVersion,omitempty"`
95
+ APIVersion string `yaml:"apiVersion,omitempty" json:"apiVersion,omitempty"`
94
96
// Kind of objects.
95
- Kind string `json:"kind,omitempty"`
97
+ Kind string `yaml:"kind,omitempty" json:"kind,omitempty"`
96
98
// NameSelector used to subscribe on object by its name.
97
- NameSelector * NameSelector `json:"nameSelector,omitempty"`
99
+ NameSelector * NameSelector `yaml:"nameSelector,omitempty" json:"nameSelector,omitempty"`
98
100
// NamespaceSelector used to subscribe on objects in namespaces.
99
- NamespaceSelector * NamespaceSelector `json:"namespace,omitempty"`
101
+ NamespaceSelector * NamespaceSelector `yaml:"namespace,omitempty" json:"namespace,omitempty"`
100
102
// LabelSelector used to subscribe on objects by matching their labels.
101
- LabelSelector * metav1.LabelSelector `json:"labelSelector,omitempty"`
103
+ LabelSelector * metav1.LabelSelector `yaml:"labelSelector,omitempty" json:"labelSelector,omitempty"`
102
104
// FieldSelector used to subscribe on objects by matching specific fields (the list of fields is narrow, see shell-operator documentation).
103
- FieldSelector * FieldSelector `json:"fieldSelector,omitempty"`
105
+ FieldSelector * FieldSelector `yaml:"fieldSelector,omitempty" json:"fieldSelector,omitempty"`
104
106
// ExecuteHookOnEvents is true by default. Set to false if only snapshot update is needed.
105
107
// *bool --> ExecuteHookOnEvents: [All events] || empty slice || nil
106
- ExecuteHookOnEvents * bool `json:"executeHookOnEvent,omitempty"`
108
+ ExecuteHookOnEvents * bool `yaml:"executeHookOnEvent,omitempty" json:"executeHookOnEvent,omitempty"`
107
109
// ExecuteHookOnSynchronization is true by default. Set to false if only snapshot update is needed.
108
110
// true || false
109
- ExecuteHookOnSynchronization * bool `json:"executeHookOnSynchronization,omitempty"`
111
+ ExecuteHookOnSynchronization * bool `yaml:"executeHookOnSynchronization,omitempty" json:"executeHookOnSynchronization,omitempty"`
110
112
// WaitForSynchronization is true by default. Set to false if beforeHelm is not required this snapshot on start.
111
113
// true || false
112
- WaitForSynchronization * bool `json:"waitForSynchronization,omitempty"`
114
+ WaitForSynchronization * bool `yaml:"waitForSynchronization,omitempty" json:"waitForSynchronization,omitempty"`
113
115
// false by default
114
116
// if JQ filter is empty - KeepFullObjectsInMemory always true
115
- KeepFullObjectsInMemory * bool `json:"keepFullObjectsInMemory,omitempty"`
117
+ KeepFullObjectsInMemory * bool `yaml:"keepFullObjectsInMemory,omitempty" json:"keepFullObjectsInMemory,omitempty"`
116
118
// JQ filter to filter results from kubernetes objects
117
- JqFilter string `json:"jqFilter,omitempty"`
119
+ JqFilter string `yaml:"jqFilter,omitempty" json:"jqFilter,omitempty"`
118
120
119
- AllowFailure * bool `json:"allowFailure,omitempty"`
120
- ResynchronizationPeriod string `json:"resynchronizationPeriod,omitempty"`
121
+ AllowFailure * bool `yaml:"allowFailure,omitempty" json:"allowFailure,omitempty"`
122
+ ResynchronizationPeriod string `yaml:"resynchronizationPeriod,omitempty" json:"resynchronizationPeriod,omitempty"`
121
123
122
- IncludeSnapshotsFrom []string `json:"includeSnapshotsFrom,omitempty"`
124
+ IncludeSnapshotsFrom []string `yaml:"includeSnapshotsFrom,omitempty" json:"includeSnapshotsFrom,omitempty"`
123
125
124
- Queue string `json:"queue,omitempty"`
126
+ Queue string `yaml:"queue,omitempty" json:"queue,omitempty"`
125
127
}
126
128
127
129
type Error struct {
128
- Message string `json:"message"`
129
- Code int `json:"code,omitempty"`
130
+ Message string `yaml:"message" json:"message"`
131
+ Code int `yaml:"code,omitempty" json:"code,omitempty"`
130
132
}
0 commit comments