Skip to content

Commit bbbb2ec

Browse files
committed
Fix default values for MaxUnavailable and MaxSurge
The implementation defines the default value for MaxSurge being 0, as to preserve the current behavior of rolling updates in DaemonSets. Also, for MaxUnavailable, the rounding is up. This change is just a copy-paste of the docblock defined in the types.go file. See: - https://github.com/kubernetes/kubernetes/blob/10a3cc815bea73f78f7126cab5df95233da96e1b/pkg/apis/apps/types.go - https://github.com/kubernetes/kubernetes/blob/10a3cc815bea73f78f7126cab5df95233da96e1b/pkg/apis/apps/v1/defaults.go#L87-L91
1 parent 11a976c commit bbbb2ec

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

keps/sig-apps/1591-daemonset-surge/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type RollingUpdateDaemonSet struct {
5252
// The maximum number of DaemonSet pods that can be unavailable during the
5353
// update. Value can be an absolute number (ex: 5) or a percentage of total
5454
// number of DaemonSet pods at the start of the update (ex: 10%). Absolute
55-
// number is calculated from percentage by rounding down to a minimum of one.
55+
// number is calculated from percentage by rounding up.
5656
// This cannot be 0 if MaxSurge is 0
5757
// Default value is 1.
5858
// Example: when this is set to 30%, at most 30% of the total number of nodes
@@ -71,15 +71,15 @@ type RollingUpdateDaemonSet struct {
7171
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
7272
// This can not be 0 if MaxUnavailable is 0.
7373
// Absolute number is calculated from percentage by rounding up to a minimum of 1.
74-
// Defaults to 25%.
74+
// Default value is 0.
7575
// Example: when this is set to 30%, at most 30% of the total number of nodes
7676
// that should be running the daemon pod (i.e. status.desiredNumberScheduled)
7777
// can have their a new pod created before the old pod is marked as deleted.
78-
// The update starts by launching new pods on 30% of nodes. Once an updated
79-
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
80-
// on that node is marked deleted. If the old pod becomes unavailable for any
81-
// reason (Ready transitions to false, is evicted, or is drained) an updated
82-
// pod is immediatedly created on that node without considering surge limits.
78+
// The update starts by launching new pods on 30% of nodes. Once an updated
79+
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
80+
// on that node is marked deleted. If the old pod becomes unavailable for any
81+
// reason (Ready transitions to false, is evicted, or is drained) an updated
82+
// pod is immediately created on that node without considering surge limits.
8383
// Allowing surge implies the possibility that the resources consumed by the
8484
// daemonset on any given node can double if the readiness check fails, and
8585
// so resource intensive daemonsets should take into account that they may

0 commit comments

Comments
 (0)