-
Notifications
You must be signed in to change notification settings - Fork 33
add support for adding annotations to kubernetes transform #1115
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @awprice. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Would be good to get some guidance on the checklist |
|
Hi @awprice , thanks for your PR, I'm looking into it
There's no impact on the netobserv operator as far as I can see, so you can ignore it |
|
I've no strong objection with this PR, but from my experience k8s annotations tend to be potentially very verbose, sometimes even containing big json blobs.. So I wonder if there's really a use-case for having all annotations propagated into flows, or if we should rather use an include or exclude list. The same could be done for labels actually. What do you think? What would work in your use case? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1115 +/- ##
==========================================
+ Coverage 66.88% 67.01% +0.13%
==========================================
Files 121 121
Lines 7573 7594 +21
==========================================
+ Hits 5065 5089 +24
+ Misses 2178 2176 -2
+ Partials 330 329 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Thanks for the review! You're right - on second thoughts, for our use case I think we'll definitely benefit from being able to selectively only add certain annotations. I'll update the PR with include/exclude functionality for both annotations and labels |
|
@jotak PR updated with support for inclusion and exclusion lists for both annotations and labels. I've kept the default behaviour whereby if only The inclusion and exclusion lists can then be used to only include specific labels/annotations or exclude specific labels/annotations. |
|
Maybe to ensure those are not too verbose we could add extra options such as Appart from that it looks good to me 😄 |
Signed-off-by: Alex Price <[email protected]>
Signed-off-by: Alex Price <[email protected]>
52d1783 to
acac459
Compare
|
cool, @jpinsonneau 's comment #1115 (comment) still stands, although I don't think it's absolutely mandatory, at this point it's up to you if you want to implement that as a safe-guard against too long data. BTW I wonder how prometheus handles it if someone has the audacious idea to use that as a metric label, and very long values comes in. I'd say it's the user responsibility to use only well known and bounded keys as prom labels, anyway. |
|
/test ? |
|
@memodi: The following commands are available to trigger required jobs: The following commands are available to trigger optional jobs: Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/test pull-ci-netobserv-flowlogs-pipeline-main-qe-e2e-tests |
|
@memodi: The specified target(s) for The following commands are available to trigger optional jobs: Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@jotak / @jpinsonneau No problem to implement the safe guard - just to clarify, this would be a max length on the annotation/label value? |
Yes exactly @awprice. I'm in favor of truncating the values when the max lengh is exceeded with an elipsis at the end. We can make it optionnal to be as flexible as possible. Thoughts ? |
|
For info the failed test is a known issue not related to this PR |
|
New image: It will expire after two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=c88e6fe make set-flp-image |
|
@awprice: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
hey @awprice , |
Feel free to make a release, I've yet to find the time to address the feedback, we don't need a release either :) |
Description
Adds support for adding annotations to the kubernetes transform. Configured using the
annotations_prefixfield.Functions similarly to the
labels_prefixfield.Adds a unit test for testing the behaviour of both
labels_prefixandannotations_prefix.Fixes typo in
labels_prefixdocumentation.Dependencies
n/a
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.
To run a perfscale test, comment with:
/test flp-node-density-heavy-25nodes