@@ -749,7 +749,7 @@ func (*TestValidatorList) DeepCopyObject() runtime.Object { return nil }
749749
750750var _ admission.Validator = & TestValidator {}
751751
752- func (v * TestValidator ) ValidateCreate () ([] string , error ) {
752+ func (v * TestValidator ) ValidateCreate () (admission. Warnings , error ) {
753753 if v .Panic {
754754 panic ("fake panic test" )
755755 }
@@ -759,7 +759,7 @@ func (v *TestValidator) ValidateCreate() ([]string, error) {
759759 return nil , nil
760760}
761761
762- func (v * TestValidator ) ValidateUpdate (old runtime.Object ) ([] string , error ) {
762+ func (v * TestValidator ) ValidateUpdate (old runtime.Object ) (admission. Warnings , error ) {
763763 if v .Panic {
764764 panic ("fake panic test" )
765765 }
@@ -774,7 +774,7 @@ func (v *TestValidator) ValidateUpdate(old runtime.Object) ([]string, error) {
774774 return nil , nil
775775}
776776
777- func (v * TestValidator ) ValidateDelete () ([] string , error ) {
777+ func (v * TestValidator ) ValidateDelete () (admission. Warnings , error ) {
778778 if v .Panic {
779779 panic ("fake panic test" )
780780 }
@@ -824,21 +824,21 @@ func (dv *TestDefaultValidator) Default() {
824824
825825var _ admission.Validator = & TestDefaultValidator {}
826826
827- func (dv * TestDefaultValidator ) ValidateCreate () ([] string , error ) {
827+ func (dv * TestDefaultValidator ) ValidateCreate () (admission. Warnings , error ) {
828828 if dv .Replica < 0 {
829829 return nil , errors .New ("number of replica should be greater than or equal to 0" )
830830 }
831831 return nil , nil
832832}
833833
834- func (dv * TestDefaultValidator ) ValidateUpdate (old runtime.Object ) ([] string , error ) {
834+ func (dv * TestDefaultValidator ) ValidateUpdate (old runtime.Object ) (admission. Warnings , error ) {
835835 if dv .Replica < 0 {
836836 return nil , errors .New ("number of replica should be greater than or equal to 0" )
837837 }
838838 return nil , nil
839839}
840840
841- func (dv * TestDefaultValidator ) ValidateDelete () ([] string , error ) {
841+ func (dv * TestDefaultValidator ) ValidateDelete () (admission. Warnings , error ) {
842842 if dv .Replica > 0 {
843843 return nil , errors .New ("number of replica should be less than or equal to 0 to delete" )
844844 }
@@ -872,7 +872,7 @@ var _ admission.CustomDefaulter = &TestCustomDefaulter{}
872872
873873type TestCustomValidator struct {}
874874
875- func (* TestCustomValidator ) ValidateCreate (ctx context.Context , obj runtime.Object ) ([] string , error ) {
875+ func (* TestCustomValidator ) ValidateCreate (ctx context.Context , obj runtime.Object ) (admission. Warnings , error ) {
876876 logf .FromContext (ctx ).Info ("Validating object" )
877877 req , err := admission .RequestFromContext (ctx )
878878 if err != nil {
@@ -889,7 +889,7 @@ func (*TestCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Obje
889889 return nil , nil
890890}
891891
892- func (* TestCustomValidator ) ValidateUpdate (ctx context.Context , oldObj , newObj runtime.Object ) ([] string , error ) {
892+ func (* TestCustomValidator ) ValidateUpdate (ctx context.Context , oldObj , newObj runtime.Object ) (admission. Warnings , error ) {
893893 logf .FromContext (ctx ).Info ("Validating object" )
894894 req , err := admission .RequestFromContext (ctx )
895895 if err != nil {
@@ -910,7 +910,7 @@ func (*TestCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj r
910910 return nil , nil
911911}
912912
913- func (* TestCustomValidator ) ValidateDelete (ctx context.Context , obj runtime.Object ) ([] string , error ) {
913+ func (* TestCustomValidator ) ValidateDelete (ctx context.Context , obj runtime.Object ) (admission. Warnings , error ) {
914914 logf .FromContext (ctx ).Info ("Validating object" )
915915 req , err := admission .RequestFromContext (ctx )
916916 if err != nil {
0 commit comments