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

fix: adapt admission webhook tests to run in colima host #2925

Merged
merged 2 commits into from
Sep 13, 2022

Conversation

czeslavo
Copy link
Contributor

What this PR does / why we need it:

  • changes binding address of the webhook server to 0.0.0.0 so that it's reachable from any address host is called
  • makes AdmissionWebhookListenHost depend on the host environment
    • for vanilla docker host it will use default docker bridge network gateway - 172.17.0.1 as it already did
    • for colima docker host it will use a hardcoded host IP address routable from colima VM and colima hosted containers - 192.168.5.2.

It allows to run admission webhook integration tests locally on a colima based docker host.

Drawback is that we're building more hacks on top of the hack which is tracked by this issue: #1613

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@czeslavo czeslavo requested a review from a team as a code owner September 13, 2022 13:12
@CLAassistant
Copy link

CLAassistant commented Sep 13, 2022

CLA assistant check
All committers have signed the CLA.

@czeslavo czeslavo temporarily deployed to Configure ci September 13, 2022 13:12 Inactive
@Kong Kong deleted a comment from CLAassistant Sep 13, 2022
@czeslavo czeslavo temporarily deployed to Configure ci September 13, 2022 13:34 Inactive
pmalek
pmalek previously approved these changes Sep 13, 2022
Copy link
Member

@pmalek pmalek left a comment

Choose a reason for hiding this comment

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

While this should still be thought of as a hack, this PR introduces a valid improvement for running this test on mac.

internal/util/test/webhooks.go Show resolved Hide resolved
@czeslavo czeslavo temporarily deployed to Configure ci September 13, 2022 14:39 Inactive
@czeslavo czeslavo temporarily deployed to Configure ci September 13, 2022 15:01 Inactive
@czeslavo czeslavo merged commit d1d7bcf into main Sep 13, 2022
@czeslavo czeslavo deleted the adapt-webhook-to-colima branch September 13, 2022 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants