Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Tagging of waypoint platform resources based on labels. #1909

Closed
izaaklauer opened this issue Jul 21, 2021 · 3 comments
Closed

Tagging of waypoint platform resources based on labels. #1909

izaaklauer opened this issue Jul 21, 2021 · 3 comments
Labels
core enhancement New feature or request

Comments

@izaaklauer
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Most platforms support the concept of labels. Kubernetes has annotations, aws has tags, etc. Waypoint currently allows you to add labels to plugin operations (https://www.waypointproject.io/docs/extending-waypoint/plugin-interfaces/default-parameters#component-labelset), but those labels aren't visible on resources that platforms create.

Describe the solution you'd like
Labels applied to waypoint operations should be translated by plugins into platform-native lables/annotations/tags, for platforms that support this metadata.

Describe alternatives you've considered
Plugins could each support their own tagging feature exposed through their waypoint.hcl stanza.

Explain any additional use-cases
This would allow platform operators to see more context when viewing resources in the platform native view. It could also allow other automation to recognize and act upon resources for sophisticated users.

Concerns
We would need to clarify the purpose of labels in our documentation. We would also need to decide which set of labels get applied to resources (i.e. app labels, project labels, workspace labels, etc)

@mitchellh
Copy link
Contributor

mitchellh commented Jul 21, 2021

My preference would be to not do this automatically, and just have plugins redefine a tags { or annotations { block and have users explicitly set the labels that are set. One of the proposals set forth by the multi-env RFC is exposing a labels variable that can be used in the waypoint.hcl to reference the current set of labels (for that operation). So users could easily do:

// if they want all labels
annotations = labels 

// if they want to prefix them
annotations = { for k, v in labels: "waypoint/${k}" => v }

// if they want to filter them
annotations = { for k, v in labels: k => v if regex("^foo", k) }

I think this works a lot better than a "magic" or "automatic" approach cause its fully customizable and explicit.

@briancain briancain removed the new label Aug 10, 2021
@mitchellh
Copy link
Contributor

PR here: #2065

@mitchellh
Copy link
Contributor

Merged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants