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

Issue with k8s.io/docs/tasks/run-application/configure-pdb/ (percentage documentation) #14682

Closed
jasongwartz opened this issue Jun 1, 2019 · 1 comment · Fixed by #14788
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language

Comments

@jasongwartz
Copy link
Contributor

This is a Bug Report

Problem:
The docs regarding pdb rounding (as introduced in #14408) specify:

When you specify a percentage by setting the value to a floating-point value between 0 and 1, it represents a percentage of total Pods. For instance, if you set minUnavailable to .5, then only 50% of the Pods can be unavailable during a disruption.

However, minUnavailable needs to be either an int32 or a string-percentage (as "50%"), as per:

https://github.com/kubernetes/kubernetes/blob/f1883c9/pkg/controller/disruption/disruption.go#L586
and
https://github.com/kubernetes/apimachinery/blob/master/pkg/util/intstr/intstr.go#L153
and finally
https://github.com/kubernetes/apimachinery/blob/master/pkg/util/intstr/intstr.go#L175

Trying to deploy a PodDisruptionBudget with "minAvailable: 0.5" yields the following error: Error from server: json: cannot unmarshal number 0.5 into Go value of type int32

Proposed Solution:
Update the docs to reflect how to specify maxUnavailable and minAvailable as a percentage.

Page to Update:
Issue with k8s.io/docs/tasks/run-application/configure-pdb/

If the confusion is legitimate (sorry if it's just my misreading!), then I'm happy to contribute a PR.

@sftim
Copy link
Contributor

sftim commented Jun 2, 2019

That looks like a convincing explanation as to why the docs need updating.
/kind bug
/language en

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language labels Jun 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants