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

Single webhook per configuration entity #596

Merged
merged 1 commit into from
Sep 21, 2023
Merged

Conversation

ahadas
Copy link
Member

@ahadas ahadas commented Sep 20, 2023

We've noticed an unexpected behavior in OpenShift:

  1. ValidatingWebhookConfiguration or MutatingWebhookConfiguration is posted with a webhook
  2. CA bundle is injected to the webhook
  3. More webhooks are added to the configuration entity
  4. Some of the webhooks (in our case it has always been the last one) does not get a CA bundle injected

This is a workaround for this issue - avoid adding webhooks to an existing configuration entity by separating each webhook to a different configuration entity.

We've noticed an unexpected behavior in OpenShift:
1. ValidatingWebhookConfiguration or MutatingWebhookConfiguration is
   posted with a webhook
2. CA bundle is injected to the webhook
3. More webhooks are added to the configuration entity
4. Some of the webhooks (in our case it has always been the last one)
   does not get a CA bundle injected

This is a workaround for this issue - avoid adding webhooks to an
existing configuration entity by separating each webhook to a different
configuration entity.

Signed-off-by: Arik Hadas <[email protected]>
@ahadas ahadas requested review from bennyz and liranr23 September 20, 2023 06:19
@ahadas ahadas requested a review from mnecas as a code owner September 20, 2023 06:19
@sonarcloud
Copy link

sonarcloud bot commented Sep 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@liranr23
Copy link
Member

will it be possible to hit the issue once all of the existing configurations are set and we change one of them? what will happen in that case? couldn't we just update the existing configurations?

@ahadas
Copy link
Member Author

ahadas commented Sep 20, 2023

will it be possible to hit the issue once all of the existing configurations are set and we change one of them? what will happen in that case? couldn't we just update the existing configurations?

there's no problem with changing them, this issue happens when adding webhooks - so as long as you don't add webhooks to existing configuration entity, it would be fine

@ahadas ahadas merged commit c1bbbc0 into kubev2v:main Sep 21, 2023
8 checks passed
@ahadas ahadas deleted the upgrade_to_2.5 branch September 21, 2023 12:07
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.

3 participants