Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(kgo): add PodDisruptionBudget guide #7729

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions app/_data/docs_nav_kgo_1.4.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
product: gateway-operator
release: 1.4.x
generate: true
assume_generated: true
items:
- title: Introduction
icon: /assets/images/icons/documentation/icn-flag.svg
items:
- text: Overview
url: /gateway-operator/1.4.x/
absolute_url: true
- text: Deployment Topologies
items:
- text: Hybrid Mode
url: /topologies/hybrid/
- text: DB-less Mode
url: /topologies/dbless/
- text: Key Concepts
items:
- text: Gateway API
url: /concepts/gateway-api
- text: Gateway Configuration
url: /concepts/gateway-configuration
- text: Managed Gateways
url: /concepts/managed-gateways
- text: Changelog
url: /gateway-operator/changelog
absolute_url: true
- text: Version Support Policy
url: /support
- text: FAQ
url: /faq
- title: Get Started
icon: /assets/images/icons/documentation/icn-learning.svg
items:
- text: Konnect
items:
- text: Install Gateway Operator
url: /get-started/konnect/install/
- text: Deploy a Data Plane
url: /get-started/konnect/deploy-data-plane/
- text: Create a Route
url: /get-started/konnect/create-route/
- text: Kong Ingress Controller
items:
- text: Install Gateway Operator
url: /get-started/kic/install/
- text: Create a Gateway
url: /get-started/kic/create-gateway/
- text: Create a Route
url: /get-started/kic/create-route/
- title: Production Deployment
icon: /assets/images/icons/icn-server.svg
items:
- text: Overview
url: /production/
- text: Install
url: /install/
- text: Enterprise License
url: /license/
- text: Monitoring
items:
- text: Metrics
url: /production/monitoring/metrics/
- text: Status fields
items:
- text: Overview
url: /production/monitoring/status/overview/
- text: DataPlane
url: /production/monitoring/status/dataplane/
- text: ControlPlane
url: /production/monitoring/status/controlplane/
- text: Gateway
url: /production/monitoring/status/gateway/
- text: Upgrade Gateway Operator
url: /production/upgrade/gateway-operator/
- title: Guides
icon: /assets/images/icons/documentation/icn-solution-guide.svg
items:
- text: AI Gateway
url: /guides/ai-gateway/
- text: Customization
items:
- text: Set data plane image
url: /customization/data-plane-image/
- text: Deploying Sidecars
url: /customization/sidecars/
- text: Customizing PodTemplateSpec
url: /customization/pod-template-spec/
- text: Defining PodDisruptionBudget for DataPlane
url: /customization/pod-disruption-budget/
- text: Autoscaling Kong Gateway
url: /guides/autoscaling-kong/
- text: Autoscaling Workloads
items:
- text: Overview
url: /guides/autoscaling-workloads/overview/
- text: Prometheus
url: /guides/autoscaling-workloads/prometheus/
- text: Datadog
url: /guides/autoscaling-workloads/datadog/
- text: Upgrading Data Planes
items:
- text: Rolling Deployment
url: /guides/upgrade/data-plane/rolling/
- text: Blue / Green Deployment
url: /guides/upgrade/data-plane/blue-green/
- title: Reference
icon: /assets/images/icons/icn-magnifying-glass.svg
items:
- text: Custom Resources
items:
- text: Overview
url: /reference/custom-resources/
src: reference/custom-resources/1.4.x
- text: GatewayConfiguration
url: /reference/custom-resources/#gatewayconfiguration
generate: false
- text: ControlPlane
url: /reference/custom-resources/#controlplane
generate: false
- text: DataPlane
url: /reference/custom-resources/#dataplane
generate: false
- text: License
url: /reference/license
- text: Version Compatibility
url: /reference/version-compatibility
6 changes: 6 additions & 0 deletions app/_data/kong_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@
releaseDate: "2024-06-24"
endOfLifeDate: "2025-06-24"
latest: true
- edition: gateway-operator
version: 1.4.0
release: 1.4.x
releaseDate: "TBA"
endOfLifeDate: "TBA"
label: unreleased
- edition: mesh
version: 1.2.6
release: 1.2.x
Expand Down
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 `PodDisruptionBudget` API itself.

## Creating DataPlane with PodDisruptionBudget
pmalek marked this conversation as resolved.
Show resolved Hide resolved

For `DataPlane` resources, you can define a `PodDisruptionBudget` in the `spec.resources.podDisruptionBudget` field.
`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`.
Loading
Loading