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/04/24 23:48:54 UTC
[GitHub] [camel-k] Gre8t opened a new pull request, #3232: added documentation for Pod disruption budget
Gre8t opened a new pull request, #3232:
URL: https://github.com/apache/camel-k/pull/3232
<!-- Description -->
This is the docs for PDB trait.
fixes issue #3145
<!--
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] squakez commented on pull request #3232: added documentation for Pod disruption budget
Posted by GitBox <gi...@apache.org>.
squakez commented on PR #3232:
URL: https://github.com/apache/camel-k/pull/3232#issuecomment-1111062304
@Gre8t you requested a new review, but I don't see any change since last review
--
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] squakez commented on a diff in pull request #3232: added documentation for Pod disruption budget
Posted by GitBox <gi...@apache.org>.
squakez commented on code in PR #3232:
URL: https://github.com/apache/camel-k/pull/3232#discussion_r857672819
##########
examples/traits/pdb/Pdb.java:
##########
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//kamel run pdb.java --trait pdb.enable=true --trait pdb.min-available=2
Review Comment:
Pdb uppercase
##########
examples/traits/pdb/PdbModeline.java:
##########
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// kamel run pdbModeline.java --trait pdb.enable=true --trait pdb.min-available=2
Review Comment:
PdbModeline uppercase
##########
examples/traits/pdb/README.md:
##########
@@ -0,0 +1,20 @@
+# Camel-k PDB Trait
+
+This is an example of a Pod Distruption Budget for an integration pod running on the cluster.
+You can set a `minumum available` or a `maximum unavailable` pods, it all depends on your eviction policy.
+
+ **Note:** This trait is best used on a multi-node cluster. Also, you can only use one trait command. Either a `minimum available` or a `maximum unavailable`
Review Comment:
Better to tell the trait is more suitable to show its features on a cluster with more than a single node (ie, minikube).
##########
examples/traits/pdb/README.md:
##########
@@ -0,0 +1,20 @@
+# Camel-k PDB Trait
+
+This is an example of a Pod Distruption Budget for an integration pod running on the cluster.
+You can set a `minumum available` or a `maximum unavailable` pods, it all depends on your eviction policy.
+
+ **Note:** This trait is best used on a multi-node cluster. Also, you can only use one trait command. Either a `minimum available` or a `maximum unavailable`
+
+Example:
+
+ kamel run pdb.java --trait pdb.enable=true --trait pdb.min-available=2
+
+This runs at least 2 pods no matter what resources is needed by your scheduler. Unless you do a forcefull pod delete.
+
+ kamel run pdb.java --trait pdb.enabled=true --trait pdb.max-unavailable=1
+In this pod disruption budget, we have set the max unavailable pod to 1. Whenever our eviction policy kicks in, it must respect our budjet to always have only one pod unavailable. So, if we have a 3 pods integration deployment, and our policy is evicting pods to free up resources, there would only be a maximum of 1 pod evicted out of our deployment.
+
+## Using ModeLine
+
+ $Kamel run pdbModeline.java
Review Comment:
Indent one less, and also `kamel` lowercase
--
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] Gre8t commented on pull request #3232: added documentation for Pod disruption budget
Posted by GitBox <gi...@apache.org>.
Gre8t commented on PR #3232:
URL: https://github.com/apache/camel-k/pull/3232#issuecomment-1107941801
@astefanutti @squakez
--
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] github-actions[bot] commented on pull request #3232: added documentation for Pod disruption budget
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #3232:
URL: https://github.com/apache/camel-k/pull/3232#issuecomment-1250421557
This PR has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!
--
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] squakez commented on a diff in pull request #3232: added documentation for Pod disruption budget
Posted by GitBox <gi...@apache.org>.
squakez commented on code in PR #3232:
URL: https://github.com/apache/camel-k/pull/3232#discussion_r857358732
##########
examples/traits/pdb/README.md:
##########
@@ -0,0 +1,21 @@
+# Camel-k PDB Trait
+
+This is an example of a Pod Distruption Budget for an integration pod running on the cluster.
+You can set a `minumum available` or a `maximum unavailable` pods, it all depends on your eviction policy.
+
+ **Note:** You can only use one trait command. Either a `minimum available` or a `maximum unavailable`
+
+Example:
+
+ kamel run pdb.java --trait pdb.enable=true --trait pdb.min-available=2
+
+This runs at least 2 pods no matter what resources is needed by your scheduler. Unless you do a forcefull pod delete.
+
+ kamel run pdb.java --trait pdb.enabled=true --trait pdb.max-unavailable=1
+In this pod disruption budget, we have set the max unavailable pod to 1. Whenever our eviction policy kicks in, it must respect our budjet to always have only one pod unavailable. So, if we have a 3 pods integration deployment, and our policy is evicting pods to free up resources, there would only be a maximum of 1 pod evicted out of our deployment.
+
+## Using ModeLine
+
+ $Kamel run pdbModeline.java
+
+If you don't know what modeline is, see [Link](https://camel.apache.org/camel-k/1.8.x/cli/modeline.html)
Review Comment:
I'd remove this line in this example
##########
examples/traits/pdb/pdb.java:
##########
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//kamel run pdb.java --trait pdb.enable=true --trait pdb.min-available=2
+
+import org.apache.camel.Exchange;
+
+public class Pdb extends org.apache.camel.builder.RouteBuilder {
Review Comment:
File must be called as the class, ie, Pdb.java
##########
examples/traits/pdb/README.md:
##########
@@ -0,0 +1,21 @@
+# Camel-k PDB Trait
+
+This is an example of a Pod Distruption Budget for an integration pod running on the cluster.
+You can set a `minumum available` or a `maximum unavailable` pods, it all depends on your eviction policy.
+
+ **Note:** You can only use one trait command. Either a `minimum available` or a `maximum unavailable`
Review Comment:
I think we should comment that this trait is better tested on a Cluster with more than one node available, as it would be difficult to show it in action on a single node cluster local machine.
##########
examples/traits/pdb/pdbModeline.java:
##########
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// kamel run pdbModeline.java --trait pdb.enable=true --trait pdb.min-available=2
+// camel-k: trait=pdb.enable=true,trait=pdb.min-available=2
+
+import org.apache.camel.Exchange;
+
+public class pdbModeline extends org.apache.camel.builder.RouteBuilder {
Review Comment:
Both class and file should be PdbModeline
--
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