Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.6] Bug 1903887: Set DNS DaemonSet's maxUnavailable value to 10% #219

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions assets/dns/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,9 @@ spec:
tolerations:
# DNS needs to run everywhere. Tolerate all taints
- operator: Exists
updateStrategy:
type: RollingUpdate
rollingUpdate:
# Note: The daemon controller rounds the percentage up
# (unlike the deployment controller, which rounds down).
maxUnavailable: 10%
8 changes: 4 additions & 4 deletions pkg/manifests/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/operator/controller/controller_dns_daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ func daemonsetConfigChanged(current, expected *appsv1.DaemonSet) (bool, *appsv1.
changed := false
updated := current.DeepCopy()

if !cmp.Equal(current.Spec.UpdateStrategy, expected.Spec.UpdateStrategy, cmpopts.EquateEmpty()) {
updated.Spec.UpdateStrategy = expected.Spec.UpdateStrategy
changed = true
}

for _, name := range []string{"dns", "dns-node-resolver", "kube-rbac-proxy"} {
var curIndex int
var curImage, expImage string
Expand Down