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

deploy: combine provisioner and attacher, rename container names #74

Merged
merged 3 commits into from
Sep 5, 2018

Conversation

fatih
Copy link
Contributor

@fatih fatih commented Aug 31, 2018

This PR does the following:

  • combine the csi-provisioner and csi-attacher into a single csi-do-controller statefulset
  • rename the container name inside the attacher and provisioner statefulsets from digitalocean-csi-plugin to csi-do-plugin
  • rename the container name inside the node daemonset from csi-doplugin to csi-do-plugin
  • remove the RBAC's for the external attacher and provisioner as they
    are now included starting with K8S v1.10.5
  • renamed the service account names to be consistent with the overall
    naming
  • removed the Service resources as those are not needed
  • changed the RBAC permission for the node plugin. It was too
    permissive (initially intended for the controller sidecars).
  • added a common label called role=csi-do to all pods, and
    app=csi-do-controller and app=csi-do-node to the controller and node
    plugin

This allows you to get the pods or logs easily. Some example commands:

$ kubectl get pods -n kube-system
NAME                                    READY     STATUS    RESTARTS   AGE
csi-do-controller-0                     3/3       Running   0          15s
csi-do-node-4tkvh                       2/2       Running   0          14s
csi-do-node-4vjpr                       2/2       Running   0          14s
csi-do-node-thvjc                       2/2       Running   0          14s
kube-dns-64f766c69c-qsdnz               3/3       Running   0          49m
kube-proxy-worker-7871                  1/1       Running   1          48m
kube-proxy-worker-7872                  1/1       Running   1          49m
kube-proxy-worker-7873                  1/1       Running   1          48m
kubernetes-dashboard-7dd4fc69c8-fs8s5   1/1       Running   0          49m

$ kubectl get pods -l app=csi-do-controller -n kube-system
NAME                  READY     STATUS    RESTARTS   AGE
csi-do-controller-0   3/3       Running   0          34s

$  kubectl get pods -l app=csi-do-node -n kube-system
NAME                READY     STATUS    RESTARTS   AGE
csi-do-node-4tkvh   2/2       Running   0          39s
csi-do-node-4vjpr   2/2       Running   0          39s
csi-do-node-thvjc   2/2       Running   0          39s

$ kubectl get pods -l role=csi-do -n kube-system
NAME                  READY     STATUS    RESTARTS   AGE
csi-do-controller-0   3/3       Running   0          49s
csi-do-node-4tkvh     2/2       Running   0          48s
csi-do-node-4vjpr     2/2       Running   0          48s
csi-do-node-thvjc     2/2       Running   0          48s

closes #53

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: driver-registrar-binding
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from this whole renaming, the only 2 resources without do in their names are:

  • driver-registrar-binding
  • driver-registrar-role

are these ❄️ special ? otherwise might as well change them too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't, changing them 👍

@lxfontes
Copy link

lxfontes commented Sep 4, 2018

:shipit: and amazing work 👏

This PR does the following:

* combine the `csi-provisioner` and `csi-attacher` into a single `csi-do-controller` statefulset
* rename the container name inside the `attacher` and `provisioner` statefulsets from `digitalocean-csi-plugin` to `csi-do-plugin`
* rename the container name inside the `node` daemonset from `csi-doplugin` to `csi-do-plugin`
* remove the RBAC's for the external attacher and provisioner as they
are now included starting with K8S v1.10.5
* renamed the service account names to be consistent with the overall
naming
* removed the `Service` resources as those are not needed
* changed the RBAC permission for the `node` plugin. It was too
permissive (initially intended for the controller sidecars).
* added a common label called `role=csi-do` to all pods, and
`app=csi-do-controller` and `app=csi-do-node` to the controller and node
plugin

This allows you to get the pods or logs easily. Some example commands:

```
$ kubectl get pods -n kube-system
NAME                                    READY     STATUS    RESTARTS   AGE
csi-do-controller-0                     3/3       Running   0          15s
csi-do-node-4tkvh                       2/2       Running   0          14s
csi-do-node-4vjpr                       2/2       Running   0          14s
csi-do-node-thvjc                       2/2       Running   0          14s
kube-dns-64f766c69c-qsdnz               3/3       Running   0          49m
kube-proxy-worker-7871                  1/1       Running   1          48m
kube-proxy-worker-7872                  1/1       Running   1          49m
kube-proxy-worker-7873                  1/1       Running   1          48m
kubernetes-dashboard-7dd4fc69c8-fs8s5   1/1       Running   0          49m

$ kubectl get pods -l app=csi-do-controller -n kube-system
NAME                  READY     STATUS    RESTARTS   AGE
csi-do-controller-0   3/3       Running   0          34s

$  kubectl get pods -l app=csi-do-node -n kube-system
NAME                READY     STATUS    RESTARTS   AGE
csi-do-node-4tkvh   2/2       Running   0          39s
csi-do-node-4vjpr   2/2       Running   0          39s
csi-do-node-thvjc   2/2       Running   0          39s

$ kubectl get pods -l role=csi-do -n kube-system
NAME                  READY     STATUS    RESTARTS   AGE
csi-do-controller-0   3/3       Running   0          49s
csi-do-node-4tkvh     2/2       Running   0          48s
csi-do-node-4vjpr     2/2       Running   0          48s
csi-do-node-thvjc     2/2       Running   0          48s
```

closes #53
@fatih fatih merged commit b9d0d87 into master Sep 5, 2018
@fatih fatih deleted the combine-external-sidecars branch September 5, 2018 08:29
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

Successfully merging this pull request may close these issues.

Change container/k8s resources to a consistent name schema
2 participants