fix(reconciler): Support default value for RUNNER_NAME_PREFIX from my…#540
Open
sklirg wants to merge 1 commit intoevryfs:masterfrom
Open
fix(reconciler): Support default value for RUNNER_NAME_PREFIX from my…#540sklirg wants to merge 1 commit intoevryfs:masterfrom
sklirg wants to merge 1 commit intoevryfs:masterfrom
Conversation
…oung34-derivate Fixes not-in-sync between GitHub API and running Pods when the default value for `RUNNER_NAME_PREFIX` is used (and likely also if `RUNNER_NAME_PREFIX` is set). Signed-off-by: Håkon Solbjørg <hakon@solbj.org>
38016dd to
22c6e82
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.
…oung34-derivate
Fixes not-in-sync errors between GitHub API and running Pods when the default value for
RUNNER_NAME_PREFIXis used (and likely also ifRUNNER_NAME_PREFIXis set).If the environment variable
RUNNER_NAME_PREFIXis not set, then the default value ofgithub-runnerwill be used as a prefix.This shows up in GitHub Runners as such:

The code would originally try to match the runner name by using the name from the custom resource as a prefix, which would be incorrect in the case a
RUNNER_NAME_PREFIXis not provided (or is the empty string) and the name of the CR is not "github-runner-runner-pool". Furthermore, if this variable is provided as non-empty, the same thing would occur as far as I can see.Example configuration which triggers this is
With the pod template containers spec from sample, namely no
env:name forRUNNER_NAME_PREFIX.A workaround is to set the CR name to the same as
RUNNER_NAME_PREFIX, e.g. bothgithub-runner-runner-pool, but this duplicates the name and the prefix (because the pod name is templated from CR.name, like"${RUNNER_NAME_PREFIX}-${cr.Name}-${SUFFIX}") so you end up with names like "Runners / github-runner-runner-pool-github-runner-runner-pool-pod-wxvvc"