mutating-webhook/internal/operations/deploymentsValidation.go
nhyatt d5963a693d
order modules
add configuration to supporting functionality
2023-03-18 14:47:06 -05:00

26 lines
689 B
Go

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