8000 Support v1 admission webhooks by meyskens · Pull Request #3167 · cert-manager/cert-manager · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support v1 admission webhooks #3167

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

Merged
merged 2 commits into from
Aug 13, 2020
Merged

Conversation

meyskens
Copy link
Contributor
@meyskens meyskens commented Aug 10, 2020

What this PR does / why we need it:

This adds support for admissionregistration.k8s.io/v1. Both in deployment and webhook server.
It will be the default version in the normal manifests, the legacy version will use v1beta1.

All code paths are changed to be v1, if v1beta1 is sent it will convert it to v1 and back to v1beta1 in response, this is done to keep supporting the legacy versions while being ready for v1beta1 being removed in future releases of Kubernetes

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

fixes #2952

Release note:

Add support for admissionregistration.k8s.io/v1

/kind cleanup

Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Aug 10, 2020
@jetstack-bot jetstack-bot requested a review from munnerz August 10, 2020 14:44
@jetstack-bot jetstack-bot added the area/deploy Indicates a PR modifies deployment configuration label Aug 10, 2020
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: meyskens

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

@jetstack-bot jetstack-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 10, 2020
@meyskens meyskens added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Aug 10, 2020
@jetstack-bot jetstack-bot removed the needs-kind Indicates a PR lacks a `kind/foo` label and requires one. label Aug 10, 2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog/klogr"

"github.com/jetstack/cert-manager/pkg/internal/api/validation"
"github.com/jetstack/cert-manager/pkg/webhook/handlers/testdata/apis/testgroup/install"
"github.com/jetstack/cert-manager/pkg/webhook/handlers/testdata/apis/testgroup/v1"
"github.com/jetstack/cert-manager/pkg/webhook/handlers/testdata/apis/testgroup/v2"
v1 "github.com/jetstack/cert-manager/pkg/webhook/handlers/testdata/apis/testgroup/v1"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not entirely sure why goimports did this...

@meyskens
Copy link
Contributor Author

/test pull-cert-manager-e2e-v1-15
/test pull-cert-manager-e2e-v1-13

Copy link
Contributor
@james-w james-w left a comment

Choose a reason for hiding this comment

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

Looks good, except for a query about the helm hack.

Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
@meyskens meyskens added this to the v1.0 milestone Aug 12, 2020
@james-w
Copy link
Contributor
james-w commented Aug 13, 2020

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 13, 2020
@jetstack-bot jetstack-bot merged commit 9822581 into cert-manager:master Aug 13, 2020
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. area/deploy Indicates a PR modifies deployment configuration dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Add support for admissionregistration.k8s.io/v1 webhooks
3 participants
0