Skip to content

Commit

Permalink
feat(api)!: require steps in PromotionTemplate
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Dec 2, 2024
1 parent d01d1ec commit 6692c8c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions api/v1alpha1/promotion_template_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type PromotionTemplateSpec struct {
// The order in which the directives are executed is the order in which they
// are listed in this field.
//
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinItems=1
Steps []PromotionStep `json:"steps,omitempty" protobuf:"bytes,1,rep,name=steps"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ spec:
- value
type: object
type: array
required:
- steps
type: object
required:
- spec
Expand Down
2 changes: 2 additions & 0 deletions charts/kargo/resources/crds/kargo.akuity.io_stages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ spec:
- value
type: object
type: array
required:
- steps
type: object
required:
- spec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
"type": "array"
}
},
"required": [
"steps"
],
"type": "object"
}
},
Expand Down
3 changes: 3 additions & 0 deletions ui/src/gen/schema/stages.kargo.akuity.io_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
"type": "array"
}
},
"required": [
"steps"
],
"type": "object"
}
},
Expand Down
1 change: 1 addition & 0 deletions ui/src/gen/v1alpha1/generated_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3102,6 +3102,7 @@ export class PromotionTemplateSpec extends Message<PromotionTemplateSpec> {
* The order in which the directives are executed is the order in which they
* are listed in this field.
*
* +kubebuilder:validation:Required
* +kubebuilder:validation:MinItems=1
*
* @generated from field: repeated github.com.akuity.kargo.api.v1alpha1.PromotionStep steps = 1;
Expand Down

0 comments on commit 6692c8c

Please sign in to comment.