weaveworks / launcher

Weave Cloud Launcher
Apache License 2.0
10 stars 13 forks source link

Unknown user "system:serviceaccount:weave:weave-agent" #122

Closed leth closed 6 years ago

leth commented 6 years ago

https://sentry.io/weaveworks/launcher-agent/issues/443372991/

*errors.errorString: failed to retrieve deployment: deployments.extensions "weave-agent" is forbidden: User "system:serviceaccount:weave:weave-agent" cannot get deployments.extensions in the namespace "weave": clusterrole.rbac.authorization.k8s.io "weave-agent" not found
Unknown user "system:serviceaccount:weave:weave-agent"
  File "/go/src/github.com/weaveworks/launcher/agent/main.go", line 71, in logError
  File "/go/src/github.com/weaveworks/launcher/agent/main.go", line 84, in updateAgents

failed to retrieve deployment: deployments.extensions "weave-agent" is forbidden: User "system:serviceaccount:weave:weave-agent" cannot get deployments.extensions in the namespace "weave": clusterrole.rbac.authorization.k8s.io "weave-agent" not found
Unknown user "system:serviceaccount:weave:weave-agent"
dlespiau commented 6 years ago

Reproduced the error on a test GKE cluster.

This is the result of a failed onboarding process, when we fail to create a ClusterRole with the admin rights. To simulate the onboarding error, I removed gcloud from my PATH. This looks like the following:

serviceaccount "weave-agent" configured
clusterrolebinding "weave-agent" configured
deployment "weave-agent" created
Error from server (Forbidden): clusterroles.rbac.authorization.k8s.io "weave-agent" is forbidden: attempt to grant extra privileges:.

We could either: