Add chart-level API to customize internal resources#4410
Open
nikola-jokic wants to merge 2 commits intomasterfrom
Open
Add chart-level API to customize internal resources#4410nikola-jokic wants to merge 2 commits intomasterfrom
nikola-jokic wants to merge 2 commits intomasterfrom
Conversation
Contributor
|
Hello! Thank you for your contribution. Please review our contribution guidelines to understand the project's testing and code conventions. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends both the stable and experimental Helm charts to let users set labels/annotations for controller-created “internal” resources (listener, listener RBAC objects, ephemeral runner resources) by rendering additional ResourceMeta fields into the AutoscalingRunnerSet spec.
Changes:
- Add new chart values for internal resource metadata (labels/annotations) for listener + ephemeral runner resources.
- Render those values into the
AutoscalingRunnerSetspec via new helper templates. - Add/extend chart tests to assert the new spec fields are rendered.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| charts/gha-runner-scale-set/values.yaml | Documents new resourceMeta.* keys for internal resources. |
| charts/gha-runner-scale-set/templates/_helpers.tpl | Adds helper to render ResourceMeta blocks for spec fields. |
| charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml | Renders internal resource metadata fields into the ARS spec. |
| charts/gha-runner-scale-set/tests/template_test.go | Extends Go-based Helm rendering tests for new metadata fields. |
| charts/gha-runner-scale-set-experimental/values.yaml | Adds default config blocks for internal resource metadata under resource.*. |
| charts/gha-runner-scale-set-experimental/templates/_autoscalingrunnerset.tpl | Adds helper to render spec-level internal resource metadata blocks. |
| charts/gha-runner-scale-set-experimental/templates/autoscalingrunnserset.yaml | Renders internal resource metadata fields into the experimental ARS spec. |
| charts/gha-runner-scale-set-experimental/tests/autoscaling_runner_set_labels_test.yaml | Adds helm-unittest assertions for spec-level internal labels. |
| charts/gha-runner-scale-set-experimental/tests/autoscaling_runner_set_annotations_test.yaml | Adds helm-unittest assertions for spec-level internal annotations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+491
to
+499
| # autoscalingListener: | ||
| # labels: | ||
| # key: value | ||
| # annotations: | ||
| # key: value | ||
| # listenerServiceAccount: | ||
| # labels: | ||
| # key: value | ||
| # annotations: |
charts/gha-runner-scale-set-experimental/templates/autoscalingrunnserset.yaml
Show resolved
Hide resolved
Comment on lines
+158
to
+175
| autoscalingListener: | ||
| {{- include "gha-runner-scale-set.resourceMetaSpec" . | nindent 4 }} | ||
| {{- end }} | ||
|
|
||
| {{- with .Values.resourceMeta.listenerServiceAccount }} | ||
| listenerServiceAccountMetadata: | ||
| {{- include "gha-runner-scale-set.resourceMetaSpec" . | nindent 4 }} | ||
| {{- end }} | ||
|
|
||
| {{- with .Values.resourceMeta.listenerRole }} | ||
| listenerRoleMetadata: | ||
| {{- include "gha-runner-scale-set.resourceMetaSpec" . | nindent 4 }} | ||
| {{- end }} | ||
|
|
||
| {{- with .Values.resourceMeta.listenerRoleBinding }} | ||
| listenerRoleBindingMetadata: | ||
| {{- include "gha-runner-scale-set.resourceMetaSpec" . | nindent 4 }} | ||
| {{- end }} |
Comment on lines
+106
to
+112
| # Specifies metadata that will be applied to the AutoscalingListener resource | ||
| # created by the AutoscalingRunnerSet controller. | ||
| autoscalingListener: | ||
| metadata: | ||
| labels: {} | ||
| annotations: {} | ||
|
|
6030bb4 to
9045b24
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends #4400