Skip to content

Commit

Permalink
docs(kgo): add PodDisruptionBudget guide
Browse files Browse the repository at this point in the history
  • Loading branch information
czeslavo committed Aug 7, 2024
1 parent e301fe8 commit dfed6a4
Show file tree
Hide file tree
Showing 4 changed files with 1,452 additions and 0 deletions.
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: ""
endOfLifeDate: ""
label: unreleased
- edition: mesh
version: 1.2.6
release: 1.2.x
Expand Down
38 changes: 38 additions & 0 deletions app/_src/gateway-operator/customization/pod-disruption-budget.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Defining PodDisruptionBudget for DataPlane
---

`DataPlane` resources can be configured with a `PodDisruptionBudget` to control the number of pods that can be unavailable
during maintenance. This is useful when you want to ensure that a certain number 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

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:3.7
```
If you leave the `resources.podDisruptionBudget` field empty, {{ site.kgo_product_name }} will not create a
`PodDisruptionBudget` for the `DataPlane`.
Loading

0 comments on commit dfed6a4

Please sign in to comment.