charts icon indicating copy to clipboard operation
charts copied to clipboard

feat: Add PDB API version override to support Kubernetes 1.25+

Open MaxLikesCode opened this issue 10 months ago • 0 comments

Makes the Pod Disruption Budget API version configurable in the k8soketi Helm chart and defaults to the stable policy/v1 API.

Changes

  • Template: Modified pdb.yaml template to use {{ .Values.pdb.apiVersion | default "policy/v1beta1" }} instead of hardcoded policy/v1beta1
  • Values: Added pdb.apiVersion: policy/v1 to use the stable API by default

Background

The policy/v1beta1 API for PodDisruptionBudget was:

  • Deprecated in Kubernetes 1.21
  • Removed in Kubernetes 1.25

Benefits

  • Forward compatible: Defaults to stable policy/v1 API
  • Backward compatible: Allows override to policy/v1beta1 for older clusters
  • Configurable: Users can set any API version via values
  • Safe upgrade path: Existing deployments continue working with fallback default

Testing

  • Verified template renders correctly with both API versions
  • Maintains existing functionality while supporting modern Kubernetes clusters

MaxLikesCode avatar Jun 19 '25 17:06 MaxLikesCode