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 NodePort to the helm template for agones-allocator service #2476

Merged

Conversation

jiwonaid
Copy link
Contributor

@jiwonaid jiwonaid commented Feb 12, 2022

What type of PR is this?

Uncomment only one /kind <> line, press 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:

To support type: NodePort for agones dev environment.

Which issue(s) this PR fixes:

Closes #1699

Special notes for your reviewer:

Hello, this is my second pull request.

May I freely select between normal issues and good first issue? Is it okay to solve multiple good first issues?

@jiwonaid
Copy link
Contributor Author

This seems like a straightforward extension to the helm chart, if someone would like to contribute a PR to implement it I'd be happy to review it.

/cc @roberthbailey

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: acdc7973-84ca-4a21-8eac-fc04204783c8

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: fac8cc61-3d53-4f58-81a0-2acd23a10173

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

@markmandel
Copy link
Collaborator

markmandel commented Feb 14, 2022

Looks like a flake, will run again when it gets fixed. #2479

@@ -164,11 +164,13 @@ agones:
port: 443
portName: https
targetPort: 8443
nodePort: 0
Copy link
Member

Choose a reason for hiding this comment

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

Two thoughts about this.

  1. Setting this to 0 seems like a bad default. If we are going to set it to an example value, it seems like it should be a port that would actually work if you just changed the serviceType above.
  2. This file doesn't really have many comments, but it seems like if we are going to include a value here it is worth adding a comment that it will only be used if the service type is set to NodePort.

Copy link
Contributor Author

@jiwonaid jiwonaid Mar 1, 2022

Choose a reason for hiding this comment

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

Thank you for the feedback.

  1. I think it is okay to use 0. When I type kubectl create service nodeport --help, the nodePort parameter is described like this.

    (docker-desktop) ☁  ~  kubectl create service nodeport --help
    --node-port=0: Port used to expose the service on each node in a cluster.

    This is because v1.ServiceSpec.ServicePort is using int32.

    https://github.com/kubernetes/api/blob/b8c40e080bc5e830097df540d4ef804034cb5bdb/core/v1/types.go#L4536

    I found some examples that using NodePort: 0 in the test code of kubectl with expectErr: false.

    https://github.com/kubernetes/kubectl/blob/c26d922e2ead95fb4850c73c3c41027da40f3e0e/pkg/cmd/create/create_service_test.go#L204-L221

    It is a good idea to use an example NodePort with the default range of 30000-32767. However, it could make an error if the port is already taken by another Service.

  2. Comments are added right behind the nodePort.

@jiwonaid jiwonaid force-pushed the add-nodeport-to-the-helm-template branch from 6227e98 to 73228fc Compare March 1, 2022 11:54
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 570cbc55-3a10-434a-884a-d2d15a3ed182

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

@roberthbailey
Copy link
Member

Failed on push-images:

received unexpected HTTP status: 503 Service Unavailable
make: *** [Makefile:442: push-ping-image] Error 1

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiwonaid, roberthbailey

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

@google-oss-prow
Copy link

New changes are detected. LGTM label has been removed.

@google-oss-prow google-oss-prow bot removed the lgtm label Mar 4, 2022
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 964ed8a6-a7f8-4dfd-bcb3-b2da9e95b46e

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/2476/head:pr_2476 && git checkout pr_2476
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.22.0-669e992

@roberthbailey roberthbailey merged commit cf0ed82 into googleforgames:main Mar 4, 2022
@SaitejaTamma SaitejaTamma added this to the 1.22.0 milestone Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow specifying agones-allocator nodePort via Helm values
5 participants