[release/v0.4] Fix webhook not deployed in CI #508
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.
Backport
Backport of #503
You can make changes to this PR with the following command:
Issue rancher/rancher#47062
The deployment logic in r/r is a little complex for webhook.
Rancher has the rancher-webhook charts bundled in its image. Depending on timing and how well our git mirror is doing, Rancher might try to deploy the rancher-webhook chart embedded in the image, or it might deploy the chart pulled from the charts repo.
When it's pulling from the charts repo, then the webhook RC version in
CATTLE_RANCHER_WEBHOOK_VERSION
might be stale compared to the on in the charts repo. This leads to Rancher not being able to deploy webhook.When using the bundled rancher-webhook chart, there's a very small chance that the bundled repo has a newer version of rancher-webhook than the one set in
CATTLE_RANCHER_WEBHOOK_VERSION
.For the purpose of setting up Rancher for our tests, we really don't care what webhook version is installed because we'll be deploying the one from the PR anyway. So to eliminate these issues, we simply set
CATTLE_RANCHER_WEBHOOK_VERSION
to empty""
. Rancher will then deploy the latest version of webhook it can find in the index chart, whether its from bundled or from git mirror.