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

✨ (go/v4) Add scaffold for e2e webhook checks #4121

Conversation

camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented Aug 31, 2024

A new scaffold marker is introduced to automatically adds end-to-end tests for webhooks in the test/e2e/test.go

The scaffolded tests include:

  • Validation that cert-manager has successfully provisioned the secret, when/if an webhook is scaffold for the project.
  • Verification that the CA bundle is injected into the mutating webhooks, if a mutating webhook is scaffolded.
  • Verification that the CA bundle is injected into the validating webhooks, if a validating webhook is scaffolded.

PS.: See that a new maker +kubebuilder:scaffold:e2e-webhooks-checks is introduced to allow we add to the e2e tests the scaffolds only when users use kb create webhook accordinly.

Partially closes: #4120

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 31, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 31, 2024
@camilamacedo86 camilamacedo86 force-pushed the create-maker-scaffold-webhook-checks-e2e branch from 58d8473 to 7adff4e Compare August 31, 2024 10:50
@camilamacedo86
Copy link
Member Author

c/c @Adembc

@camilamacedo86 camilamacedo86 force-pushed the create-maker-scaffold-webhook-checks-e2e branch from 7adff4e to b798dc1 Compare August 31, 2024 16:19
@Adembc
Copy link
Contributor

Adembc commented Aug 31, 2024

/lgtm

@k8s-ci-robot
Copy link
Contributor

@Adembc: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@camilamacedo86 camilamacedo86 force-pushed the create-maker-scaffold-webhook-checks-e2e branch 2 times, most recently from 8617d39 to a86244c Compare September 3, 2024 06:03
@camilamacedo86
Copy link
Member Author

HI @mogsie

Would you like to help out on this one by getting this PR and changing the asserts as you did with : #4131?

@camilamacedo86
Copy link
Member Author

Hi @mogsie

Thank you a lot !!!
I will address your suggestions in this one !!!

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 6, 2024
@camilamacedo86 camilamacedo86 force-pushed the create-maker-scaffold-webhook-checks-e2e branch from a86244c to c7bcc4f Compare September 7, 2024 06:56
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 7, 2024
A new scaffold marker is introduced to automatically adds end-to-end tests for webhooks in the test/e2e/test.go

The scaffolded tests include:
- Validation that cert-manager has successfully provisioned the secret, when/if an webhook is scaffold for the project.
- Verification that the CA bundle is injected into the mutating webhooks, if a mutating webhook is scaffolded.
- Verification that the CA bundle is injected into the validating webhooks, if a validating webhook is scaffolded.
@camilamacedo86 camilamacedo86 force-pushed the create-maker-scaffold-webhook-checks-e2e branch from c7bcc4f to b13bb6e Compare September 7, 2024 07:06
@camilamacedo86
Copy link
Member Author

We have an LGTM
And all suggestion done by @mogsie are either addressed
So, I am moving forward here (we have big fishes to fry and it will help us to validate other changes)

However, if you @mogsie or any other person have any further suggestion to improvements and etc please, feel free to raise an PR with them. All help is welcome !!!

@camilamacedo86 camilamacedo86 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 7, 2024
@k8s-ci-robot k8s-ci-robot merged commit 8f9e72c into kubernetes-sigs:master Sep 7, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E2e tests scaffolded by default
4 participants