-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Convert both namespace and limitrange examples to v1beta3 #5050
Conversation
restartPolicy: | ||
always: {} | ||
volumes: null | ||
status: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary fields, like status.
Manually redo the conversion now since the tool not just generates default fields, but also convert json to yaml. |
287ef70
to
50a04d7
Compare
|
||
It does this by providing the following: | ||
|
||
1. A scope for [Names](../../docs/identifiers.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need one more level of ../
Ok, done it. PATL? |
I would like to try the LimitRange changes tomorrow to be sure that units are still right. I thought units changed between beta1 and beta3. Sent from my iPhone
|
"image": "kubernetes/serve_hostname", | ||
"resources": { | ||
"limits": { | ||
"cpu": 1000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "1" (must be a string and is in cores, not millicores).
3efd9b5
to
d8f7c9f
Compare
Fixed units issue, and run all example against v1beta3. Everything looks fine except invalid_pod is not rejected, and I believe because we don't enable mission control by default yet. $ cluster/kubectl.sh --api-version=v1beta3 create -f examples/limitrange/v1beta3/valid-pod.json $ cluster/kubectl.sh --api-version=v1beta3 get pods valid-pod |
"image": "kubernetes/serve_hostname", | ||
"resources": { | ||
"limits": { | ||
"cpu": 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must be strings!!!
Reassigning to @derekwaynecarr for final review. |
Addressed all comments. Surprisingly when I tested it against v1beta3 apiserver, all errors are not detected by validation code. :-( PTAL |
It would be rejected when it's enabled which I will do for all salt providers hopefully tomorrow. Sent from my iPhone
|
I tested the limit range scenario on a server with the admission control checks in place and invalid-pod is properly rejected and valid-pod is properly accepted. LGTM. |
Convert both namespace and limitrange examples to v1beta3
@derekwaynecarr Did you ever think about enable that module by default? It won't have any impact if there is no limits object created anyway, right? :-) |
@dchen1107 - I am literally doing that right now for all the salt based providers in a PR I am testing on GCE now ;-) When #4749 merges, it has no substantive perf impact to not always have on across all providers. |
Good to know that. Thanks! |
changes: 1) apiVersion 2) replace id with name