@@ -36,24 +36,25 @@ func init() {
36
36
}
37
37
38
38
var (
39
- endpoint = flag .String ("endpoint" , "unix://tmp/csi.sock" , "CSI endpoint" )
40
- blobfuseProxyEndpoint = flag .String ("blobfuse-proxy-endpoint" , "unix://tmp/blobfuse-proxy.sock" , "blobfuse-proxy endpoint" )
41
- nodeID = flag .String ("nodeid" , "" , "node id" )
42
- version = flag .Bool ("version" , false , "Print the version and exit." )
43
- metricsAddress = flag .String ("metrics-address" , "0.0.0.0:29634" , "export the metrics" )
44
- kubeconfig = flag .String ("kubeconfig" , "" , "Absolute path to the kubeconfig file. Required only when running out of cluster." )
45
- driverName = flag .String ("drivername" , blob .DefaultDriverName , "name of the driver" )
46
- enableBlobfuseProxy = flag .Bool ("enable-blobfuse-proxy" , false , "using blobfuse proxy for mounts" )
47
- blobfuseProxyConnTimout = flag .Int ("blobfuse-proxy-connect-timeout" , 5 , "blobfuse proxy connection timeout(seconds)" )
48
- enableBlobMockMount = flag .Bool ("enable-blob-mock-mount" , false , "enable mock mount(only for testing)" )
49
- cloudConfigSecretName = flag .String ("cloud-config-secret-name" , "azure-cloud-provider" , "secret name of cloud config" )
50
- cloudConfigSecretNamespace = flag .String ("cloud-config-secret-namespace" , "kube-system" , "secret namespace of cloud config" )
51
- customUserAgent = flag .String ("custom-user-agent" , "" , "custom userAgent" )
52
- userAgentSuffix = flag .String ("user-agent-suffix" , "" , "userAgent suffix" )
53
- allowEmptyCloudConfig = flag .Bool ("allow-empty-cloud-config" , true , "allow running driver without cloud config" )
54
- enableGetVolumeStats = flag .Bool ("enable-get-volume-stats" , false , "allow GET_VOLUME_STATS on agent node" )
55
- appendTimeStampInCacheDir = flag .Bool ("append-timestamp-cache-dir" , false , "append timestamp into cache directory on agent node" )
56
- mountPermissions = flag .Uint64 ("mount-permissions" , 0777 , "mounted folder permissions" )
39
+ endpoint = flag .String ("endpoint" , "unix://tmp/csi.sock" , "CSI endpoint" )
40
+ blobfuseProxyEndpoint = flag .String ("blobfuse-proxy-endpoint" , "unix://tmp/blobfuse-proxy.sock" , "blobfuse-proxy endpoint" )
41
+ nodeID = flag .String ("nodeid" , "" , "node id" )
42
+ version = flag .Bool ("version" , false , "Print the version and exit." )
43
+ metricsAddress = flag .String ("metrics-address" , "0.0.0.0:29634" , "export the metrics" )
44
+ kubeconfig = flag .String ("kubeconfig" , "" , "Absolute path to the kubeconfig file. Required only when running out of cluster." )
45
+ driverName = flag .String ("drivername" , blob .DefaultDriverName , "name of the driver" )
46
+ enableBlobfuseProxy = flag .Bool ("enable-blobfuse-proxy" , false , "using blobfuse proxy for mounts" )
47
+ blobfuseProxyConnTimout = flag .Int ("blobfuse-proxy-connect-timeout" , 5 , "blobfuse proxy connection timeout(seconds)" )
48
+ enableBlobMockMount = flag .Bool ("enable-blob-mock-mount" , false , "enable mock mount(only for testing)" )
49
+ cloudConfigSecretName = flag .String ("cloud-config-secret-name" , "azure-cloud-provider" , "secret name of cloud config" )
50
+ cloudConfigSecretNamespace = flag .String ("cloud-config-secret-namespace" , "kube-system" , "secret namespace of cloud config" )
51
+ customUserAgent = flag .String ("custom-user-agent" , "" , "custom userAgent" )
52
+ userAgentSuffix = flag .String ("user-agent-suffix" , "" , "userAgent suffix" )
53
+ allowEmptyCloudConfig = flag .Bool ("allow-empty-cloud-config" , true , "allow running driver without cloud config" )
54
+ enableGetVolumeStats = flag .Bool ("enable-get-volume-stats" , false , "allow GET_VOLUME_STATS on agent node" )
55
+ appendTimeStampInCacheDir = flag .Bool ("append-timestamp-cache-dir" , false , "append timestamp into cache directory on agent node" )
56
+ mountPermissions = flag .Uint64 ("mount-permissions" , 0777 , "mounted folder permissions" )
57
+ onlyGetKeyFromSecretWithInlineVolume = flag .Bool ("only-get-key-from-secret-with-inline-volume" , true , "only get key from secret with inline volume" )
57
58
)
58
59
59
60
func main () {
@@ -75,20 +76,21 @@ func main() {
75
76
76
77
func handle () {
77
78
driverOptions := blob.DriverOptions {
78
- NodeID : * nodeID ,
79
- DriverName : * driverName ,
80
- CloudConfigSecretName : * cloudConfigSecretName ,
81
- CloudConfigSecretNamespace : * cloudConfigSecretNamespace ,
82
- BlobfuseProxyEndpoint : * blobfuseProxyEndpoint ,
83
- EnableBlobfuseProxy : * enableBlobfuseProxy ,
84
- BlobfuseProxyConnTimout : * blobfuseProxyConnTimout ,
85
- EnableBlobMockMount : * enableBlobMockMount ,
86
- CustomUserAgent : * customUserAgent ,
87
- UserAgentSuffix : * userAgentSuffix ,
88
- AllowEmptyCloudConfig : * allowEmptyCloudConfig ,
89
- EnableGetVolumeStats : * enableGetVolumeStats ,
90
- AppendTimeStampInCacheDir : * appendTimeStampInCacheDir ,
91
- MountPermissions : * mountPermissions ,
79
+ NodeID : * nodeID ,
80
+ DriverName : * driverName ,
81
+ CloudConfigSecretName : * cloudConfigSecretName ,
82
+ CloudConfigSecretNamespace : * cloudConfigSecretNamespace ,
83
+ BlobfuseProxyEndpoint : * blobfuseProxyEndpoint ,
84
+ EnableBlobfuseProxy : * enableBlobfuseProxy ,
85
+ BlobfuseProxyConnTimout : * blobfuseProxyConnTimout ,
86
+ EnableBlobMockMount : * enableBlobMockMount ,
87
+ CustomUserAgent : * customUserAgent ,
88
+ UserAgentSuffix : * userAgentSuffix ,
89
+ AllowEmptyCloudConfig : * allowEmptyCloudConfig ,
90
+ EnableGetVolumeStats : * enableGetVolumeStats ,
91
+ AppendTimeStampInCacheDir : * appendTimeStampInCacheDir ,
92
+ MountPermissions : * mountPermissions ,
93
+ OnlyGetKeyFromSecretWithInlineVolume : * onlyGetKeyFromSecretWithInlineVolume ,
92
94
}
93
95
driver := blob .NewDriver (& driverOptions )
94
96
if driver == nil {
0 commit comments