-
Hello, I have searched everywhere and dug into the code, but I couldn't find a way to determine if a request is My operator implements the type CustomDefaulter interface {
Default(ctx context.Context, obj runtime.Object) error
} I don't see any way to get hold of the original request to get to the I'm sure I'm missing something pretty obvious, but 2 days of searches and digging, I have resolved to come and ask here. thank you in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Neeeevermind, I found it: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/webhook/admission#RequestFromContext Sorry for the noise. Maybe we should add this to the documentation though, as the default setup for the |
Beta Was this translation helpful? Give feedback.
Neeeevermind, I found it: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/webhook/admission#RequestFromContext
Sorry for the noise.
Maybe we should add this to the documentation though, as the default setup for the
defaulter
webhook that Kubebuilder puts in place isNonOnDryRun
.