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

Izhang validation webhook #89

Merged
merged 12 commits into from
Jun 1, 2020
Merged

Izhang validation webhook #89

merged 12 commits into from
Jun 1, 2020

Conversation

ianzhang366
Copy link
Contributor

Addressing issue(when multiple types of the channel at 1 namespace crash the channel operator):

https://github.com/open-cluster-management/backlog/issues/2265
https://github.com/open-cluster-management/backlog/issues/2310

Basically, we add a validation webhook.
The validation logic is defined at issue:
https://github.com/open-cluster-management/backlog/issues/2157

To support the webhook, we need to create

  • a service for k8s-server to call on the webhook we created
  • a ValidatingWebhookConfiguration, tells k8s to call the webhook service when channel resource is created or updated.

In addition, we need to create a self-signed cert and inject the CA to ValidatingWebhookConfiguration.

ianzhang366 added 5 commits May 15, 2020 17:52
Signed-off-by: ianzhang366 <[email protected]>
Signed-off-by: ianzhang366 <[email protected]>

working webhook set up
Signed-off-by: ianzhang366 <[email protected]>
Signed-off-by: ianzhang366 <[email protected]>

working refactor

Signed-off-by: ianzhang366 <[email protected]>
Signed-off-by: ianzhang366 <[email protected]>

more test case

Signed-off-by: ianzhang366 <[email protected]>

add test case

Signed-off-by: ianzhang366 <[email protected]>
Copy link
Contributor

@rokej rokej left a comment

Choose a reason for hiding this comment

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

The change looks good but OLM cannot install service.

Copy link
Collaborator

@xiangjingli xiangjingli left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ianzhang366, rokej, xiangjingli

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: ianzhang366 <[email protected]>
@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

ianzhang366 added 5 commits May 29, 2020 18:39
Signed-off-by: ianzhang366 <[email protected]>
Signed-off-by: ianzhang366 <[email protected]>
Signed-off-by: ianzhang366 <[email protected]>
Signed-off-by: ianzhang366 <[email protected]>
Signed-off-by: ianzhang366 <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 1, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 4 Code Smells

41.6% 41.6% Coverage
0.0% 0.0% Duplication

@ianzhang366 ianzhang366 merged commit 3f02caf into master Jun 1, 2020
@ianzhang366 ianzhang366 deleted the izhang-validation-webhook branch June 1, 2020 14:46
magic-mirror-bot bot pushed a commit that referenced this pull request Jan 7, 2025
Signed-off-by: Xiangjing Li <[email protected]>
(cherry picked from commit 7b86a94befdc2e71544b5d8479be25e54362b5c5)
magic-mirror-bot bot pushed a commit that referenced this pull request Jan 7, 2025
Signed-off-by: Xiangjing Li <[email protected]>
(cherry picked from commit 7b86a94befdc2e71544b5d8479be25e54362b5c5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants