psp: remove unused PodSecurityPolicyValidationOptions

Since the only member of that struct is gone, the struct itself can also be
removed. If for whatever reason the struct is needed again, then this commit
can be reverted to bring it back.
This commit is contained in:
Patrick Ohly
2021-10-28 17:25:07 +02:00
parent a8c930ef46
commit d55f7c85ef
3 changed files with 16 additions and 23 deletions

View File

@@ -72,16 +72,14 @@ func (strategy) Canonicalize(obj runtime.Object) {
}
func (strategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
opts := validation.PodSecurityPolicyValidationOptions{}
return validation.ValidatePodSecurityPolicy(obj.(*policy.PodSecurityPolicy), opts)
return validation.ValidatePodSecurityPolicy(obj.(*policy.PodSecurityPolicy))
}
// WarningsOnCreate returns warnings for the creation of the given object.
func (strategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { return nil }
func (strategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
opts := validation.PodSecurityPolicyValidationOptions{}
return validation.ValidatePodSecurityPolicyUpdate(old.(*policy.PodSecurityPolicy), obj.(*policy.PodSecurityPolicy), opts)
return validation.ValidatePodSecurityPolicyUpdate(old.(*policy.PodSecurityPolicy), obj.(*policy.PodSecurityPolicy))
}
// WarningsOnUpdate returns warnings for the given update.