Skip to content

Commit 5c18026

Browse files
authored
Merge pull request #888 from pmsl/bugfix/craned-rbac
change update workload to update workload status
2 parents 6d7758e + 8380d7f commit 5c18026

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

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)