Skip to content

[feat] add support for PodDisruptionBudgets for retool backend#8

Merged
peterwj merged 1 commit intomainfrom
peterwj/pod-disruption-budget
Mar 19, 2021
Merged

[feat] add support for PodDisruptionBudgets for retool backend#8
peterwj merged 1 commit intomainfrom
peterwj/pod-disruption-budget

Conversation

@peterwj
Copy link
Copy Markdown
Contributor

@peterwj peterwj commented Mar 19, 2021

This diff allows users to specify a PodDisruptionBudget in their values file,
instructing Kubernetes to protect the application

Testing plan

  1. Create a minikube cluster with two nodes:
$ minikube start
$ minikube node add
  1. Install retool into the cluster, with a replica count of three:
$ helm upgrade --install --values values.yaml  myretool . --set replicaCount=3
  1. Uncomment the example in the values file, then upgrade again:
$ helm upgrade --values values.yaml  myretool . --set replicaCount=3
  1. Confirm presence of PodDisruptionBudget:
$ kubectl describe poddisruptionbudget myretool
Name:             myretool
Namespace:        default
Max unavailable:  1
Selector:         app.kubernetes.io/instance=myretool,app.kubernetes.io/name=retool
Status:
    Allowed disruptions:  0
    Current:              1
    Desired:              2
    Total:                3
Events:                   <none>
  1. Attempt to take down a node running two copies of myretool:
± % kubectl drain minikube-m02 --ignore-daemonsets
node/minikube-m02 cordoned
WARNING: ignoring DaemonSet-managed Pods: kube-system/kindnet-zmd4g, kube-system/kube-proxy-g8mhx
evicting pod default/myretool-fcdd777fc-q4hzq
evicting pod default/myretool-fcdd777fc-9b45f
error when evicting pods/"myretool-fcdd777fc-9b45f" -n "default" (will retry after 5s): Cannot evict pod as it would violate the pod's disruption budget.

Closes [REQ-38](https://linear.app/retool/issue/REQ-38/add-pod-disruption-budget-in-helm-2-and-helm-3-charts)

This diff allows users to specify a PodDisruptionBudget in their values file,
instructing Kubernetes to protect the application

\# Testing plan
1. Create a minikube cluster with two nodes:

```
$ minikube start
$ minikube node add
```

2. Install retool into the cluster, with a replica count of three:
```
$ helm upgrade --install --values values.yaml  myretool . --set replicaCount=3
```

3. Uncomment the example in the values file, then upgrade again:
```
$ helm upgrade --values values.yaml  myretool . --set replicaCount=3
```

4. Confirm presence of PodDisruptionBudget:
```
$ kubectl describe poddisruptionbudget myretool
Name:             myretool
Namespace:        default
Max unavailable:  1
Selector:         app.kubernetes.io/instance=myretool,app.kubernetes.io/name=retool
Status:
    Allowed disruptions:  0
    Current:              1
    Desired:              2
    Total:                3
Events:                   <none>
```

5. Attempt to take down a node running two copies of `myretool`:
```
± % kubectl drain minikube-m02 --ignore-daemonsets
node/minikube-m02 cordoned
WARNING: ignoring DaemonSet-managed Pods: kube-system/kindnet-zmd4g, kube-system/kube-proxy-g8mhx
evicting pod default/myretool-fcdd777fc-q4hzq
evicting pod default/myretool-fcdd777fc-9b45f
error when evicting pods/"myretool-fcdd777fc-9b45f" -n "default" (will retry after 5s): Cannot evict pod as it would violate the pod's disruption budget.
```
@peterwj peterwj requested a review from kyle-retool March 19, 2021 18:01
Copy link
Copy Markdown
Contributor

@kyle-retool kyle-retool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@peterwj peterwj merged commit 6cbaa0b into main Mar 19, 2021
@peterwj peterwj deleted the peterwj/pod-disruption-budget branch March 19, 2021 18:14
asaf400 pushed a commit to asaf400/retool-helm that referenced this pull request Aug 17, 2023
* add support for mTLS with external temporal cluster

* typo fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants