This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 58fa430a602b9ed6e3fe1e6a71ef5eedfdd63894 Author: Luca Burgazzoli <lburgazz...@gmail.com> AuthorDate: Wed Aug 3 16:34:38 2022 +0200 regen --- .../camel.apache.org_integrationplatforms.yaml | 44 ++++++++++++++++++++++ .../crd/bases/camel.apache.org_integrations.yaml | 22 +++++++++++ .../bases/camel.apache.org_kameletbindings.yaml | 22 +++++++++++ docs/modules/ROOT/partials/apis/camel-k-crds.adoc | 30 +++++++++++++++ docs/modules/traits/pages/deployment.adoc | 21 +++++++++++ helm/camel-k/crds/crd-integration-platform.yaml | 44 ++++++++++++++++++++++ helm/camel-k/crds/crd-integration.yaml | 22 +++++++++++ helm/camel-k/crds/crd-kamelet-binding.yaml | 22 +++++++++++ pkg/apis/camel/v1/trait/deployment.go | 1 + pkg/apis/camel/v1/trait/zz_generated.deepcopy.go | 10 +++++ resources/traits.yaml | 16 ++++++++ 11 files changed, 254 insertions(+) diff --git a/config/crd/bases/camel.apache.org_integrationplatforms.yaml b/config/crd/bases/camel.apache.org_integrationplatforms.yaml index ffd239464..cda07f954 100644 --- a/config/crd/bases/camel.apache.org_integrationplatforms.yaml +++ b/config/crd/bases/camel.apache.org_integrationplatforms.yaml @@ -734,6 +734,28 @@ spec: defaults to 60s. format: int32 type: integer + rollingUpdateMaxSurge: + description: 'The maximum number of pods that can be scheduled + above the desired number of pods. Value can be an absolute + number (ex: 5) or a percentage of desired pods (ex: 10%). + This can not be 0 if MaxUnavailable is 0. Absolute number + is calculated from percentage by rounding up. Defaults to + 25%.' + type: integer + rollingUpdateMaxUnavailable: + description: 'The maximum number of pods that can be unavailable + during the update. Value can be an absolute number (ex: + 5) or a percentage of desired pods (ex: 10%). Absolute number + is calculated from percentage by rounding down. This can + not be 0 if MaxSurge is 0. Defaults to 25%.' + type: integer + strategy: + description: The deployment strategy to use to replace existing + pods with new ones. + enum: + - Recreate + - RollingUpdate + type: string type: object environment: description: The configuration of Environment trait @@ -2340,6 +2362,28 @@ spec: defaults to 60s. format: int32 type: integer + rollingUpdateMaxSurge: + description: 'The maximum number of pods that can be scheduled + above the desired number of pods. Value can be an absolute + number (ex: 5) or a percentage of desired pods (ex: 10%). + This can not be 0 if MaxUnavailable is 0. Absolute number + is calculated from percentage by rounding up. Defaults to + 25%.' + type: integer + rollingUpdateMaxUnavailable: + description: 'The maximum number of pods that can be unavailable + during the update. Value can be an absolute number (ex: + 5) or a percentage of desired pods (ex: 10%). Absolute number + is calculated from percentage by rounding down. This can + not be 0 if MaxSurge is 0. Defaults to 25%.' + type: integer + strategy: + description: The deployment strategy to use to replace existing + pods with new ones. + enum: + - Recreate + - RollingUpdate + type: string type: object environment: description: The configuration of Environment trait diff --git a/config/crd/bases/camel.apache.org_integrations.yaml b/config/crd/bases/camel.apache.org_integrations.yaml index 9ef1f33a9..8108cf337 100644 --- a/config/crd/bases/camel.apache.org_integrations.yaml +++ b/config/crd/bases/camel.apache.org_integrations.yaml @@ -6211,6 +6211,28 @@ spec: defaults to 60s. format: int32 type: integer + rollingUpdateMaxSurge: + description: 'The maximum number of pods that can be scheduled + above the desired number of pods. Value can be an absolute + number (ex: 5) or a percentage of desired pods (ex: 10%). + This can not be 0 if MaxUnavailable is 0. Absolute number + is calculated from percentage by rounding up. Defaults to + 25%.' + type: integer + rollingUpdateMaxUnavailable: + description: 'The maximum number of pods that can be unavailable + during the update. Value can be an absolute number (ex: + 5) or a percentage of desired pods (ex: 10%). Absolute number + is calculated from percentage by rounding down. This can + not be 0 if MaxSurge is 0. Defaults to 25%.' + type: integer + strategy: + description: The deployment strategy to use to replace existing + pods with new ones. + enum: + - Recreate + - RollingUpdate + type: string type: object environment: description: The configuration of Environment trait diff --git a/config/crd/bases/camel.apache.org_kameletbindings.yaml b/config/crd/bases/camel.apache.org_kameletbindings.yaml index 1da869621..5821108e2 100644 --- a/config/crd/bases/camel.apache.org_kameletbindings.yaml +++ b/config/crd/bases/camel.apache.org_kameletbindings.yaml @@ -6497,6 +6497,28 @@ spec: It defaults to 60s. format: int32 type: integer + rollingUpdateMaxSurge: + description: 'The maximum number of pods that can be scheduled + above the desired number of pods. Value can be an absolute + number (ex: 5) or a percentage of desired pods (ex: + 10%). This can not be 0 if MaxUnavailable is 0. Absolute + number is calculated from percentage by rounding up. + Defaults to 25%.' + type: integer + rollingUpdateMaxUnavailable: + description: 'The maximum number of pods that can be unavailable + during the update. Value can be an absolute number (ex: + 5) or a percentage of desired pods (ex: 10%). Absolute + number is calculated from percentage by rounding down. + This can not be 0 if MaxSurge is 0. Defaults to 25%.' + type: integer + strategy: + description: The deployment strategy to use to replace + existing pods with new ones. + enum: + - Recreate + - RollingUpdate + type: string type: object environment: description: The configuration of Environment trait diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc index 64a43b020..79006bfd8 100644 --- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc +++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc @@ -4216,6 +4216,36 @@ int32 The maximum time in seconds for the deployment to make progress before it is considered to be failed. It defaults to 60s. +|`strategy` + +*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#deploymentstrategytype-v1-apps[Kubernetes apps/v1.DeploymentStrategyType]* +| + + +The deployment strategy to use to replace existing pods with new ones. + +|`rollingUpdateMaxUnavailable` + +int +| + + +The maximum number of pods that can be unavailable during the update. +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +Absolute number is calculated from percentage by rounding down. +This can not be 0 if MaxSurge is 0. +Defaults to 25%. + +|`rollingUpdateMaxSurge` + +int +| + + +The maximum number of pods that can be scheduled above the desired number of +pods. +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +This can not be 0 if MaxUnavailable is 0. +Absolute number is calculated from percentage by rounding up. +Defaults to 25%. + |=== diff --git a/docs/modules/traits/pages/deployment.adoc b/docs/modules/traits/pages/deployment.adoc index 6f1a0a779..6188609e4 100755 --- a/docs/modules/traits/pages/deployment.adoc +++ b/docs/modules/traits/pages/deployment.adoc @@ -33,6 +33,27 @@ The following configuration options are available: | The maximum time in seconds for the deployment to make progress before it is considered to be failed. It defaults to 60s. +| deployment.strategy +| DeploymentStrategyType +| The deployment strategy to use to replace existing pods with new ones. + +| deployment.rolling-update-max-unavailable +| int +| The maximum number of pods that can be unavailable during the update. +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +Absolute number is calculated from percentage by rounding down. +This can not be 0 if MaxSurge is 0. +Defaults to 25%. + +| deployment.rolling-update-max-surge +| int +| The maximum number of pods that can be scheduled above the desired number of +pods. +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +This can not be 0 if MaxUnavailable is 0. +Absolute number is calculated from percentage by rounding up. +Defaults to 25%. + |=== // End of autogenerated code - DO NOT EDIT! (configuration) diff --git a/helm/camel-k/crds/crd-integration-platform.yaml b/helm/camel-k/crds/crd-integration-platform.yaml index ffd239464..cda07f954 100644 --- a/helm/camel-k/crds/crd-integration-platform.yaml +++ b/helm/camel-k/crds/crd-integration-platform.yaml @@ -734,6 +734,28 @@ spec: defaults to 60s. format: int32 type: integer + rollingUpdateMaxSurge: + description: 'The maximum number of pods that can be scheduled + above the desired number of pods. Value can be an absolute + number (ex: 5) or a percentage of desired pods (ex: 10%). + This can not be 0 if MaxUnavailable is 0. Absolute number + is calculated from percentage by rounding up. Defaults to + 25%.' + type: integer + rollingUpdateMaxUnavailable: + description: 'The maximum number of pods that can be unavailable + during the update. Value can be an absolute number (ex: + 5) or a percentage of desired pods (ex: 10%). Absolute number + is calculated from percentage by rounding down. This can + not be 0 if MaxSurge is 0. Defaults to 25%.' + type: integer + strategy: + description: The deployment strategy to use to replace existing + pods with new ones. + enum: + - Recreate + - RollingUpdate + type: string type: object environment: description: The configuration of Environment trait @@ -2340,6 +2362,28 @@ spec: defaults to 60s. format: int32 type: integer + rollingUpdateMaxSurge: + description: 'The maximum number of pods that can be scheduled + above the desired number of pods. Value can be an absolute + number (ex: 5) or a percentage of desired pods (ex: 10%). + This can not be 0 if MaxUnavailable is 0. Absolute number + is calculated from percentage by rounding up. Defaults to + 25%.' + type: integer + rollingUpdateMaxUnavailable: + description: 'The maximum number of pods that can be unavailable + during the update. Value can be an absolute number (ex: + 5) or a percentage of desired pods (ex: 10%). Absolute number + is calculated from percentage by rounding down. This can + not be 0 if MaxSurge is 0. Defaults to 25%.' + type: integer + strategy: + description: The deployment strategy to use to replace existing + pods with new ones. + enum: + - Recreate + - RollingUpdate + type: string type: object environment: description: The configuration of Environment trait diff --git a/helm/camel-k/crds/crd-integration.yaml b/helm/camel-k/crds/crd-integration.yaml index 9ef1f33a9..8108cf337 100644 --- a/helm/camel-k/crds/crd-integration.yaml +++ b/helm/camel-k/crds/crd-integration.yaml @@ -6211,6 +6211,28 @@ spec: defaults to 60s. format: int32 type: integer + rollingUpdateMaxSurge: + description: 'The maximum number of pods that can be scheduled + above the desired number of pods. Value can be an absolute + number (ex: 5) or a percentage of desired pods (ex: 10%). + This can not be 0 if MaxUnavailable is 0. Absolute number + is calculated from percentage by rounding up. Defaults to + 25%.' + type: integer + rollingUpdateMaxUnavailable: + description: 'The maximum number of pods that can be unavailable + during the update. Value can be an absolute number (ex: + 5) or a percentage of desired pods (ex: 10%). Absolute number + is calculated from percentage by rounding down. This can + not be 0 if MaxSurge is 0. Defaults to 25%.' + type: integer + strategy: + description: The deployment strategy to use to replace existing + pods with new ones. + enum: + - Recreate + - RollingUpdate + type: string type: object environment: description: The configuration of Environment trait diff --git a/helm/camel-k/crds/crd-kamelet-binding.yaml b/helm/camel-k/crds/crd-kamelet-binding.yaml index 1da869621..5821108e2 100644 --- a/helm/camel-k/crds/crd-kamelet-binding.yaml +++ b/helm/camel-k/crds/crd-kamelet-binding.yaml @@ -6497,6 +6497,28 @@ spec: It defaults to 60s. format: int32 type: integer + rollingUpdateMaxSurge: + description: 'The maximum number of pods that can be scheduled + above the desired number of pods. Value can be an absolute + number (ex: 5) or a percentage of desired pods (ex: + 10%). This can not be 0 if MaxUnavailable is 0. Absolute + number is calculated from percentage by rounding up. + Defaults to 25%.' + type: integer + rollingUpdateMaxUnavailable: + description: 'The maximum number of pods that can be unavailable + during the update. Value can be an absolute number (ex: + 5) or a percentage of desired pods (ex: 10%). Absolute + number is calculated from percentage by rounding down. + This can not be 0 if MaxSurge is 0. Defaults to 25%.' + type: integer + strategy: + description: The deployment strategy to use to replace + existing pods with new ones. + enum: + - Recreate + - RollingUpdate + type: string type: object environment: description: The configuration of Environment trait diff --git a/pkg/apis/camel/v1/trait/deployment.go b/pkg/apis/camel/v1/trait/deployment.go index c670a210f..9e96dc218 100644 --- a/pkg/apis/camel/v1/trait/deployment.go +++ b/pkg/apis/camel/v1/trait/deployment.go @@ -31,6 +31,7 @@ type DeploymentTrait struct { // is considered to be failed. It defaults to 60s. ProgressDeadlineSeconds *int32 `property:"progress-deadline-seconds" json:"progressDeadlineSeconds,omitempty"` // The deployment strategy to use to replace existing pods with new ones. + // +kubebuilder:validation:Enum=Recreate;RollingUpdate Strategy appsv1.DeploymentStrategyType `property:"strategy" json:"strategy,omitempty"` // The maximum number of pods that can be unavailable during the update. // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). diff --git a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go index 002296715..cab7a094d 100644 --- a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go +++ b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go @@ -233,6 +233,16 @@ func (in *DeploymentTrait) DeepCopyInto(out *DeploymentTrait) { *out = new(int32) **out = **in } + if in.RollingUpdateMaxUnavailable != nil { + in, out := &in.RollingUpdateMaxUnavailable, &out.RollingUpdateMaxUnavailable + *out = new(int) + **out = **in + } + if in.RollingUpdateMaxSurge != nil { + in, out := &in.RollingUpdateMaxSurge, &out.RollingUpdateMaxSurge + *out = new(int) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTrait. diff --git a/resources/traits.yaml b/resources/traits.yaml index 81686464b..5d9aa7c9d 100755 --- a/resources/traits.yaml +++ b/resources/traits.yaml @@ -333,6 +333,22 @@ traits: type: int32 description: The maximum time in seconds for the deployment to make progress before it is considered to be failed. It defaults to 60s. + - name: strategy + type: DeploymentStrategyType + description: The deployment strategy to use to replace existing pods with new + ones. + - name: rolling-update-max-unavailable + type: int + description: 'The maximum number of pods that can be unavailable during the update. + Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: + 10%). Absolute number is calculated from percentage by rounding down. This can + not be 0 if MaxSurge is 0. Defaults to 25%.' + - name: rolling-update-max-surge + type: int + description: 'The maximum number of pods that can be scheduled above the desired + number of pods. Value can be an absolute number (ex: 5) or a percentage of desired + pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is + calculated from percentage by rounding up. Defaults to 25%.' - name: environment platform: true profiles: