diff --git a/pkg/webhook/sidecarset/validating/sidecarset_create_update_handler.go b/pkg/webhook/sidecarset/validating/sidecarset_create_update_handler.go index 979118cbcb..ec3a9e0b4e 100644 --- a/pkg/webhook/sidecarset/validating/sidecarset_create_update_handler.go +++ b/pkg/webhook/sidecarset/validating/sidecarset_create_update_handler.go @@ -249,6 +249,9 @@ func validateSidecarContainerConflict(newContainers, oldContainers []appsv1alpha allErrs = append(allErrs, field.Invalid(fldPath.Child("upgradeStrategy").Child("upgradeType"), container.Name, fmt.Sprintf("container %v upgradeType is immutable", container.Name))) } + } else { + allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), + container.Name, fmt.Sprintf("container %v is not found", container.Name))) } }