You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/08/03 13:58:51 UTC

[GitHub] [camel-k] lburgazzoli opened a new pull request, #3511: re-deployment strategies

lburgazzoli opened a new pull request, #3511:
URL: https://github.com/apache/camel-k/pull/3511

   <!-- Description -->
   
   
   
   
   <!--
   Enter your extended release note in the below block. If the PR requires
   additional action from users switching to the new release, include the string
   "action required". If no release note is required, write "NONE". 
   
   You can (optionally) mark this PR with labels "kind/bug" or "kind/feature" to make sure
   the text is added to the right section of the release notes. 
   -->
   
   **Release Note**
   ```release-note
   NONE
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] astefanutti commented on a diff in pull request #3511: re-deployment strategies

Posted by GitBox <gi...@apache.org>.
astefanutti commented on code in PR #3511:
URL: https://github.com/apache/camel-k/pull/3511#discussion_r936715248


##########
pkg/apis/camel/v1/trait/deployment.go:
##########
@@ -26,4 +30,19 @@ type DeploymentTrait struct {
 	// The maximum time in seconds for the deployment to make progress before it
 	// 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.
+	Strategy appsv1.DeploymentStrategyType `property:"strategy" json:"strategy,omitempty"`

Review Comment:
   The CRDs need to be regenerated.



##########
pkg/apis/camel/v1/trait/deployment.go:
##########
@@ -26,4 +30,19 @@ type DeploymentTrait struct {
 	// The maximum time in seconds for the deployment to make progress before it
 	// 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.
+	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%).
+	// Absolute number is calculated from percentage by rounding down.
+	// This can not be 0 if MaxSurge is 0.
+	// Defaults to 25%.
+	RollingUpdateMaxUnavailable *int `property:"rolling-update-max-unavailable" json:"rollingUpdateMaxUnavailable,omitempty"`

Review Comment:
   Ideally rules to the CRDs for validation that these can only be set when the strategy is `RollingUpdate`, should be added with `x-kubernetes-validations`, but I don't think kubebuilder supports that yet.



##########
pkg/apis/camel/v1/trait/deployment.go:
##########
@@ -26,4 +30,19 @@ type DeploymentTrait struct {
 	// The maximum time in seconds for the deployment to make progress before it
 	// 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.
+	Strategy appsv1.DeploymentStrategyType `property:"strategy" json:"strategy,omitempty"`

Review Comment:
   I wonder if adding `// +kubebuilder:validation:Enum=Recreate;RollingUpdate` would work.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] astefanutti commented on a diff in pull request #3511: re-deployment strategies

Posted by GitBox <gi...@apache.org>.
astefanutti commented on code in PR #3511:
URL: https://github.com/apache/camel-k/pull/3511#discussion_r936831941


##########
pkg/apis/camel/v1/trait/deployment.go:
##########
@@ -26,4 +30,19 @@ type DeploymentTrait struct {
 	// The maximum time in seconds for the deployment to make progress before it
 	// 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.
+	Strategy appsv1.DeploymentStrategyType `property:"strategy" json:"strategy,omitempty"`

Review Comment:
   It worked 😃, the following `enum` has been generated, which makes admission rejecting invalid values:
   
   ```yaml
   strategy:
     description: The deployment strategy to use to replace existing pods with new ones.
     enum:
       - Recreate
       - RollingUpdate
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] lburgazzoli commented on pull request #3511: re-deployment strategies

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on PR #3511:
URL: https://github.com/apache/camel-k/pull/3511#issuecomment-1204488965

   Looks like the filing test is unrelated to this pr:
   
   ```
   --- PASS: TestKamelCLIVersion (0.12s)
       --- PASS: TestKamelCLIVersion/check_version_correctness (0.10s)
   FAIL
   FAIL	github.com/apache/camel-k/e2e/namespace/install/cli	2525.678s
   FAIL
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] astefanutti merged pull request #3511: re-deployment strategies

Posted by GitBox <gi...@apache.org>.
astefanutti merged PR #3511:
URL: https://github.com/apache/camel-k/pull/3511


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] lburgazzoli commented on a diff in pull request #3511: re-deployment strategies

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on code in PR #3511:
URL: https://github.com/apache/camel-k/pull/3511#discussion_r936744712


##########
pkg/apis/camel/v1/trait/deployment.go:
##########
@@ -26,4 +30,19 @@ type DeploymentTrait struct {
 	// The maximum time in seconds for the deployment to make progress before it
 	// 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.
+	Strategy appsv1.DeploymentStrategyType `property:"strategy" json:"strategy,omitempty"`

Review Comment:
   added, till I don't recall what to expect :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org