Skip to content

Commit

Permalink
chore: run codegen
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Dec 11, 2024
1 parent d4050a8 commit 02c2316
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 9 deletions.
13 changes: 11 additions & 2 deletions api/v1alpha1/generated.proto

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

Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ spec:
minLength: 1
type: string
type: object
x-kubernetes-validations:
- message: PromotionTask step must have uses set and must not reference
another task
rule: has(self.uses) && !has(self.task)
minItems: 1
type: array
required:
Expand Down
9 changes: 9 additions & 0 deletions charts/kargo/resources/crds/kargo.akuity.io_promotions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,16 @@ spec:
description: |-
Freight specifies the piece of Freight to be promoted into the Stage
referenced by the Stage field.
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
stage:
description: |-
Stage specifies the name of the Stage to which this Promotion
applies. The Stage referenced by this field MUST be in the same
namespace as the Promotion.
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
Expand Down Expand Up @@ -167,6 +170,11 @@ spec:
minLength: 1
type: string
type: object
x-kubernetes-validations:
- message: Promotion step must have uses set and must not reference
a task
rule: has(self.uses) && !has(self.task)
minItems: 1
type: array
vars:
description: |-
Expand Down Expand Up @@ -196,6 +204,7 @@ spec:
required:
- freight
- stage
- steps
type: object
status:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ spec:
minLength: 1
type: string
type: object
x-kubernetes-validations:
- message: PromotionTask step must have uses set and must not reference
another task
rule: has(self.uses) && !has(self.task)
minItems: 1
type: array
required:
Expand Down
4 changes: 4 additions & 0 deletions charts/kargo/resources/crds/kargo.akuity.io_stages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ spec:
minLength: 1
type: string
type: object
x-kubernetes-validations:
- message: PromotionTemplate step must have exactly one
of uses or task set
rule: '(has(self.uses) ? !has(self.task) : has(self.task))'
minItems: 1
type: array
vars:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@
"type": "string"
}
},
"type": "object"
"type": "object",
"x-kubernetes-validations": [
{
"message": "PromotionTask step must have uses set and must not reference another task",
"rule": "has(self.uses) && !has(self.task)"
}
]
},
"minItems": 1,
"type": "array"
Expand Down
15 changes: 13 additions & 2 deletions ui/src/gen/schema/promotions.kargo.akuity.io_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
"properties": {
"freight": {
"description": "Freight specifies the piece of Freight to be promoted into the Stage\nreferenced by the Stage field.",
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"stage": {
"description": "Stage specifies the name of the Stage to which this Promotion\napplies. The Stage referenced by this field MUST be in the same\nnamespace as the Promotion.",
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
Expand Down Expand Up @@ -87,8 +90,15 @@
"type": "string"
}
},
"type": "object"
"type": "object",
"x-kubernetes-validations": [
{
"message": "Promotion step must have uses set and must not reference a task",
"rule": "has(self.uses) && !has(self.task)"
}
]
},
"minItems": 1,
"type": "array"
},
"vars": {
Expand Down Expand Up @@ -118,7 +128,8 @@
},
"required": [
"freight",
"stage"
"stage",
"steps"
],
"type": "object"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@
"type": "string"
}
},
"type": "object"
"type": "object",
"x-kubernetes-validations": [
{
"message": "PromotionTask step must have uses set and must not reference another task",
"rule": "has(self.uses) && !has(self.task)"
}
]
},
"minItems": 1,
"type": "array"
Expand Down
8 changes: 7 additions & 1 deletion ui/src/gen/schema/stages.kargo.akuity.io_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@
"type": "string"
}
},
"type": "object"
"type": "object",
"x-kubernetes-validations": [
{
"message": "PromotionTemplate step must have exactly one of uses or task set",
"rule": "(has(self.uses) ? !has(self.task) : has(self.task))"
}
]
},
"minItems": 1,
"type": "array"
Expand Down
13 changes: 11 additions & 2 deletions ui/src/gen/v1alpha1/generated_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2721,7 +2721,9 @@ export class PromotionSpec extends Message<PromotionSpec> {
* applies. The Stage referenced by this field MUST be in the same
* namespace as the Promotion.
*
* +kubebuilder:validation:Required
* +kubebuilder:validation:MinLength=1
* +kubebuilder:validation:MaxLength=253
* +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
*
* @generated from field: optional string stage = 1;
Expand All @@ -2732,7 +2734,10 @@ export class PromotionSpec extends Message<PromotionSpec> {
* Freight specifies the piece of Freight to be promoted into the Stage
* referenced by the Stage field.
*
* +kubebuilder:validation:Required
* +kubebuilder:validation:MinLength=1
* +kubebuilder:validation:MaxLength=253
* +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
*
* @generated from field: optional string freight = 2;
*/
Expand All @@ -2751,6 +2756,10 @@ export class PromotionSpec extends Message<PromotionSpec> {
* 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
* +kubebuilder:validation:items:XValidation:message="Promotion step must have uses set and must not reference a task",rule="has(self.uses) && !has(self.task)"
*
* @generated from field: repeated github.com.akuity.kargo.api.v1alpha1.PromotionStep steps = 3;
*/
steps: PromotionStep[] = [];
Expand Down Expand Up @@ -2933,8 +2942,6 @@ export class PromotionStep extends Message<PromotionStep> {
* Task is a reference to a PromotionTask that should be deflated into a
* Promotion when it is built from a PromotionTemplate.
*
* +kubebuilder:validation:Optional
*
* @generated from field: optional github.com.akuity.kargo.api.v1alpha1.PromotionTaskReference task = 5;
*/
task?: PromotionTaskReference;
Expand Down Expand Up @@ -3307,6 +3314,7 @@ export class PromotionTaskSpec extends Message<PromotionTaskSpec> {
*
* +kubebuilder:validation:Required
* +kubebuilder:validation:MinItems=1
* +kubebuilder:validation:items:XValidation:message="PromotionTask step must have uses set and must not reference another task",rule="has(self.uses) && !has(self.task)"
*
* @generated from field: repeated github.com.akuity.kargo.api.v1alpha1.PromotionStep steps = 2;
*/
Expand Down Expand Up @@ -3403,6 +3411,7 @@ export class PromotionTemplateSpec extends Message<PromotionTemplateSpec> {
* are listed in this field.
*
* +kubebuilder:validation:MinItems=1
* +kubebuilder:validation:items:XValidation:message="PromotionTemplate step must have exactly one of uses or task set",rule="(has(self.uses) ? !has(self.task) : has(self.task))"
*
* @generated from field: repeated github.com.akuity.kargo.api.v1alpha1.PromotionStep steps = 1;
*/
Expand Down

0 comments on commit 02c2316

Please sign in to comment.