-
Notifications
You must be signed in to change notification settings - Fork 110
csi: revisit rbac rules, add Snapshotter sidecar and roles #104
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
Conversation
* Most of the rules are now removed and will not be part of upcoming k8s releases. Going forward drivers have to install themself. * Add `csi-snapshotter` sidecar, needed to handle Volume snapshots * This also adds the necessary roles and bindings needed for the csi-snapshotter sidecar.
@@ -47,7 +47,7 @@ test: | |||
test-integration: | |||
|
|||
@echo "==> Started integration tests" | |||
@env GOCACHE=off go test -v -tags integration ./test/... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because go modules won't work if you turn off GOCACHE
@@ -118,6 +118,20 @@ provisioner: dobs.csi.digitalocean.com | |||
|
|||
--- | |||
|
|||
# NOTE(arslan): this will probably fail , because the CRD is created via the | |||
# csi-snapshotter sidecar, that is part of the csi-do-controller statefulset. | |||
# We need to create this seperately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to this comment some documentation about how other devs need to proceed to get this working (eg "apply this section separately after XYZ")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment will be removed in upcoming PR's it's just here to remind myself.
resources: ["volumesnapshots"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: ["apiextensions.k8s.io"] | ||
resources: ["customresourcedefinitions"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need these permissions to create snapshots?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The csi-snapshotter
sidecar needs them to create the VolumeSnapshot
and VolumeSnapshotClass
custom resource definitions.
These are pulled from the appropriate repo, each sidecar now contains the RBAC rules it needs to operate, as an example for the above: https://github.com/kubernetes-csi/external-snapshotter/blob/master/deploy/kubernetes/rbac.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm I see that the binary tries to create its own definition. Seems wrong to me but until patched, I guess we have no alternative:
|
No description provided.