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 pod annotations #1849

Merged
merged 8 commits into from
Oct 21, 2020
Merged

Conversation

8398a7
Copy link
Contributor

@8398a7 8398a7 commented Oct 16, 2020

What type of PR is this?

/kind feature

What this PR does / Why we need it:

refs: #1848

Which issue(s) this PR fixes:

Closes #1848

Special notes for your reviewer:

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: eeca5afe-1483-4505-9b2c-4f7d371b5f69

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/1849/head:pr_1849 && git checkout pr_1849
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-3fd9c4c

@markmandel markmandel added area/operations Installation, updating, metrics etc kind/feature New features for Agones labels Oct 16, 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.

Looks great! Just one small tweak in the docs.

Not sure if you want to - but you could also do the Ping service while you are in there?
https://github.com/googleforgames/agones/blob/master/install/helm/agones/templates/ping.yaml

@@ -186,6 +186,7 @@ The following tables lists the configurable parameters of the Agones chart and t
| `agones.controller.nodeSelector` | Controller [node labels][nodeSelector] for pod assignment | `{}` |
| `agones.controller.tolerations` | Controller [toleration][toleration] labels for pod assignment | `[]` |
| `agones.controller.affinity` | Controller [affinity][affinity] settings for pod assignment | `{}` |
| `agones.controller.annotations` | Controller [annotations][annotations] settings for pod assignment | `{}` |
Copy link
Member

Choose a reason for hiding this comment

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

Please move this down to where we have the section "New Configuration Features:" - so they only get displayed on the next release 👍

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you. I fixed it with ab93fd6.

@@ -226,6 +227,7 @@ The following tables lists the configurable parameters of the Agones chart and t
| `agones.allocator.disableTLS` | Turns off TLS security for incoming connections to the allocator. | `false` |
| `agones.allocator.tolerations` | Allocator [toleration][toleration] labels for pod assignment | `[]` |
| `agones.allocator.affinity` | Allocator [affinity][affinity] settings for pod assignment | `{}` |
| `agones.allocator.annotations` | Allocator [annotations][annotations] settings for pod assignment | `{}` |
Copy link
Member

Choose a reason for hiding this comment

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

Please also move this down to where we have the section "New Configuration Features:" - so they only get displayed on the next release 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you. I fixed it with ab93fd6.

@8398a7
Copy link
Contributor Author

8398a7 commented Oct 17, 2020

Looks great! Just one small tweak in the docs.

Not sure if you want to - but you could also do the Ping service while you are in there?
https://github.com/googleforgames/agones/blob/master/install/helm/agones/templates/ping.yaml

Do you mean agones.ping.http.annotations and agones.ping.udp.annotations that already exist?
I had noticed that these weren't documented, but the background is somewhat different, so I thought I'd make a different PR.
But it looks like I can change them together, so I'll change it.

Only ping Deployment doesn't have annotations, which seems strange, so I'll add them together.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: c614896e-770d-4ffa-91de-3b3082170344

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

@markmandel
Copy link
Member

markmandel commented Oct 17, 2020

Not quite seeing it, but there something going wrong with the annotation link:

htmltest started at 03:18:20 on /tmp/website
========================================================================
site/docs/installation/install-agones/helm/index.html
  target does not exist --- site/docs/installation/install-agones/helm/index.html --> annotations
========================================================================
✘✘✘ failed in 375.927952ms
1 errors in 118 documents
Html Test: Attempt 2
htmltest started at 03:19:21 on /tmp/website

If you want to test it yourself make site-server will start create the website locally.

@8398a7
Copy link
Contributor Author

8398a7 commented Oct 17, 2020

Oh, moving annotations to "New Configuration Features" seems to have affected it.
I should have moved the annotations link along with it.

I'm trying the make site-server at hand, so I'll push it if it's OK.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: eeafd610-2941-4664-9026-fa71665c0d68

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

@8398a7
Copy link
Contributor Author

8398a7 commented Oct 17, 2020

It's still no good...
The make site-server seems to work, but...

I've written a patch to run the site-test at hand and will push it when the test passes.

diff --git a/build/Makefile b/build/Makefile
index 99cb5843..aa7bb85d 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -235,6 +235,8 @@ push-release-chart: $(ensure-build-image)
 # Run all tests
 test: $(ensure-build-image) test-go test-sdks test-install-yaml site-test

+site-test: $(ensure-build-image) site-test
+
 # Run go tests
 test-go: $(ensure-build-image)
        $(GO_TEST) $(agones_package)/pkg/... \

| `agones.controller.annotations` | Controller [annotations][annotations] settings for pod assignment | `{}` |
| `agones.allocator.annotations` | Allocator [annotations][annotations] settings for pod assignment | `{}` |
| `agones.ping.annotations` | Ping [annotations][annotations] settings for pod assignment | `{}` |
| `agones.ping.http.annotations` | [Annotations](annotations) for ping http service | `{}` |
Copy link
Contributor Author

@8398a7 8398a7 Oct 17, 2020

Choose a reason for hiding this comment

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

[Annotations](annotations) 😭
my typo...

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 67da3b06-d3f0-4a47-8160-4d97f2d024e6

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/1849/head:pr_1849 && git checkout pr_1849
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-b707bb0

| `agones.controller.annotations` | Controller [annotations][annotations] settings for pod assignment | `{}` |
| `agones.allocator.annotations` | Allocator [annotations][annotations] settings for pod assignment | `{}` |
| `agones.ping.annotations` | Ping [annotations][annotations] settings for pod assignment | `{}` |
| `agones.ping.http.annotations` | [Annotations][annotations] for ping http service | `{}` |
Copy link
Member

Choose a reason for hiding this comment

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

Sorry to make you juggle this around, but agones.ping.udp.annotations and agones.ping.http.annotations already exist in the current release, but aren't documented - so they can go in the section up above.

There new, remaining values should stay down here.

Random thought - do we think there is any confusion given that agones.ping.udp.annotations is a annotation on a service, but agones.controller.annotations is on Pods?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Random thought - do we think there is any confusion given that agones.ping.udp.annotations is a annotation on a service, but agones.controller.annotations is on Pods?

Hmmm, it's somewhat confusing.
Should I revise it to agones.controller.podAnnotations or agones.ping.udp.serviceAnnotations or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry to make you juggle this around, but agones.ping.udp.annotations and agones.ping.http.annotations already exist in the current release, but aren't documented - so they can go in the section up above.

There new, remaining values should stay down here.

I understand.
I'll fix the name I asked for in my comment above when I decide what to do with it.

Copy link
Member

Choose a reason for hiding this comment

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

@roberthbailey @pooneh-m would love a second opinion?

Worth noting, agones.ping.udp.annotations and agones.ping.http.annotations where in previous releases, but weren't documented.

WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

If you look at the structure in https://github.com/googleforgames/agones/blob/master/install/helm/agones/values.yaml I don't actually think it's all that confusing. The annotations for the service / pod are clearly nested under the values for the service / pod respectively.

I think the descriptions in this table should make it clear what type of k8s resource the annotations are being applied to. e.g.

| agones.controller.annotations | [Annotations][annotations] added to the Agones controller pods |
| agones.ping.http.annotations | [Annotations][annotations] added to the Agones ping http service |

Copy link
Member

Choose a reason for hiding this comment

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

SGTM! Thanks for the second/third pair of eyes - that works for me 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed 👍

@@ -236,7 +236,14 @@ The following tables lists the configurable parameters of the Agones chart and t

| Parameter | Description | Default |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------- |
| | | |
| `agones.controller.annotations` | Controller [annotations][annotations] settings for pod assignment | `{}` |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| `agones.controller.annotations` | Controller [annotations][annotations] settings for pod assignment | `{}` |
| `agones.controller.annotations` | [Annotations][annotations] added to the Agones controller pods | `{}` |

Just going by Robbie's suggestion, to make it super clear. WDYT?

Copy link
Contributor Author

@8398a7 8398a7 Oct 20, 2020

Choose a reason for hiding this comment

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

Fixed 👍

| `agones.controller.annotations` | Controller [annotations][annotations] settings for pod assignment | `{}` |
| `agones.allocator.annotations` | Allocator [annotations][annotations] settings for pod assignment | `{}` |
| `agones.ping.annotations` | Ping [annotations][annotations] settings for pod assignment | `{}` |
| `agones.ping.http.annotations` | [Annotations][annotations] for ping http service | `{}` |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| `agones.ping.http.annotations` | [Annotations][annotations] for ping http service | `{}` |
| `agones.ping.http.annotations` | [Annotations][annotations] added to the Agones ping http service | `{}` |

Minor tweaks for just some extra clarity based on Robbie's suggestions. Just to make things extra clear.

Copy link
Contributor Author

@8398a7 8398a7 Oct 20, 2020

Choose a reason for hiding this comment

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

Fixed 👍

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 59c57d02-8cf7-4cc6-bb26-ff5496334897

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/1849/head:pr_1849 && git checkout pr_1849
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-6890160

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: d3f465e3-8302-483e-ad9b-2d96ad932e66

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/1849/head:pr_1849 && git checkout pr_1849
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-9b70197

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.

Let's get this in!

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 8398a7, 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

@google-oss-robot
Copy link

New changes are detected. LGTM label has been removed.

@markmandel markmandel added this to the 1.10.0 milestone Oct 21, 2020
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: c78afe37-fe54-4d67-8ad6-f0f74df02d23

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/1849/head:pr_1849 && git checkout pr_1849
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-05a97c6

@markmandel markmandel merged commit 8a81ddc into googleforgames:master Oct 21, 2020
@8398a7 8398a7 deleted the addPodAnnotations branch October 21, 2020 02:10
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
* Changed to allow annotations to be injected (googleforgames#1848)
* Docs: Added explanation of annotations (googleforgames#1848)

Co-authored-by: Mark Mandel <markmandel@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/operations Installation, updating, metrics etc cla: yes kind/feature New features for Agones size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm setting the annotation of controller and allocator
5 participants