mutating-webhook/internal/operations/deploymentsValidation.go
2023-03-18 14:04:46 -05:00

24 lines
576 B
Go

package operations
import (
admission "k8s.io/api/admission/v1"
)
func DeploymentsValidation() Hook {
return Hook{
// default allow
Create: func(r *admission.AdmissionRequest) (*Result, error) {
return &Result{Allowed: true}, nil
},
Delete: func(r *admission.AdmissionRequest) (*Result, error) {
return &Result{Allowed: true}, nil
},
Update: func(r *admission.AdmissionRequest) (*Result, error) {
return &Result{Allowed: true}, nil
},
Connect: func(r *admission.AdmissionRequest) (*Result, error) {
return &Result{Allowed: true}, nil
},
}
}