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

Add validation for CPU and Memory Resources for GameServers, Fleets and GameServerSets #1423

Merged
merged 4 commits into from
Apr 15, 2020

Conversation

aLekSer
Copy link
Collaborator

@aLekSer aLekSer commented Mar 20, 2020

Validate Requests and Limits for each PodTemplate Container. Will be
used by GameServer, Fleet and GameServerSet.

For #1298.

@aLekSer
Copy link
Collaborator Author

aLekSer commented Mar 20, 2020

This one should be merged after #1418 as it contains 2 commits from it.
As an example of why I put validateResource() separately.
There is no option to import k8s.io/kubernetes/pkg/apis/core/validation there is a special ticket for it.
See for the reference this ticket:
elastic/cloud-on-k8s#1765 and kubernetes/kubernetes#80316 (comment)

@aLekSer
Copy link
Collaborator Author

aLekSer commented Mar 20, 2020

Example of this working:

$ kubectl apply -f /Users/user/go/src/github.com/agones/agones/examples/simple-udp/fleet.yaml                                                           
The Fleet "" is invalid: container: Request must be less than or equal to memory limit
by-it00060:build user$ kubectl create -f /Users/user/go/src/github.com/agones/agones/examples/cpp-simple/gameserver.yaml                                                     
The GameServer "" is invalid: container: Request must be less than or equal to memory limit
$ kubectl create -f /Users/user/go/src/github.com/agones/agones/examples/cpp-simple/gameserver.yaml                                                     
The GameServer "" is invalid:
* container: Request must be less than or equal to memory limit
* container: Resource memory limit value must be non negative

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 4d0f7701-cb10-4fad-bc3d-2e7e4971611a

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1423/head:pr_1423 && git checkout pr_1423
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.5.0-11f3e10

@aLekSer aLekSer force-pushed the validate-pod-template branch from 11f3e10 to 30d8dae Compare March 24, 2020 12:21
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 363ba691-d55d-4496-8653-8ece2a20a89f

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1423/head:pr_1423 && git checkout pr_1423
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.5.0-30d8dae

@aLekSer aLekSer force-pushed the validate-pod-template branch from 30d8dae to ea6b138 Compare April 6, 2020 08:58
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 4a9dc021-ccd2-4fb9-9000-2cc5096ffe7a

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@aLekSer aLekSer force-pushed the validate-pod-template branch from ea6b138 to def0219 Compare April 6, 2020 09:18
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 5ae38b84-3033-4173-85d4-2eb4a797ba94

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1423/head:pr_1423 && git checkout pr_1423
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.5.0-def0219

@aLekSer aLekSer marked this pull request as ready for review April 6, 2020 09:40
@aLekSer aLekSer force-pushed the validate-pod-template branch from def0219 to 719d5da Compare April 6, 2020 11:44
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 88df03a2-375c-45b7-88da-5b26ece80ed2

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1423/head:pr_1423 && git checkout pr_1423
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.5.0-719d5da

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: e5166837-7b76-45f0-a926-f443d25f272b

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1423/head:pr_1423 && git checkout pr_1423
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.5.0-aa5c613

Validate Requests and Limits for each PodTemplate Container. Will be
used by GameServer, Fleet and GameServerset.
@aLekSer aLekSer force-pushed the validate-pod-template branch from aa5c613 to f9e9b14 Compare April 7, 2020 07:02
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 1e29e312-a7ba-4a36-a22d-3af86627d86c

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@aLekSer
Copy link
Collaborator Author

aLekSer commented Apr 7, 2020

New E2E test is failing:

Step #22: time="2020-04-07 07:17:18.960" level=info msg="waiting for fleet condition" fleet=simple-fleet-x8b55
Step #22: --- FAIL: TestFleetRecreateGameServers (0.19s)
Step #22:     --- FAIL: TestFleetRecreateGameServers/gameserver_shutdown (106.10s)
Step #22:         fleet_test.go:1087: Could not message GameServer: read udp 192.168.10.3:46528->34.83.149.154:7776: i/o timeout

@markmandel markmandel added the feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) label Apr 7, 2020
Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

This looks good to me! Will Approve once we're out of feature freeze.

@markmandel markmandel added area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones labels Apr 9, 2020
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 94f78ba0-26ed-4ef4-8f82-3d8d82cb1f3f

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1423/head:pr_1423 && git checkout pr_1423
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.5.0-a47b042

@markmandel markmandel removed the feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) label Apr 14, 2020
Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

Out of feature freeze!

@google-oss-robot
Copy link

New changes are detected. LGTM label has been removed.

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aLekSer, markmandel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aLekSer, markmandel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: f6308130-b65c-4620-a91f-b06a6c9c609a

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: ecf28a44-4bfa-4c1f-8cfe-f2f78e28ec28

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1423/head:pr_1423 && git checkout pr_1423
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-bfb0dd9

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 4c4c3ebd-61bb-4276-ba83-fa5844ebb0cd

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1423/head:pr_1423 && git checkout pr_1423
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-8bc3bec

@markmandel markmandel merged commit 84f5eef into googleforgames:master Apr 15, 2020
@markmandel markmandel added this to the 1.6.0 milestone Apr 15, 2020
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
Validate Requests and Limits for each PodTemplate Container. Will be
used by GameServer, Fleet and GameServerset.

Co-authored-by: Mark Mandel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants