Skip to content
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

Add annotation with values hash to re-create listener #3195

Merged
merged 9 commits into from Mar 19, 2024

Conversation

nikola-jokic
Copy link
Member

@nikola-jokic nikola-jokic commented Dec 28, 2023

Using spec hash of the autoscaling runner set is not sufficient to indicate re-creation of the listener. As it is described in issue #3182, changing values.yaml to update secret does not re-create the listener.

Since we have avoided using cluster role to watch secrets, controller does not always have permission to list secrets (for more information, you can read this ADR).

Since all upgrades to the autoscaling runner set, initiated from helm, should re-create the listener, we can use the values json hash to create a fingerprint of the applied configuration. Instead of autoscaling runner set's spec hash, we can match the label against the installation to figure out if the listener should be re-created.

Fixes #3182

@nikola-jokic nikola-jokic marked this pull request as ready for review December 28, 2023 16:38
@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label Dec 28, 2023
@@ -250,12 +250,6 @@ type AutoscalingRunnerSetStatus struct {
FailedEphemeralRunners int `json:"failedEphemeralRunners"`
}

func (ars *AutoscalingRunnerSet) ListenerSpecHash() string {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This does not take into account live patches to the listener itself. If we need to calculate the hash spec live as well, I propose using shorter hash of the values.yaml spec and later add the suffix to the annotation based on the listener spec hash

rentziass
rentziass previously approved these changes Mar 19, 2024
@nikola-jokic nikola-jokic merged commit c9099a5 into master Mar 19, 2024
16 checks passed
@nikola-jokic nikola-jokic deleted the nikola-jokic/listener-hash branch March 19, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gha-runner-scale-set Related to the gha-runner-scale-set mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runner Scale Set listener-config secret is static
2 participants