Skip to content

Conversation

@yieon-lyon
Copy link

charts: add serviceAnnotations and serviceLabels for additive Service metadata management

Tetragon Helm chart currently exposes only serviceLabelsOverride which forces full replacement of the Service labels and makes day to day label management error prone.

This patch fixes this by adding:

A new values key serviceLabels as an empty map in values.yaml to allow appending labels without losing chart defaults.

A new values key serviceAnnotations as an empty map in values.yaml to allow appending annotations without losing chart defaults.

Service template logic that preserves compatibility. If serviceLabels is set it is merged with existing chart labels or serviceLabelsOverride to produce the final label set. If serviceAnnotations is set it is merged with existing chart annotations to produce the final annotations set.

Example values:

serviceLabels: {}
# serviceLabels:
#   k8s-app: tetragon

serviceAnnotations: {}
# serviceAnnotations:
#  prometheus.io/port: "2112"
#  prometheus.io/scrape: "true"

As a secondary note, these additive fields can simplify label based selection in systems such as Prometheus.

@yieon-lyon yieon-lyon requested a review from a team as a code owner September 5, 2025 04:59
@yieon-lyon yieon-lyon requested a review from olsajiri September 5, 2025 04:59
@mtardy mtardy added area/helm Related to the Helm chart release-note/minor This PR introduces a minor user-visible change labels Oct 14, 2025
Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

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

Hello 👋 I'm really sorry it looks like this PR was overlooked. I think it makes sense. Could you take a look at the CI errors and fix your patch, you might need to run make -C install/kubernetes and maybe shorten your commit title (use make checkpatch to see, might need a rebase to get that).

@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit d2d8319
🔍 Latest deploy log https://app.netlify.com/projects/tetragon/deploys/690de15993e3aa00080af1ca
😎 Deploy Preview https://deploy-preview-4082--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@yieon-lyon
Copy link
Author

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
Error: ERROR:CUSTOM: Please avoid long commit subjects (max: 75, found: 80)
=========================================================
[2/3] Running on 38628456b3fb0324954ae481fdb672895fab631b
install/kubernetes/tetragon: uddate "make -C install/kubernetes"
=========================================================
Error: ERROR:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'yieon <[email protected]>'

I will create a PR again in compliance with the above.

@yieon-lyon yieon-lyon closed this Oct 20, 2025
@yieon-lyon yieon-lyon deleted the pr/yieon-lyon/feature-service-annotations-and-labels-support branch October 20, 2025 05:17
@yieon-lyon yieon-lyon restored the pr/yieon-lyon/feature-service-annotations-and-labels-support branch October 20, 2025 10:54
@yieon-lyon yieon-lyon reopened this Oct 20, 2025
@mtardy
Copy link
Member

mtardy commented Oct 20, 2025

Any chance you could squash everything and force push this? git rebase -i <first commit>~ might help here :)

@yieon-lyon yieon-lyon force-pushed the pr/yieon-lyon/feature-service-annotations-and-labels-support branch 3 times, most recently from ddb2d3e to 37c3c0c Compare October 23, 2025 06:50
@yieon-lyon yieon-lyon force-pushed the pr/yieon-lyon/feature-service-annotations-and-labels-support branch 2 times, most recently from 3f04b52 to a20f128 Compare November 13, 2025 07:10
…abels

charts: add serviceAnnotations and serviceLabels for additive Service metadata management

Tetragon Helm chart currently exposes only serviceLabelsOverride which forces full replacement of the Service labels and makes day to day label management error prone.

This patch fixes this by adding:

A new values key serviceLabels as an empty map in values.yaml to allow appending labels without losing chart defaults.

A new values key serviceAnnotations as an empty map in values.yaml to allow appending annotations without losing chart defaults.

Service template logic that preserves compatibility. If serviceLabels is set it is merged with existing chart labels or serviceLabelsOverride to produce the final label set. If serviceAnnotations is set it is merged with existing chart annotations to produce the final annotations set.

As a secondary note, these additive fields can simplify label based selection in systems such as Prometheus.

Signed-off-by: Lyon <[email protected]>
@yieon-lyon yieon-lyon force-pushed the pr/yieon-lyon/feature-service-annotations-and-labels-support branch from a20f128 to 36f271f Compare November 13, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/helm Related to the Helm chart release-note/minor This PR introduces a minor user-visible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants