Skip to main content

PDBPolicy API Reference

API Group: availability.pdboperator.io/v1alpha1

PDBPolicy​

FieldTypeDescription
apiVersionstringavailability.pdboperator.io/v1alpha1
kindstringPDBPolicy
metadataObjectMetaStandard Kubernetes metadata
specPDBPolicySpecDesired state
statusPDBPolicyStatusObserved state (read-only)

PDBPolicySpec​

FieldTypeDefaultDescription
availabilityClassstring(required)One of: non-critical, standard, high-availability, mission-critical, custom
workloadSelectorWorkloadSelector(required)Defines which workloads this policy applies to
enforcementstringadvisoryEnforcement mode: strict, flexible, advisory
priorityint3250Policy priority (0-1000). Higher number wins when multiple policies match
minimumClassstringMinimum allowed class (used with flexible enforcement)
allowOverridebooltrueWhether annotations can override this policy
overrideRequiresAnnotationstringAnnotation key required for override
overrideRequiresReasonboolfalseRequire pdboperator.io/override-reason annotation for overrides
maintenanceWindows[]MaintenanceWindowScheduled maintenance windows
customPDBConfigPodDisruptionBudgetConfigCustom PDB settings (required when availabilityClass: custom)
enforceMinReplicasbooltrueSkip PDB creation for single-replica deployments

WorkloadSelector​

FieldTypeDescription
matchLabelsmap[string]stringLabel key-value pairs that must match
matchExpressions[]LabelSelectorRequirementLabel selector expressions
workloadNames[]stringSpecific deployment names to match
workloadFunctions[]stringTarget by function: core, management, security
namespaces[]stringNamespaces to scope the policy to

MaintenanceWindow​

FieldTypeDefaultDescription
startstring(required)Start time in HH:MM format
endstring(required)End time in HH:MM format
timezonestringUTCIANA timezone
daysOfWeek[]int(required)Days of week (0=Sunday, 6=Saturday)

PodDisruptionBudgetConfig​

FieldTypeDescription
minAvailablestringMinimum available pods (number or percentage). Mutually exclusive with maxUnavailable
maxUnavailablestringMaximum unavailable pods (number or percentage). Mutually exclusive with minAvailable
unhealthyPodEvictionPolicystringIfHealthyBudget or AlwaysAllow

PDBPolicyStatus​

FieldTypeDescription
conditions[]ConditionStandard Kubernetes conditions
appliedToWorkloads[]stringList of workloads this policy currently applies to
pdbsManaged[]stringList of PDB names managed by this policy
lastAppliedTimeTimeLast time the policy was successfully applied
observedGenerationint64Last observed generation of the policy

Short Names​

The PDBPolicy resource supports the short name pdbp:

kubectl get pdbp