Users must be allowed to specify Disruption Budget for the Policy Server workloads.
The PolicyServer CRD must be extended to have the following new numerical attributes:
minAvailable: which is a description of the number of pods from that set that must still be available after the eviction, even in the absence of the evicted pod. minAvailable can be either an absolute number or a percentage.
maxUnavailable: which is a description of the number of pods from that set that can be unavailable after the eviction. It can be either an absolute number or a percentage.
Note, both fields are optional. According to PodDisruptionBudgetSpec they are both omitempty.
When set, the kubewarden-controller will create a v1/PodDisruptionBudget object that has the attributed provided by the user. The selector attribute will be created by the controller to match the pods of the PolicyServer instance the CRD refers to.
Note: the PDB spec has a beta feature called unhealthyPodEvictionPolicy. This is currently in beta phase, we will not handle it during this first iteration.
Admission Criteria
[x] The PolicyServer CRD has two new attributes: minAvailable and maxUnavailable. Both are optional and have type *intstr.IntOrString. See the PodDisruptionBudgetSpec definition for details
[x] When one of these new attributes is set, a PodDistruptionBudget object is created by the controller
[x] When these fields are unset, the associated PodDisruptionBudget object is deleted by the controller
[x] When none of these fields are set, there's no PodDisruptionBudget object associated with the PolicyServer
[x] The PodDisruptionBudget targets the Pods of the specific PolicyServer instance that is being reconciled
[x] Each PolicyServer instance can have a different PDB strategy
[x] The helm charts are updated to allow tuning of these new attributes
[x] The CRD documentation is updated to reflect this change
[x] The project documentation mentions this new attribute
Is your feature request related to a problem?
This is a feature part of this epic
Solution you'd like
Users must be allowed to specify Disruption Budget for the Policy Server workloads.
The
PolicyServer
CRD must be extended to have the following new numerical attributes:minAvailable
: which is a description of the number of pods from that set that must still be available after the eviction, even in the absence of the evicted pod. minAvailable can be either an absolute number or a percentage.maxUnavailable
: which is a description of the number of pods from that set that can be unavailable after the eviction. It can be either an absolute number or a percentage.Note, both fields are optional. According to PodDisruptionBudgetSpec they are both
omitempty
.When set, the kubewarden-controller will create a
v1/PodDisruptionBudget
object that has the attributed provided by the user. Theselector
attribute will be created by the controller to match the pods of the PolicyServer instance the CRD refers to.Note: the PDB spec has a beta feature called
unhealthyPodEvictionPolicy
. This is currently in beta phase, we will not handle it during this first iteration.Admission Criteria
minAvailable
andmaxUnavailable
. Both are optional and have type*intstr.IntOrString
. See thePodDisruptionBudgetSpec
definition for details