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

Pass port into autoscaler url from webhook policy #1765

Merged

Conversation

andrewgrundy
Copy link
Contributor

@andrewgrundy andrewgrundy commented Aug 19, 2020

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking

/kind bug

/kind cleanup
/kind documentation
/kind feature
/kind hotfix

What this PR does / Why we need it:
The port in the URL created by createURL was hardcoded to 8000 rather than the port specified in the WebhookPolicy.
I have made the port default to 8000 when a port is not given and added a test to check the URL produced is correct when a port is given.

Which issue(s) this PR fixes:

Closes #

Special notes for your reviewer:

The port in the URL created by createURL was hardcoded to 8000 rather than the port specified in the WebhookPolicy.
I have made the port default to 8000 when a port is not given and added a test to check the URL produced is correct when a port is given.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 0f50c0c8-347e-4050-801b-0fc62312c002

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/googleforgames/agones.git pull/1765/head:pr_1765 && git checkout pr_1765
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.9.0-51eca79

@markmandel markmandel requested a review from aLekSer August 19, 2020 16:05
Copy link
Collaborator

@aLekSer aLekSer left a comment

Choose a reason for hiding this comment

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

Overall is great, but please update document file:

- `path` is an optional URL path which will be sent in any request to this service. (i. e. /scale)

Add port value description.

@aLekSer
Copy link
Collaborator

aLekSer commented Aug 20, 2020

Thanks for this Pull Request, it is definitely should be merged soon, please update docs file and sign the CLA.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 904d246f-92f9-420d-84d2-578a79952227

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/googleforgames/agones.git pull/1765/head:pr_1765 && git checkout pr_1765
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.9.0-076a137

Copy link
Collaborator

@aLekSer aLekSer left a comment

Choose a reason for hiding this comment

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

Thanks for the update.

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aLekSer, andrewgrundy
To complete the pull request process, please assign ericfortin
You can assign the PR to them by writing /assign @ericfortin in a comment when ready.

The full list of commands accepted by this bot can be found 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

@aLekSer
Copy link
Collaborator

aLekSer commented Aug 20, 2020

📝 Please visit https://cla.developers.google.com/ to sign.

@@ -92,6 +92,7 @@ The `spec` field is the actual `FleetAutoscaler` specification and it is compose
- `namespace` is the kubernetes namespace where webhook is deployed. Optional
If not specified, the "default" would be used
- `path` is an optional URL path which will be sent in any request to this service. (i. e. /scale)
- `port` is optional, it is the port for the service which is hosting the webhook. The default is 8000 for backward compatibility. If given, it should be a valid port number (1-65535, inclusive).
Copy link
Member

Choose a reason for hiding this comment

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

Changes to the website should be guarded so that they get exposed on the next release.

See https://agones.dev/site/docs/contribute/#within-a-page

@@ -92,6 +92,7 @@ The `spec` field is the actual `FleetAutoscaler` specification and it is compose
- `namespace` is the kubernetes namespace where webhook is deployed. Optional
If not specified, the "default" would be used
- `path` is an optional URL path which will be sent in any request to this service. (i. e. /scale)
- `port` is optional, it is the port for the service which is hosting the webhook. The default is 8000 for backward compatibility. If given, it should be a valid port number (1-65535, inclusive).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Basically this way:

Suggested change
- `port` is optional, it is the port for the service which is hosting the webhook. The default is 8000 for backward compatibility. If given, it should be a valid port number (1-65535, inclusive).
{{% feature publishVersion="1.9.0" %}}
- `port` is optional, it is the port for the service which is hosting the webhook. The default is 8000 for backward compatibility. If given, it should be a valid port number (1-65535, inclusive).
{{% /feature %}}

Copy link
Member

Choose a reason for hiding this comment

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

Looks like this might be the last thing before we can merge.

(Confirmed with @thisisnotapril that we can manually approve CLA) @andrewgrundy, you good to make the change?

@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-oss-robot
Copy link

New changes are detected. LGTM label has been removed.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 55877946-8dc0-48de-b294-9505775e55a8

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

@markmandel
Copy link
Member

Oops, I think you got caught as I was updating the e2e cluster. Let's try that again!

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 4106924a-ff00-4817-97ae-5b1d37c0fdd0

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

@markmandel
Copy link
Member

sdk-conformance flakiness 😢

@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: d524d3c4-8ff2-40ba-9446-8dee8ec3857c

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/googleforgames/agones.git pull/1765/head:pr_1765 && git checkout pr_1765
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.9.0-f28bbe8

@markmandel markmandel merged commit 5709810 into googleforgames:master Aug 26, 2020
@markmandel markmandel added this to the 1.9.0 milestone Aug 26, 2020
@markmandel markmandel added kind/bug These are bugs. area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc labels Sep 22, 2020
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
* Pass port into autoscaler url from webhook policy
The port in the URL created by createURL was hardcoded to 8000 rather than the port specified in the WebhookPolicy.
I have made the port default to 8000 when a port is not given and added a test to check the URL produced is correct when a port is given.

* Adding port description to FleetAutoscaler documentation

* Adding a feature flag around port description in the FleetAutoscaler documentation

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
area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc cla: yes kind/bug These are bugs. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants