mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-19 04:26:39 +00:00
Fix: make read-only object not found error more clear (#5614)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
@@ -231,7 +231,7 @@ func createOrGetExisting(ctx context.Context, act *applyAction, c client.Client,
|
||||
return nil, err
|
||||
}
|
||||
if act.readOnly {
|
||||
return nil, fmt.Errorf("cannot create %s (%s) in read-only mode", desired.GetObjectKind().GroupVersionKind().Kind, desired.GetName())
|
||||
return nil, fmt.Errorf("%s (%s) is marked as read-only but does not exist. You should check the existence of the resource or remove the read-only policy", desired.GetObjectKind().GroupVersionKind().Kind, desired.GetName())
|
||||
}
|
||||
if act.updateAnnotation {
|
||||
if err := addLastAppliedConfigAnnotation(desired); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user