@@ -20,12 +20,10 @@ import (
2020var (
2121 endpoint string
2222 cloudConfig string
23- additionalTopologies map [string ]string
2423 cluster string
2524 httpEndpoint string
2625 provideControllerService bool
2726 provideNodeService bool
28- withTopology bool
2927)
3028
3129func main () {
@@ -65,12 +63,6 @@ func main() {
6563
6664 cmd .Flags ().StringVar (& cloudConfig , "cloud-config" , "" , "CSI driver cloud config. This option can be given multiple times" )
6765
68- cmd .PersistentFlags ().BoolVar (& withTopology , "with-topology" , true , "cluster is topology-aware" )
69-
70- cmd .PersistentFlags ().StringToStringVar (& additionalTopologies , "additional-topology" , map [string ]string {},
71- "Additional CSI driver topology keys, for example topology.kubernetes.io/region=REGION1." +
72- "This option can be specified multiple times to add multiple additional topology keys." )
73-
7466 cmd .PersistentFlags ().StringVar (& cluster , "cluster" , "" , "The identifier of the cluster that the plugin is running in." )
7567 cmd .PersistentFlags ().StringVar (& httpEndpoint , "http-endpoint" , "" ,
7668 "The TCP network address where the HTTP server for providing metrics for diagnostics, will listen (example: `:8080`)." +
@@ -90,20 +82,19 @@ func main() {
9082func handle () {
9183 // Initialize cloud
9284 d := blockstorage .NewDriver (& blockstorage.DriverOpts {
93- Endpoint : endpoint ,
94- ClusterID : cluster ,
95- PVCLister : csi .GetPVCLister (),
96- WithTopology : withTopology ,
85+ Endpoint : endpoint ,
86+ ClusterID : cluster ,
87+ PVCLister : csi .GetPVCLister (),
9788 })
9889
9990 if provideControllerService {
10091 var err error
101- cfg , err := stackit .GetConfigForFile (cloudConfig )
92+ cfg , err := stackit .GetConfigFromFile (cloudConfig )
10293 if err != nil {
10394 klog .Fatal (err )
10495 }
10596
106- iaasClient , err := stackit .CreateIAASClient (& cfg )
97+ iaasClient , err := stackit .CreateIaaSClient (& cfg )
10798 if err != nil {
10899 klog .Fatalf ("Failed to create IaaS client: %v" , err )
109100 }
@@ -120,15 +111,15 @@ func handle() {
120111 // Initialize mount
121112 mountProvider := mount .GetMountProvider ()
122113
123- cfg , err := stackit .GetConfigForFile (cloudConfig )
114+ cfg , err := stackit .GetConfigFromFile (cloudConfig )
124115 if err != nil {
125116 klog .Fatal (err )
126117 }
127118
128119 // Initialize Metadata
129120 metadataProvider := metadata .GetMetadataProvider (fmt .Sprintf ("%s,%s" , metadata .MetadataID , metadata .ConfigDriveID ))
130121
131- d .SetupNodeService (mountProvider , metadataProvider , cfg .BlockStorage , additionalTopologies )
122+ d .SetupNodeService (mountProvider , metadataProvider , cfg .BlockStorage )
132123 }
133124
134125 d .Run ()
0 commit comments