mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-08 14:29:45 +00:00
Add a REST hook for post-validation canonicalize
This is a simple hook that only Endpoints uses for now.
This commit is contained in:
@@ -82,6 +82,10 @@ func (namespaceStrategy) Validate(ctx api.Context, obj runtime.Object) fielderro
|
||||
return validation.ValidateNamespace(namespace)
|
||||
}
|
||||
|
||||
// Canonicalize normalizes the object after validation.
|
||||
func (namespaceStrategy) Canonicalize(obj runtime.Object) {
|
||||
}
|
||||
|
||||
// AllowCreateOnUpdate is false for namespaces.
|
||||
func (namespaceStrategy) AllowCreateOnUpdate() bool {
|
||||
return false
|
||||
|
Reference in New Issue
Block a user