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

Fix allocator service tls auth for C# client and add a C# sample #1514

Merged
merged 1 commit into from
May 7, 2020

Conversation

pooneh-m
Copy link
Contributor

@pooneh-m pooneh-m commented May 5, 2020

What type of PR is this?
/kind bug

What this PR does / Why we need it:
C# client cannot talk to agone-allocator service due to language incompatibility for handling mTLS. Changed the mTLS handling to custom verify client certificate.

Also, added C# client sample code that is compatible with the golang gRPC server.

Which issue(s) this PR fixes:
Closes #1421

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 0e743eb0-c6c3-49c4-bfd6-00d69f0aa8b3

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/1514/head:pr_1514 && git checkout pr_1514
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-62079fa

@markmandel markmandel added area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/bug These are bugs. labels May 5, 2020
@markmandel markmandel added this to the 1.6.0 milestone May 5, 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.

Coupl'a small documentation fixes, but so glad you found a solution!

examples/allocator-client/main.go Outdated Show resolved Hide resolved
@@ -0,0 +1,19 @@
# A sample Allocator service C# client
Copy link
Member

Choose a reason for hiding this comment

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

Should we link this somewhere, such as here?
https://agones.dev/site/docs/advanced/allocator-service/#send-allocation-request

(and wrapped in a feature code block)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing it out.
PTAL. I added a note.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: bf292a1a-1e34-4b66-8207-d0ce962cf7f5

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 96c551aa-dd87-44ba-8ef5-f33c80f1032d

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/1514/head:pr_1514 && git checkout pr_1514
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-50d0d14

@@ -115,7 +115,8 @@ kubectl get pods -n agones-system -o=name | grep agones-allocator | xargs kubect

## Send allocation request

Now the service is ready to accept requests from the client with the generated certificates. Create a [fleet](https://agones.dev/site/docs/getting-started/create-fleet/#1-create-a-fleet) and send a gRPC request to agones-allocator by providing the namespace to which the fleet is deployed. You can find the gRPC sample for sending allocation request at {{< ghlink href="examples/allocator-client/main.go" >}}allocator-client sample{{< /ghlink >}}.
Now the service is ready to accept requests from the client with the generated certificates. Create a [fleet](https://agones.dev/site/docs/getting-started/create-fleet/#1-create-a-fleet) and send a gRPC request to agones-allocator. To start, take a look at the allocation gRPC client examples in {{< ghlink href="examples/allocator-client/main.go" >}}golang{{< /ghlink >}} and {{< ghlink href="examples/allocator-client-csharp/Program.cs" >}}C#{{< /ghlink >}} languages. In the following, the {{< ghlink href="examples/allocator-client/main.go" >}}golang gRPC client example{{< /ghlink >}} is used to allocate a Game Server in the default namespace.
Copy link
Member

Choose a reason for hiding this comment

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

Do we want this to show up on the current documentation, or only after the next release?

If we want it after the next release, we should create publish and expire versions of this paragraph:
https://agones.dev/site/docs/contribute/#within-a-page

Other than that, this looks good to go 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. Makes sense. I added the feature wrapper to expose the content with 1.6 release.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 86212cbe-221f-436d-b7dc-dbcd7684cb00

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/1514/head:pr_1514 && git checkout pr_1514
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-354d4bf

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: cfeedebd-a735-45c0-ab09-7abd087fd231

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/1514/head:pr_1514 && git checkout pr_1514
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-b216282

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.

Awesome!

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: markmandel, pooneh-m

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:
  • OWNERS [markmandel,pooneh-m]

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

@markmandel markmandel merged commit 05d0b0e into googleforgames:master May 7, 2020
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/bug These are bugs. lgtm size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

agones-allocator couldn't be connected via a C++ gRPC client
4 participants