kcp-dev / helm-charts

Helm chart repo for KCP
Apache License 2.0
4 stars 18 forks source link

Add PodDisruptionBudgets for all KCP components #89

Closed cbuto closed 1 month ago

cbuto commented 1 month ago

This PR adds an optional PodDisruptionBudget for KCP, front proxy, and etcd. This ensures that each component remains available during node draining/upgrades.

KCP server - if enabled, defaults to minAvailable = 1 front proxy - same as KCP server. if enabled, defaults to minAvailable = 1 etcd - if enabled, defaults to maxUnavailable = 1

Tested locally via updating the ./hack/kind-values.yaml

diff --git a/hack/kind-values.yaml b/hack/kind-values.yaml
index b14c13f..0b8358c 100644
--- a/hack/kind-values.yaml
+++ b/hack/kind-values.yaml
@@ -1,14 +1,22 @@
 externalHostname: "kcp.dev.local"
 etcd:
-  enabled: false
+  enabled: true
+  podDisruptionBudget:
+    enabled: true
 kcp:
+  replicas: 2
   # tag is set via --set flag to make it more dynamic for testing purposes
   volumeClassName: "standard"
   tokenAuth:
     enabled: true
   etcd:
-    serverAddress: embedded
+    serverAddress: ""
+  podDisruptionBudget:
+    enabled: true
 kcpFrontProxy:
+  replicas: 2
+  podDisruptionBudget:
+    enabled: true
   # tag is set via --set flag to make it more dynamic for testing purposes
   openshiftRoute:
     enabled: false

k get poddisruptionbudgets -A

NAMESPACE   NAME              MIN AVAILABLE   MAX UNAVAILABLE   ALLOWED DISRUPTIONS   AGE
kcp         kcp               1               N/A               1                     6m44s
kcp         kcp-etcd          N/A             1                 1                     6m44s
kcp         kcp-front-proxy   1               N/A               1                     6m44s
kcp-ci-bot commented 1 month ago

Hi @cbuto. Thanks for your PR.

I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
sttts commented 1 month ago

/ok-to-test

mjudeikis commented 1 month ago

/lgtm /Approve

kcp-ci-bot commented 1 month ago

LGTM label has been added.

Git tree hash: dee2f18489e9308d9fa5d012987b653138a3dc50

kcp-ci-bot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mjudeikis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kcp-dev/helm-charts/blob/main/OWNERS)~~ [mjudeikis] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment