-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(kgo): add PodDisruptionBudget guide (#7729)
* docs(kgo): add PodDisruptionBudget guide * Update app/_src/gateway-operator/customization/pod-disruption-budget.md Co-authored-by: Patryk Małek <[email protected]> * Update app/_src/gateway-operator/customization/pod-disruption-budget.md Co-authored-by: Patryk Małek <[email protected]> * Apply suggestions from code review Co-authored-by: Jakub Warczarek <[email protected]> * Apply suggestions from code review Co-authored-by: lena-larionova <[email protected]> --------- Co-authored-by: Patryk Małek <[email protected]> Co-authored-by: Jakub Warczarek <[email protected]> Co-authored-by: lena-larionova <[email protected]>
- Loading branch information
1 parent
9ea265b
commit 8e1f56f
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
app/_src/gateway-operator/customization/pod-disruption-budget.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: Defining PodDisruptionBudget for DataPlane | ||
--- | ||
|
||
`DataPlane` resources can be configured with a `PodDisruptionBudget` to control: | ||
- The number or percentage of pods that can be unavailable during maintenance (e.g. rollout). | ||
- The number or percentage of pods that must be available during maintenance (e.g. rollout). | ||
|
||
This is useful to ensure that a certain number or percentage of pods are always available. | ||
|
||
See the [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) guide | ||
for more details on the `PodDisruptionBudget` API itself. | ||
|
||
## Creating a DataPlane with PodDisruptionBudget | ||
|
||
For `DataPlane` resources, you can define a `PodDisruptionBudget` in the `spec.resources.podDisruptionBudget` field. | ||
The `DataPlane`'s `spec.resources.podDisruptionBudget.spec` matches the `PodDisruptionBudget` API, excluding | ||
the `selector` field, which is automatically set by {{ site.kgo_product_name }} to match the `DataPlane` pods. | ||
|
||
Here is an example of a `DataPlane` resource with a `PodDisruptionBudget`: | ||
|
||
```yaml | ||
apiVersion: gateway-operator.konghq.com/v1beta1 | ||
kind: DataPlane | ||
metadata: | ||
name: dataplane-with-pdb | ||
spec: | ||
resources: | ||
podDisruptionBudget: | ||
spec: | ||
maxUnavailable: 1 | ||
deployment: | ||
replicas: 3 | ||
podTemplateSpec: | ||
spec: | ||
containers: | ||
- name: proxy | ||
image: kong/kong-gateway:{{ site.data.kong_latest_gateway.ee-version }} | ||
``` | ||
If you leave the `resources.podDisruptionBudget` field empty, {{ site.kgo_product_name }} will not create a | ||
`PodDisruptionBudget` for the `DataPlane`. |