// ensure no metadata changed. nodes should not be able to relabel, add finalizers/owners, etc
if!apiequality.Semantic.DeepEqual(oldPVC,newPVC){
returnadmission.NewForbidden(a,fmt.Errorf("node %q may not update fields other than status.capacity and status.conditions: %v",nodeName,diff.ObjectReflectDiff(oldPVC,newPVC)))
returnadmission.NewForbidden(a,fmt.Errorf("node %q is not allowed to update fields other than status.capacity and status.conditions: %v",nodeName,diff.ObjectReflectDiff(oldPVC,newPVC)))
returnadmission.NewForbidden(a,fmt.Errorf("cannot set labels: %s",strings.Join(forbiddenLabels.List(),", ")))
returnadmission.NewForbidden(a,fmt.Errorf("node %q is not allowed to set the following labels: %s",nodeName,strings.Join(forbiddenLabels.List(),", ")))
}
// check and warn if nodes set labels on create that would have been forbidden on update
// TODO(liggitt): in 1.17, expand getForbiddenCreateLabels to match getForbiddenUpdateLabels and drop this
err:`is not allowed to modify labels: foo.node-restriction.kubernetes.io/foo, node-restriction.kubernetes.io/foo, other.k8s.io/foo, other.kubernetes.io/foo`,
err:`is not allowed to modify labels: foo.node-restriction.kubernetes.io/foo, node-restriction.kubernetes.io/foo, other.k8s.io/foo, other.kubernetes.io/foo`,
err:`is not allowed to modify labels: foo.node-restriction.kubernetes.io/foo, node-restriction.kubernetes.io/foo, other.k8s.io/foo, other.kubernetes.io/foo`,
returnfalse,fmt.Errorf("node %q cannot get %s %s/%s, no path was found",nodeName,vertexTypes[startingType],startingNamespace,startingName)
returnfalse,fmt.Errorf("node %q cannot get %s %s/%s, no relationship to this object was found in the node authorizer graph",nodeName,vertexTypes[startingType],startingNamespace,startingName)