-
Notifications
You must be signed in to change notification settings - Fork 163
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
feat: implement support for podOptions and additionalMetadata #871
Conversation
✅ Deploy Preview for capsule-documentation canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your awesome pr, generally it looks good to me. We will have to discuss, if it would also make sense to implement #737 along-side with this feature. WDYT @prometherion
Please sign of all your commits.
75f4266
to
8505be4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as a contribution, just let's try to address the comments! 🚀
cd3af1c
to
ee5662c
Compare
ee5662c
to
91e87de
Compare
Signed-off-by: Dario Tranchitella <[email protected]> Co-authored-by: Giuseppe Chiesa <[email protected]>
Signed-off-by: Dario Tranchitella <[email protected]> Co-authored-by: Giuseppe Chiesa <[email protected]>
Signed-off-by: Dario Tranchitella <[email protected]> Co-authored-by: Giuseppe Chiesa <[email protected]>
Signed-off-by: Dario Tranchitella <[email protected]> Co-authored-by: Giuseppe Chiesa <[email protected]>
Signed-off-by: Dario Tranchitella <[email protected]> Co-authored-by: Giuseppe Chiesa <[email protected]>
Signed-off-by: Dario Tranchitella <[email protected]> Co-authored-by: Giuseppe Chiesa <[email protected]>
Signed-off-by: Dario Tranchitella <[email protected]> Co-authored-by: Giuseppe Chiesa <[email protected]>
91e87de
to
c4fdcef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gchiesa for nailing this, as we agreed I helped in some refactoring of your code, this is the stepping stone for the v0.5.0 release!
This PR implements the support for
additionalMetadata
enforced on Pods, similarly to theadditionalMetadata
for services.Rationale
In the context of soft-tenancy model, a practical use-case is represented by the need to enforce annotations / labels on Pods so that the information captured by shared cluster level services can be enriched with Tenant domain metadata (e.g. tenant-id, cost-center, etc.)
A practical use-case 1: Scalyr/Dataset Logs
Logging agents are deployed in a cluster governed by Capsule. Multiple tenants are present. Our requirement is to be able to query logs captured from pods part of a specific tenant.
Scalyr offers the possibility to enrich the logs captured from each Pod by leveraging annotations.
With this functionality Pod will be automatically annotated with the information decided by cluster administrator. This will offer the possibility to categorize/query logs by tenant attributes.
A practical use-case 2: Prometheus Metrics
Similarly to the use case above, also prometheus metrics can be enriched with tenant level attributes that will translate in meta labels.
With this functionality and using a proper Prometheus relabeling configuration the pod label/annotation can be translated in metric attributes attached to the specific pod.
How To
Cluster administrators can configure the annotation/labels for the Pods created under a specific tenancies by using the following:
References
closes #756