From 17ddb19ada67c933698ed934ecf128d43069b2b5 Mon Sep 17 00:00:00 2001 From: Matt Liggett Date: Tue, 16 Aug 2016 15:29:28 -0700 Subject: [PATCH] Add TODO comment. --- pkg/controller/disruption/disruption.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/controller/disruption/disruption.go b/pkg/controller/disruption/disruption.go index 8b80a9bcc69..5d81fbf28ba 100644 --- a/pkg/controller/disruption/disruption.go +++ b/pkg/controller/disruption/disruption.go @@ -462,6 +462,10 @@ func (dc *DisruptionController) trySync(pdb *policy.PodDisruptionBudget) error { func (dc *DisruptionController) getExpectedPodCount(pdb *policy.PodDisruptionBudget, pods []*api.Pod) (expectedCount, desiredHealthy int32, err error) { err = nil + // TODO(davidopp): consider making the way expectedCount and rules about + // permitted controller configurations (specifically, considering it an error + // if a pod covered by a PDB has 0 controllers or > 1 controller) should be + // handled the same way for integer and percentage minAvailable if pdb.Spec.MinAvailable.Type == intstr.Int { desiredHealthy = pdb.Spec.MinAvailable.IntVal expectedCount = int32(len(pods))