Skip to content

fix(helm): deploymentAnnotations value#8164

Merged
glasser merged 2 commits intodevfrom
glasser/helm-deployment-annotations
Sep 4, 2025
Merged

fix(helm): deploymentAnnotations value#8164
glasser merged 2 commits intodevfrom
glasser/helm-deployment-annotations

Conversation

@glasser
Copy link
Member

@glasser glasser commented Aug 29, 2025

This lets you put annotations on the deployment itself (as opposed to the pods within it, which is done with podAnnotations).

For example, you could use this to have
https://github.com/stakater/Reloader reload router when config maps or secrets change.


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • PR description explains the motivation for the change and relevant context for reviewing
  • PR description links appropriate GitHub/Jira tickets (creating when necessary)
  • Changeset is included for user-facing changes
  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Metrics and logs are added3 and documented
  • Tests added and passing4
    • Unit tests
    • Integration tests
    • Manual tests, as necessary

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. A lot of (if not most) features benefit from built-in observability and debug-level logs. Please read this guidance on metrics best-practices.

  4. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@glasser glasser requested a review from a team as a code owner August 29, 2025 23:58
@github-actions

This comment has been minimized.

@apollo-librarian
Copy link

apollo-librarian bot commented Aug 29, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 2 changed, 0 removed
* graphos/routing/(latest)/observability/client-id-enforcement.mdx
* graphos/routing/(latest)/errors.mdx

Build ID: 290115e2004c6710c33a0745
Build Logs: View logs

URL: https://www.apollographql.com/docs/deploy-preview/290115e2004c6710c33a0745

@glasser glasser force-pushed the glasser/helm-deployment-annotations branch from 32f9318 to d625ee2 Compare August 30, 2025 00:02
Copy link
Member Author

Choose a reason for hiding this comment

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

It is ok in k8s for an object to just be foo: with no values underneath.

Copy link
Contributor

@aaronArinder aaronArinder left a comment

Choose a reason for hiding this comment

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

this seems safe without knowing how new, user-submitted annotations will be used; I'm assuming that's been thought about, but it's worth worrying about if not!

Comment on lines 10 to 21
Copy link
Contributor

Choose a reason for hiding this comment

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

what were the annotations doing before? it looks like duplicate blocks of the same annotations? now, it looks like we have the duplicate entries under the same annotations block?

Copy link
Member Author

@glasser glasser Sep 4, 2025

Choose a reason for hiding this comment

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

These are specific annotations defined by this field. This PR lets you also add your own annotations too.

We already let users add annotations to all sorts of other places, just not deployments. Providing hooks for arbitrary annotations is pretty standard for charts since Helm doesn't let you make these changes as a chart consumer without an explicit hook.

@glasser
Copy link
Member Author

glasser commented Sep 4, 2025

The example I mentioned in the PR above is letting you use https://github.com/stakater/Reloader

While Router does have a hot reload mode for its config file, if you're using envVarsFromCM to load env vars from a config map, you may want your deployment to be restarted when you edit the env var config map. K8s doesn't do that by default; Reloader is a common piece of software to solve this problem but you enable it by adding an annotation to a Deployment.

This lets you put annotations on the deployment itself (as opposed to the
pods within it, which is done with podAnnotations).

For example, you could use this to have
https://github.com/stakater/Reloader reload router when config maps or
secrets change.
@glasser glasser force-pushed the glasser/helm-deployment-annotations branch from d625ee2 to ceb20ca Compare September 4, 2025 16:28
@abernix abernix changed the title helm: add deploymentAnnotations value fix(helm): deploymentAnnotations value Sep 4, 2025
@abernix
Copy link
Member

abernix commented Sep 4, 2025

@mergify backport 2.6.1

@mergify
Copy link
Contributor

mergify bot commented Sep 4, 2025

backport 2.6.1

❌ No backport have been created

Details
  • Backport to branch 2.6.1 failed

Unable to backport: user glasser is unknown.
Please make sure glasser has logged in Mergify dashboard.

@abernix
Copy link
Member

abernix commented Sep 4, 2025

When this merges, Mergify will open the backport to 2.6.1. That will produce a new PR which needs approval, but is typically closer to a rubber-stamp, particularly when we're close enough in versions that there's no merge conflict.

@glasser glasser enabled auto-merge (squash) September 4, 2025 17:08
@glasser glasser merged commit 5887c93 into dev Sep 4, 2025
15 checks passed
@glasser glasser deleted the glasser/helm-deployment-annotations branch September 4, 2025 17:12
@abernix
Copy link
Member

abernix commented Sep 4, 2025

@mergify backport 2.6.1

@mergify
Copy link
Contributor

mergify bot commented Sep 4, 2025

backport 2.6.1

✅ Backports have been created

Details

glasser added a commit that referenced this pull request Sep 4, 2025
@abernix abernix mentioned this pull request Sep 8, 2025
@abernix abernix mentioned this pull request Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants