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

Convert both namespace and limitrange examples to v1beta3 #5050

Merged
merged 2 commits into from
Mar 6, 2015

Conversation

dchen1107
Copy link
Member

changes: 1) apiVersion 2) replace id with name

@dchen1107 dchen1107 added this to the Doc Fixit milestone Mar 4, 2015
@dchen1107 dchen1107 changed the title Convert namespace example to v1beta3 Convert both namespace and limitrange examples to v1beta3 Mar 4, 2015
@dchen1107
Copy link
Member Author

#3671

@bgrant0607 bgrant0607 self-assigned this Mar 4, 2015
restartPolicy:
always: {}
volumes: null
status: {}
Copy link
Member

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.

@dchen1107
Copy link
Member Author

Manually redo the conversion now since the tool not just generates default fields, but also convert json to yaml.

@dchen1107 dchen1107 force-pushed the cleanup branch 2 times, most recently from 287ef70 to 50a04d7 Compare March 4, 2015 22:42

It does this by providing the following:

1. A scope for [Names](../../docs/identifiers.md).
Copy link
Member

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 ../

@dchen1107
Copy link
Member Author

Ok, done it. PATL?

@derekwaynecarr
Copy link
Member

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

On Mar 4, 2015, at 6:56 PM, Dawn Chen notifications@github.com wrote:

Ok, done it. PATL?


Reply to this email directly or view it on GitHub.

"image": "kubernetes/serve_hostname",
"resources": {
"limits": {
"cpu": 1000,
Copy link
Member

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).

@dchen1107 dchen1107 force-pushed the cleanup branch 3 times, most recently from 3efd9b5 to d8f7c9f Compare March 5, 2015 21:18
@dchen1107
Copy link
Member Author

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
current-context: "golden-system-455_kubernetes"

$ cluster/kubectl.sh --api-version=v1beta3 get pods valid-pod
current-context: "golden-system-455_kubernetes"
Running: cluster/../cluster/gce/../../_output/dockerized/bin/linux/amd64/kubectl --api-version=v1beta3 get pods valid-pod
POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS CREATED
valid-pod 10.244.2.117 kubernetes-serve-hostname kubernetes/serve_hostname kubernetes-minion-gs3d.c.golden-system-455.internal/104.197.14.122 Pending 19 seconds

"image": "kubernetes/serve_hostname",
"resources": {
"limits": {
"cpu": 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be strings!!!

@bgrant0607
Copy link
Member

Reassigning to @derekwaynecarr for final review.

@dchen1107
Copy link
Member Author

Addressed all comments. Surprisingly when I tested it against v1beta3 apiserver, all errors are not detected by validation code. :-( PTAL

@derekwaynecarr
Copy link
Member

It would be rejected when it's enabled which I will do for all salt providers hopefully tomorrow.

Sent from my iPhone

On Mar 5, 2015, at 4:21 PM, Dawn Chen notifications@github.com wrote:

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
current-context: "golden-system-455_kubernetes"

$ cluster/kubectl.sh --api-version=v1beta3 get pods valid-pod
current-context: "golden-system-455_kubernetes"
Running: cluster/../cluster/gce/../../_output/dockerized/bin/linux/amd64/kubectl --api-version=v1beta3 get pods valid-pod
POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS CREATED
valid-pod 10.244.2.117 kubernetes-serve-hostname kubernetes/serve_hostname kubernetes-minion-gs3d.c.golden-system-455.internal/104.197.14.122 Pending 19 seconds


Reply to this email directly or view it on GitHub.

@derekwaynecarr
Copy link
Member

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.

derekwaynecarr added a commit that referenced this pull request Mar 6, 2015
Convert both namespace and limitrange examples to v1beta3
@derekwaynecarr derekwaynecarr merged commit d99e9f7 into kubernetes:master Mar 6, 2015
@dchen1107
Copy link
Member Author

@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? :-)

@derekwaynecarr
Copy link
Member

@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.

@dchen1107
Copy link
Member Author

Good to know that. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants