From 242b4e615c4c81dcfc65fe4806993afd4b54470f Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Wed, 11 Dec 2024 16:58:04 +0100 Subject: [PATCH] chore: run codegen Signed-off-by: Hidde Beydals --- api/v1alpha1/zz_generated.deepcopy.go | 7 +++++++ .../kargo.akuity.io_clusterpromotiontasks.yaml | 15 +++++++++++++++ .../crds/kargo.akuity.io_promotions.yaml | 13 +++++++++++++ .../crds/kargo.akuity.io_promotiontasks.yaml | 15 +++++++++++++++ .../resources/crds/kargo.akuity.io_stages.yaml | 13 +++++++++++++ 5 files changed, 63 insertions(+) diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 398c8b1f0..c0bf07a95 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1048,6 +1048,13 @@ func (in *PromotionStep) DeepCopyInto(out *PromotionStep) { *out = new(PromotionStepRetry) (*in).DeepCopyInto(*out) } + if in.Inputs != nil { + in, out := &in.Inputs, &out.Inputs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } if in.Config != nil { in, out := &in.Config, &out.Config *out = new(apiextensionsv1.JSON) diff --git a/charts/kargo/resources/crds/kargo.akuity.io_clusterpromotiontasks.yaml b/charts/kargo/resources/crds/kargo.akuity.io_clusterpromotiontasks.yaml index 63ce17930..218080560 100644 --- a/charts/kargo/resources/crds/kargo.akuity.io_clusterpromotiontasks.yaml +++ b/charts/kargo/resources/crds/kargo.akuity.io_clusterpromotiontasks.yaml @@ -95,6 +95,17 @@ spec: expressions in defining values at any level of this block. See https://docs.kargo.io/references/expression-language for details. x-kubernetes-preserve-unknown-fields: true + inputs: + additionalProperties: + type: string + description: |- + Inputs is a map of inputs that can used to parameterize the execution + of the PromotionStep and can be referenced by expressions in the Config. + + When a PromotionStep is inflated from a PromotionTask, the inputs + specified in the PromotionTask are set based on the inputs specified + in the Config of the PromotionStep that references the PromotionTask. + type: object retry: description: Retry is the retry policy for this step. properties: @@ -171,6 +182,10 @@ spec: - message: PromotionTask step must have uses set and must not reference another task rule: has(self.uses) && !has(self.task) + - message: PromotionTask step must not have inputs set + rule: self.inputs.size() == 0 + - message: inputs must not be set when task is set + rule: '!(has(self.task) && self.inputs.size() > 0)' minItems: 1 type: array required: diff --git a/charts/kargo/resources/crds/kargo.akuity.io_promotions.yaml b/charts/kargo/resources/crds/kargo.akuity.io_promotions.yaml index 8ae7e59a3..cf234c2c1 100644 --- a/charts/kargo/resources/crds/kargo.akuity.io_promotions.yaml +++ b/charts/kargo/resources/crds/kargo.akuity.io_promotions.yaml @@ -98,6 +98,17 @@ spec: expressions in defining values at any level of this block. See https://docs.kargo.io/references/expression-language for details. x-kubernetes-preserve-unknown-fields: true + inputs: + additionalProperties: + type: string + description: |- + Inputs is a map of inputs that can used to parameterize the execution + of the PromotionStep and can be referenced by expressions in the Config. + + When a PromotionStep is inflated from a PromotionTask, the inputs + specified in the PromotionTask are set based on the inputs specified + in the Config of the PromotionStep that references the PromotionTask. + type: object retry: description: Retry is the retry policy for this step. properties: @@ -174,6 +185,8 @@ spec: - message: Promotion step must have uses set and must not reference a task rule: has(self.uses) && !has(self.task) + - message: inputs must not be set when task is set + rule: '!(has(self.task) && self.inputs.size() > 0)' minItems: 1 type: array vars: diff --git a/charts/kargo/resources/crds/kargo.akuity.io_promotiontasks.yaml b/charts/kargo/resources/crds/kargo.akuity.io_promotiontasks.yaml index f6129bc8a..cb0ea9e46 100644 --- a/charts/kargo/resources/crds/kargo.akuity.io_promotiontasks.yaml +++ b/charts/kargo/resources/crds/kargo.akuity.io_promotiontasks.yaml @@ -95,6 +95,17 @@ spec: expressions in defining values at any level of this block. See https://docs.kargo.io/references/expression-language for details. x-kubernetes-preserve-unknown-fields: true + inputs: + additionalProperties: + type: string + description: |- + Inputs is a map of inputs that can used to parameterize the execution + of the PromotionStep and can be referenced by expressions in the Config. + + When a PromotionStep is inflated from a PromotionTask, the inputs + specified in the PromotionTask are set based on the inputs specified + in the Config of the PromotionStep that references the PromotionTask. + type: object retry: description: Retry is the retry policy for this step. properties: @@ -171,6 +182,10 @@ spec: - message: PromotionTask step must have uses set and must not reference another task rule: has(self.uses) && !has(self.task) + - message: PromotionTask step must not have inputs set + rule: self.inputs.size() == 0 + - message: inputs must not be set when task is set + rule: '!(has(self.task) && self.inputs.size() > 0)' minItems: 1 type: array required: diff --git a/charts/kargo/resources/crds/kargo.akuity.io_stages.yaml b/charts/kargo/resources/crds/kargo.akuity.io_stages.yaml index 364dbd963..576cfc569 100644 --- a/charts/kargo/resources/crds/kargo.akuity.io_stages.yaml +++ b/charts/kargo/resources/crds/kargo.akuity.io_stages.yaml @@ -88,6 +88,17 @@ spec: expressions in defining values at any level of this block. See https://docs.kargo.io/references/expression-language for details. x-kubernetes-preserve-unknown-fields: true + inputs: + additionalProperties: + type: string + description: |- + Inputs is a map of inputs that can used to parameterize the execution + of the PromotionStep and can be referenced by expressions in the Config. + + When a PromotionStep is inflated from a PromotionTask, the inputs + specified in the PromotionTask are set based on the inputs specified + in the Config of the PromotionStep that references the PromotionTask. + type: object retry: description: Retry is the retry policy for this step. properties: @@ -164,6 +175,8 @@ spec: - message: PromotionTemplate step must have exactly one of uses or task set rule: '(has(self.uses) ? !has(self.task) : has(self.task))' + - message: inputs must not be set when task is set + rule: '!(has(self.task) && self.inputs.size() > 0)' minItems: 1 type: array vars: