-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
propogate arbitrary labels from runnersets to all created resources #3157
Conversation
b2bb6a5
to
8b99b2d
Compare
This is a really important feature for us. Please approve this. |
@@ -741,3 +737,15 @@ func trimLabelValue(val string) string { | |||
} | |||
return val | |||
} | |||
|
|||
func mergeLabels(labels ...map[string]string) map[string]string { |
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.
Can we do something like:
func mergeLabels(base, overwrites map[string]string) map[string]string
It would be much easier to understand by reading the function definition.
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.
Added a suggestion. Please fix merge conflict
1d6b5e1
to
6cee6d5
Compare
To be clear this is not intended to touch runner labels, but instead only the kubernetes resource labels. |
Dang. Am I missing something? Sadly this requires all our engineers update their jobs to be able to use the new ephemeral runners and I wont be able silently replace our VMs with ephemeral |
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
Within our organization we have policies in place that require all resources to have specific labels for security and cost attribution purposes (e.g. team, business unit, etc.).
In order to support such a requirement, this change would have any arbitrary labels that are set at the
AutoscalingRunnerSet level also be assigned to any subsequent resources the controller will create.
Similar behavior could be valuable for annotations as well, but I personally do not have any need for it.