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

Allow disabling ControlPlane's admission webhook deployment and management #308

Closed
pmalek opened this issue May 31, 2024 · 0 comments · Fixed by #326
Closed

Allow disabling ControlPlane's admission webhook deployment and management #308

pmalek opened this issue May 31, 2024 · 0 comments · Fixed by #326
Assignees
Milestone

Comments

@pmalek
Copy link
Member

pmalek commented May 31, 2024

Problem statement

https://github.com/Kong/gateway-operator-archive/pull/1545 introduced deploying ControlPlane's (KIC's) admission webhook in an unconditional manner: each ControlPlane gets its admission webhook configuration (and related resources) deployed.

This can be an issue for several use cases:

Proposed solution

  • Detect if ControlPlane has CONTROLLER_ADMISSION_WEBHOOK_LISTEN overridden with off (https://github.com/Kong/kubernetes-ingress-controller/blob/bcdd40a4099b797e274ba72e276a62fc1785053b/internal/manager/setup.go#L201) and if that's the case, disable creation of admission webhook configuration (and other related resources) for ControlPlane.
    • This would not introduce a new field to not allow conflicts with the aforementioned env
  • Detect change in CONTROLLER_ADMISSION_WEBHOOK_LISTEN env when ControlPlane is deployed
    • If its value changes from off to anything else (that's a valid <address>:<port> string) then deploy admission webhook configuration
    • If it changes from anything to off then remove admission webhook configuration and any other resources related to it.

Special notes

Putting tentatively in 1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment