func (in *PodChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList {
	allErrs := field.ErrorList{}
	if in.Action == ContainerKillAction {
		if len(in.ContainerSelector.ContainerNames) == 0 {
			err := fmt.Errorf("the name of container should not be empty on %s action", in.Action)
			allErrs = append(allErrs, field.Invalid(path.Child("containerNames"), in.ContainerNames, err.Error()))
		}
	}
	return allErrs
}
validateContainerNames validates the ContainerNames
package v1alpha1
import (
	"fmt"
	"k8s.io/apimachinery/pkg/util/validation/field"
)