Skip to content

Support for adding annotations to deployments in Connect#794

Merged
SamEdwardes merged 4 commits intomainfrom
annotations-on-deployments
Mar 11, 2026
Merged

Support for adding annotations to deployments in Connect#794
SamEdwardes merged 4 commits intomainfrom
annotations-on-deployments

Conversation

@SamEdwardes
Copy link
Copy Markdown
Contributor

@SamEdwardes SamEdwardes commented Mar 2, 2026

Closes #793


Hey Posit Connect team, could you please review this PR. Details on the use case or in the issue mentioned above.

I deployed Connect using this chart and verified that the annotations correctly get set on the deployment:

# values.yaml
fullnameOverride: posit-connect

deployment:
  annotations:
    deployment-annotate: Nice its working
kubectl get deployment posit-connect -o json | jq '.metadata.annotations'
{
  "deployment-annotate": "Nice its working",
  "deployment.kubernetes.io/revision": "18",
  "meta.helm.sh/release-name": "posit-connect",
  "meta.helm.sh/release-namespace": "samedwardes-posit-team"
}

@SamEdwardes SamEdwardes requested a review from a team as a code owner March 2, 2026 21:28
@SamEdwardes SamEdwardes requested review from dbkegley and tdstein March 3, 2026 23:46
Copy link
Copy Markdown
Contributor

@lucasrod16 lucasrod16 left a comment

Choose a reason for hiding this comment

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

This makes sense to me given the use case described in #793. Could you add a couple of helm unit tests to help prevent regressions? These cases should cover it:

  • No annotations on the deployment by default
  • Annotations are applied when deployment.annotations is set

Here are some test cases for the chronicle chart for reference:

- it: should skip annotations by default
asserts:
- notExists:
path: metadata.annotations
- it: should apply custom annotations if specified
set:
commonAnnotations:
another: annotation
asserts:
- isSubset:
path: metadata.annotations
content:
another: annotation

@bschwedler bschwedler added the team: connect Posit Connect related issue label Mar 10, 2026
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My editor auto-formatted on save, which caused the unintentional changes to older versions. These are purely formatting fixes, the only functional change is the new line added for 0.8.31.

@SamEdwardes
Copy link
Copy Markdown
Contributor Author

Thank you @lucasrod16. I added some unit tests. They are passing. Please let me know if you have any other comments, or if the PR is ready to merge.

@SamEdwardes SamEdwardes requested a review from lucasrod16 March 10, 2026 22:23
Copy link
Copy Markdown
Contributor

@lucasrod16 lucasrod16 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for this @SamEdwardes!

@SamEdwardes SamEdwardes merged commit 3fa66ce into main Mar 11, 2026
7 checks passed
@SamEdwardes SamEdwardes deleted the annotations-on-deployments branch March 11, 2026 19:50
SamEdwardes added a commit that referenced this pull request Mar 11, 2026
Allows users to add custom annotations to the rstudio-pm Deployment
resource metadata, matching the pattern added to Connect in PR #794.
SamEdwardes added a commit that referenced this pull request Mar 11, 2026
Allow users to set custom annotations on the Workbench Deployment
resource via deployment.annotations, matching the existing Connect
chart behavior from PR #794.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team: connect Posit Connect related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for adding annotations to deployment spec to Connect

3 participants