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
Copy file name to clipboardExpand all lines: api/runs/v1alpha1/storyrun_types.go
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,10 @@ type StoryRunSpec struct {
80
80
}
81
81
82
82
// StoryRunStatus tracks the current state and results of this story execution
83
+
// +kubebuilder:validation:XValidation:rule="!has(self.conditions) || self.conditions.exists(c, c.type == 'Ready')",message="status.conditions must include Ready when conditions are set"
84
+
// +kubebuilder:validation:XValidation:rule="!has(self.conditions) || self.conditions.all(c, has(c.lastTransitionTime))",message="status.conditions entries must set lastTransitionTime"
85
+
// +kubebuilder:validation:XValidation:message="status.conditions reason field must be <= 64 characters",rule="!has(self.conditions) || self.conditions.all(c, !has(c.reason) || size(c.reason) <= 64)"
86
+
// +kubebuilder:validation:XValidation:message="status.conditions message field must be <= 2048 characters",rule="!has(self.conditions) || self.conditions.all(c, !has(c.message) || size(c.message) <= 2048)"
83
87
typeStoryRunStatusstruct {
84
88
// observedGeneration is the most recent generation observed for this StoryRun. It corresponds to the
85
89
// StoryRun's generation, which is updated on mutation by the API Server.
Copy file name to clipboardExpand all lines: api/v1alpha1/story_types.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,8 @@ type Story struct {
53
53
}
54
54
55
55
// StorySpec defines what the workflow does and how it should run
56
+
// +kubebuilder:validation:XValidation:rule="self.steps.all(step, has(step.ref) != has(step.type))",message="each step must set exactly one of ref or type"
57
+
// +kubebuilder:validation:XValidation:rule="self.steps.all(step, self.steps.exists_one(other, other.name == step.name))",message="step names must be unique"
56
58
typeStorySpecstruct {
57
59
// Pattern specifies the execution model for the Story.
58
60
// "batch" stories are run to completion via a StoryRun.
0 commit comments