Skip to content

Commit 8380d7f

Browse files
author
brucejunlli
committed
change update workload to update workload status
1 parent 6d7758e commit 8380d7f

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

deploy/craned/rbac.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,16 @@ rules:
7272
- get
7373
- list
7474
- watch
75-
- update
75+
- apiGroups:
76+
- apps
77+
resources:
78+
- daemonsets/status
79+
- deployments/status
80+
- deployments/scale
81+
- statefulsets/status
82+
- statefulsets/scale
83+
verbs:
84+
- update
7685
- apiGroups:
7786
- autoscaling
7887
resources:

pkg/controller/recommendation/updater.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ func (c *RecommendationController) UpdateRecommendation(ctx context.Context, rec
9999

100100
if needUpdate {
101101
unstructed.SetAnnotations(annotation)
102-
err = c.Client.Update(ctx, unstructed)
102+
//Convergence craned permissions
103+
err = c.Client.Status().Update(ctx, unstructed)
103104
if err != nil {
104105
return false, fmt.Errorf("update target annotation failed: %v. ", err)
105106
}

0 commit comments

Comments
 (0)