You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What would you like to be added:
In nodepool validation webhook, some fields in NodePool.Spec is not allowed to modify, but Invalid error code is returned. I think that it is appropriate to return Forbidden error code.
What would you like to be added:
In nodepool validation webhook, some fields in NodePool.Spec is not allowed to modify, but
Invalid
error code is returned. I think that it is appropriate to returnForbidden
error code.The following code lines should be modified:
openyurt/pkg/yurtmanager/webhook/nodepool/v1beta1/nodepool_validation.go
Line 61 in 4a96269
=>
return apierrors.NewForbidden(appsv1beta1.GroupVersion.WithResource("nodepools").GroupResource(), np.Name, allErrs.ToAggregate())
openyurt/pkg/yurtmanager/webhook/nodepool/v1beta1/nodepool_validation.go
Line 74 in 4a96269
=>
return apierrors.NewForbidden(appsv1beta1.GroupVersion.WithResource("nodepools").GroupResource(), np.Name, allErrs.ToAggregate())
openyurt/pkg/yurtmanager/webhook/nodepool/v1beta1/nodepool_validation.go
Line 124 in 4a96269
=> field.Forbidden(field.NewPath("spec").Child("type"), "pool type can't be changed")})
openyurt/pkg/yurtmanager/webhook/nodepool/v1beta1/nodepool_validation.go
Line 129 in 4a96269
=> field.Forbidden(field.NewPath("spec").Child("hostNetwork"), "pool hostNetwork can't be changed"),
Why is this needed:
others
/kind feature
The text was updated successfully, but these errors were encountered: