Update webhook Scheme to use and install mutations with mutation
registry Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
This commit is contained in:
parent
8e4a10ad93
commit
6438530fe0
@ -6,6 +6,7 @@ go_library(
|
||||
importpath = "github.com/jetstack/cert-manager/pkg/webhook",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/internal/api/mutation:go_default_library",
|
||||
"//pkg/internal/api/validation:go_default_library",
|
||||
"//pkg/internal/apis/acme/install:go_default_library",
|
||||
"//pkg/internal/apis/certmanager/install:go_default_library",
|
||||
|
||||
@ -19,6 +19,7 @@ package webhook
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/jetstack/cert-manager/pkg/internal/api/mutation"
|
||||
"github.com/jetstack/cert-manager/pkg/internal/api/validation"
|
||||
acmeinstall "github.com/jetstack/cert-manager/pkg/internal/apis/acme/install"
|
||||
cminstall "github.com/jetstack/cert-manager/pkg/internal/apis/certmanager/install"
|
||||
@ -40,6 +41,10 @@ var (
|
||||
// ValidationRegistry is a validation registry with all required
|
||||
// validations that should be enforced by the webhook component.
|
||||
ValidationRegistry = validation.NewRegistry(Scheme)
|
||||
|
||||
// MutationRegistry is a mutation registry with all required
|
||||
// mutations that should be enforced by the webhook component.
|
||||
MutationRegistry = mutation.NewRegistry(Scheme)
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -49,4 +54,6 @@ func init() {
|
||||
|
||||
cminstall.InstallValidation(ValidationRegistry)
|
||||
acmeinstall.InstallValidation(ValidationRegistry)
|
||||
|
||||
cminstall.InstallMutation(MutationRegistry)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user