You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
runControllerService=flag.Bool("run-controller-service", true, "If set to false then the CSI driver does not activate its controller service (default: true)")
37
+
runNodeService=flag.Bool("run-node-service", true, "If set to false then the CSI driver does not activate its node service (default: true)")
38
+
vendorVersionstring
36
39
)
37
40
38
41
const (
@@ -57,6 +60,8 @@ func main() {
57
60
}
58
61
59
62
funchandle() {
63
+
varerrerror
64
+
60
65
ifvendorVersion=="" {
61
66
klog.Fatalf("vendorVersion must be set at compile time")
Copy file name to clipboardExpand all lines: docs/kubernetes/user-guides/driver-install.md
+20-2
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ compute.instances.get
18
18
compute.instances.attachDisk
19
19
compute.instances.detachDisk
20
20
roles/compute.storageAdmin
21
-
roles/iam.serviceAccountUser
21
+
roles/iam.serviceAccountUser
22
22
```
23
23
24
24
If there is a pre-existing service account with these roles for use then the
@@ -79,4 +79,22 @@ iam.serviceAccounts.delete
79
79
```
80
80
81
81
These permissions are not required if you already have a service account ready
82
-
for use by the PD Driver.
82
+
for use by the PD Driver.
83
+
84
+
## Disabling particular CSI driver services
85
+
86
+
Traditionally, you run the CSI controllers with the GCE PD driver in the same Kubernetes cluster.
87
+
Though, there may be cases where you will only want to run a subset of the available driver services (for example, one scenario is running the controllers outside of the cluster they are serving (while the GCE PD driver still runs inside the served cluster), but there might be others scenarios).
88
+
The CSI driver consists out of these services:
89
+
90
+
* The **controller** service starts the GRPC server that serves `CreateVolume`, `DeleteVolume`, etc. It is depending on the GCP service account credentials and talks with the GCP API.
91
+
* The **identity** service is responsible to provide identity services like capability information of the CSI plugin.
92
+
* The **node** service implements the various operations for volumes that are run locally from the node, for example `NodePublishVolume`, `NodeStageVolume`, etc. It does not do operations like `CreateVolume` or `ControllerPublish`. Also, as it runs directly on the GCE instances, it is depending on the GCE metadata service.
93
+
94
+
The CSI driver has two command line flags, `--run-controller-service` and `--run-node-service` which both default to `true`.
95
+
You can disable the individual services by setting the respective flags to `false`.
96
+
97
+
Note: If you want to run the CSI controllers outside of the cluster you have to specify both the `zone` and `projectId` parameters in the GCE cloud provider config.
98
+
The `zone` is the name of one of the availability zones the served Kubernetes cluster is deployed to.
99
+
It is used to derive the GCP region and to discover the other availability zones in this region.
100
+
The `project-id` is the GCP project ID in which the controller is operating.
0 commit comments