You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides an API which allows custom probe definitions to determine readiness of the CER phases. Objects can be selected for in one of two ways: by GroupKind, or by Label (matchLabels and matchExpressions). They can then be tested via any of: Condition, FieldsEqual, and FieldValue. Condition checks that the object has a condition matching the type and status provided. FieldsEqual uses two provided field paths and checks for equality. FieldValue uses a provided field path and checks that the value is equal to the provided expected value.
Signed-off-by: Daniel Franz <dfranz@redhat.com>
// ProbeSelector is a discriminated union which defines the method by which we select objects to make assertions against.
158
+
// +union
159
+
// +kubebuilder:validation:XValidation:rule="self.type == 'GroupKind' ?has(self.groupKind) : !has(self.groupKind)",message="groupKind is required when type is GroupKind, and forbidden otherwise"
160
+
// +kubebuilder:validation:XValidation:rule="self.type == 'Label' ?has(self.label) : !has(self.label)",message="label is required when type is Label, and forbidden otherwise"
161
+
typeProbeSelectorstruct {
162
+
// type is a required field which specifies the type of selector to use.
163
+
//
164
+
// The allowed selector types are "GroupKind" and "Label".
165
+
//
166
+
// When set to "GroupKind", all objects which match the specified group and kind will be selected.
167
+
// When set to "Label", all objects which match the specified labels and/or expressions will be selected.
168
+
//
169
+
// +unionDiscriminator
170
+
// +kubebuilder:validation:Enum=GroupKind;Label
171
+
// +required
172
+
SelectorTypeSelectorType`json:"type,omitempty"`
173
+
174
+
// groupKind specifies the group and kind of objects to select.
// SelectorType defines the type of selector used for progressionProbes.
198
+
// +enum
199
+
typeSelectorTypestring
200
+
201
+
const (
202
+
SelectorTypeGroupKindSelectorType="GroupKind"
203
+
SelectorTypeLabelSelectorType="Label"
204
+
)
205
+
206
+
// ProbeType defines the type of probe used as an assertion.
207
+
// +enum
208
+
typeProbeTypestring
209
+
210
+
const (
211
+
ProbeTypeFieldConditionProbeType="Condition"
212
+
ProbeTypeFieldEqualProbeType="FieldsEqual"
213
+
ProbeTypeFieldValueProbeType="FieldValue"
214
+
)
215
+
216
+
// ProbeAssertion is a discriminated union which defines the probe type and definition used as an assertion.
217
+
// +union
218
+
// +kubebuilder:validation:XValidation:rule="self.type == 'Condition' ?has(self.condition) : !has(self.condition)",message="condition is required when type is Condition, and forbidden otherwise"
219
+
// +kubebuilder:validation:XValidation:rule="self.type == 'FieldsEqual' ?has(self.fieldsEqual) : !has(self.fieldsEqual)",message="fieldsEqual is required when type is FieldsEqual, and forbidden otherwise"
220
+
// +kubebuilder:validation:XValidation:rule="self.type == 'FieldValue' ?has(self.fieldValue) : !has(self.fieldValue)",message="fieldValue is required when type is FieldValue, and forbidden otherwise"
221
+
typeProbeAssertionstruct {
222
+
// type is a required field which specifies the type of probe to use.
223
+
//
224
+
// The allowed probe types are "Condition", "FieldsEqual", and "FieldValue".
225
+
//
226
+
// When set to "Condition", the probe checks objects that have reached a condition of specified type and status.
227
+
// When set to "FieldsEqual", the probe checks that the values found at two provided field paths are matching.
228
+
// When set to "FieldValue", the probe checks that the value found at the provided field path matches what was specified.
0 commit comments