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 ENV var to disable MWC init #71

Merged
merged 5 commits into from
Aug 24, 2022
Merged

Add ENV var to disable MWC init #71

merged 5 commits into from
Aug 24, 2022

Conversation

phenixblue
Copy link
Owner

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind documentation

/kind feature

/kind release

What this PR does / why we need it:

This adds a new IMAGESWAP_DISABLE_AUTO_MWC environment variable to allow for disabling the automatic generation of the Mutating Webhook Configuration (MWC) in the imageswap-init container.

This allows for the MWC to be generated outside of the imageswap init process and adds more flexibility to integrate cleanly with other provisioning tools/flows.

Which issue(s) this PR fixes:

Fixes #67

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

- Adds the `IMAGESWAP_DISABLE_AUTO_MWC` environment variable to allow for disabling the automatic generation of the Mutating Webhook Configuration (MWC) in the imageswap-init container.

Additional documentation e.g., usage docs, etc.:


@phenixblue phenixblue changed the title [WIP] Add ENV var to disable MWC init Add ENV var to disable MWC init Jul 6, 2022
@phenixblue
Copy link
Owner Author

phenixblue commented Jul 6, 2022

Just discovered that several of the existing Python unit tests were exhibiting missing key errors due to an already merged update to the structure of the admission response in the admission.k8s.io/v1 API. The field patchtype was changed to patchType (note the capital T). Fixed these tests as part of this PR.

@phenixblue phenixblue requested a review from ilrudie July 6, 2022 05:57
deploy/install.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator

@ilrudie ilrudie left a comment

Choose a reason for hiding this comment

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

looks good to me

@phenixblue phenixblue merged commit ed23ad5 into master Aug 24, 2022
@phenixblue phenixblue deleted the optional-mwc branch August 24, 2022 01:26
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.

Allow MutatingWebhookConfiguration to be deployed separately
2 participants