From dfc6330753f1323c02c7b0ab281c175933fe4c80 Mon Sep 17 00:00:00 2001 From: Evan Yin Date: Tue, 19 Oct 2021 13:54:42 -0700 Subject: [PATCH 1/2] Update bundle.yaml Fixing operator error like this: E1017 04:50:00.170828 1 controller.go:327] error syncing cluster 'default/m3db-cluster-prod-30day': statefulsets.apps "m3db-cluster-prod-30day-rep0" is forbidden: User "system:serviceaccount:default:m3db-operator" cannot update resource "statefulsets/status" in API group "apps" in the namespace "default" --- bundle.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle.yaml b/bundle.yaml index 1dd4aa63..e07ae14c 100644 --- a/bundle.yaml +++ b/bundle.yaml @@ -31,7 +31,7 @@ rules: resources: ["pods"] verbs: ["list", "get", "watch", "update", "patch"] - apiGroups: ["apps"] - resources: ["statefulsets", "deployments"] + resources: ["statefulsets", "statefulsets/status", "deployments"] verbs: ["*"] - apiGroups: ["operator.m3db.io"] resources: ["*"] From 0421646e774df834c3fae014b948962308df5292 Mon Sep 17 00:00:00 2001 From: Rob Skillington Date: Wed, 20 Oct 2021 13:59:09 -0400 Subject: [PATCH 2/2] Update manifests --- helm/m3db-operator/templates/cluster_role.yaml | 2 +- integration/manifests/operator.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/m3db-operator/templates/cluster_role.yaml b/helm/m3db-operator/templates/cluster_role.yaml index 5c000f98..58319de1 100644 --- a/helm/m3db-operator/templates/cluster_role.yaml +++ b/helm/m3db-operator/templates/cluster_role.yaml @@ -22,7 +22,7 @@ rules: resources: ["pods"] verbs: ["list", "get", "watch", "update", "patch"] - apiGroups: ["apps"] - resources: ["statefulsets", "deployments"] + resources: ["statefulsets", "statefulsets/status", "deployments"] verbs: ["*"] - apiGroups: ["operator.m3db.io"] resources: ["*"] diff --git a/integration/manifests/operator.yaml b/integration/manifests/operator.yaml index 39d33dee..850602b6 100644 --- a/integration/manifests/operator.yaml +++ b/integration/manifests/operator.yaml @@ -28,7 +28,7 @@ rules: resources: ["pods"] verbs: ["list", "get", "watch", "update", "patch"] - apiGroups: ["apps"] - resources: ["statefulsets", "deployments"] + resources: ["statefulsets", "statefulsets/status", "deployments"] verbs: ["*"] - apiGroups: ["operator.m3db.io"] resources: ["*"]