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

[release/v0.4] Fix webhook not deployed in CI #508

Open
wants to merge 1 commit into
base: release/v0.4
Choose a base branch
from

Conversation

tomleb
Copy link
Contributor

@tomleb tomleb commented Sep 18, 2024

Backport

Backport of #503

You can make changes to this PR with the following command:

git clone https://github.com/rancher/webhook
cd webhook
git switch backport-503-release-v0.4-24683

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.

@tomleb tomleb marked this pull request as ready for review September 18, 2024 12:28
@tomleb tomleb requested a review from a team as a code owner September 18, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants