Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squash Container Tried to Register CRDs #241

Open
orlando-jamie opened this issue Oct 9, 2019 · 0 comments
Open

Squash Container Tried to Register CRDs #241

orlando-jamie opened this issue Oct 9, 2019 · 0 comments

Comments

@orlando-jamie
Copy link

orlando-jamie commented Oct 9, 2019

I took away the following CRD permissions from the squash role, as they are already installed per secure mode.

- apiGroups:
  - apiextensions.k8s.io
  resources:
  - customresourcedefinitions
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - delete
  - register

However, the squash pod fails with the following error.

$ kubectl logs squash-58dcb9bd49-lbsxw -n squash-debugger
time="2019-10-09T12:23:51Z" level=info msg="squash started dev, 2019-02-26.18:04:27"
ERROR: logging before flag.Parse: I1009 12:23:51.510752       1 remote_runtime.go:43] Connecting to runtime service /var/run/cri.sock
ERROR: logging before flag.Parse: W1009 12:23:51.510767       1 util_unix.go:75] Using "/var/run/cri.sock" as endpoint is deprecated, please consider using full url format "unix:///var/run/cri.sock".
time="2019-10-09T12:23:51Z" level=info msg="Squash Client started"
time="2019-10-09T12:23:51Z" level=error msg=RunDebugBridge err="failed to register crd: customresourcedefinitions.apiextensions.k8s.io is forbidden: User \"system:serviceaccount:squash-debugger:squash\" cannot create resource \"customresourcedefinitions\" in API group \"apiextensions.k8s.io\" at the cluster scope"
time="2019-10-09T12:23:51Z" level=fatal msg="Error running debug bridge" error="failed to register crd: customresourcedefinitions.apiextensions.k8s.io is forbidden: User \"system:serviceaccount:squash-debugger:squash\" cannot create resource \"customresourcedefinitions\" in API group \"apiextensions.k8s.io\" at the cluster scope"

Tracking down the error, "RunDebugBridge", I can see the error is caused by the call to create the GetBasicDebugAttachmentClient.

daClient, err := utils.GetBasicDebugAttachmentClient(ctx)

Going further down the rabbit hole, I see that the client is part of the solo-kit client (github.com/solo-io/solo-kit/pkg/api/v1/clients).

BaseClient() clients.ResourceClient

However, looking into some closed issues, it seems that you intended to have already closed this bug? #155.

Any idea why the squash server container is still trying to created the CRDs within the solo-kit client?

Thank You,
-Jamie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant