returnnil,errors.NewBadRequest(fmt.Sprintf("cannot bind token for serviceaccount %q to pod running with serviceaccount %q",name,pod.Spec.ServiceAccountName))
returnnil,errors.NewBadRequest(fmt.Sprintf("cannot bind token for serviceaccount %q to pod running with different serviceaccount name.",name))
returnnil,errors.NewBadRequest(fmt.Sprintf("cannot bind token to object of type %s",gvk.String()))
returnnil,errors.NewBadRequest(fmt.Sprintf("cannot bind token to object of type %s",gvk.String()))
}
}
ifref.UID!=""&&uid!=ref.UID{
ifref.UID!=""&&uid!=ref.UID{
returnnil,errors.NewConflict(schema.GroupResource{Group:gvk.Group,Resource:gvk.Kind},ref.Name,fmt.Errorf("the UID in the bound object reference (%s) does not match the UID in record (%s). The object might have been deleted and then recreated",ref.UID,uid))
returnnil,errors.NewConflict(schema.GroupResource{Group:gvk.Group,Resource:gvk.Kind},ref.Name,fmt.Errorf("the UID in the bound object reference (%s) does not match the UID in record. The object might have been deleted and then recreated",ref.UID))