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

feat: detect when ControlPlane's admission webhook is disabled and ensure relevant resources do not exist #326

Merged
merged 4 commits into from
Jun 12, 2024

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Jun 12, 2024

What this PR does / why we need it:

Ensure that relevant resources

  • webhook service
  • admissionwebhookconfiguration
  • admission webhook certificate service

do not exist when ControlPlane's admission webhook is disabled via CONTROLLER_ADMISSION_WEBHOOK_LISTEN env.

Which issue this PR fixes

Fixes #308

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect significant changes

@pmalek pmalek added this to the KGO v1.3.x milestone Jun 12, 2024
@pmalek pmalek self-assigned this Jun 12, 2024
@pmalek pmalek force-pushed the controlplane-webhook branch 2 times, most recently from dd73cbf to 9ce9c4a Compare June 12, 2024 13:48
@pmalek pmalek marked this pull request as ready for review June 12, 2024 13:48
@pmalek pmalek requested a review from a team as a code owner June 12, 2024 13:48
Copy link
Contributor

@czeslavo czeslavo left a comment

Choose a reason for hiding this comment

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

LGTM in general. I'm interested in your opinion on making it depend on the pod spec vs. strong API.

pkg/utils/kubernetes/resources/deployments.go Outdated Show resolved Hide resolved
controller/controlplane/controller.go Show resolved Hide resolved
@pmalek pmalek merged commit 96712ed into main Jun 12, 2024
16 checks passed
@pmalek pmalek deleted the controlplane-webhook branch June 12, 2024 16:26
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.

Allow disabling ControlPlane's admission webhook deployment and management
3 participants