Skip to content

Commit 03ca46a

Browse files
committed
Fix default-datastore bug in cloud conf
This patch fixes an issue with the way the cloud provider configuration's workspace datastore was being processed.
1 parent e178e48 commit 03ca46a

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

config/crds/vsphere_v1alpha1_vsphereclusterproviderspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ spec:
134134
datacenter:
135135
description: Datacenter is the datacenter in which VMs are created/located.
136136
type: string
137-
defaultDatastore:
137+
datastore:
138138
description: Datastore is the datastore in which VMs are created/located.
139139
type: string
140140
folder:

pkg/apis/vsphere/v1alpha1/cloud/encoding_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ var twoWayCodecTestCases = []codecTestCase{
5454
server = 0.0.0.0
5555
datacenter = us-west
5656
folder = kubernetes
57+
default-datastore = default
5758
`,
5859
configObj: cloud.Config{
5960
Global: cloud.GlobalConfig{
@@ -68,6 +69,7 @@ var twoWayCodecTestCases = []codecTestCase{
6869
Server: "0.0.0.0",
6970
Datacenter: "us-west",
7071
Folder: "kubernetes",
72+
Datastore: "default",
7173
},
7274
},
7375
},

pkg/apis/vsphere/v1alpha1/cloud/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ type WorkspaceConfig struct {
179179

180180
// Datastore is the datastore in which VMs are created/located.
181181
// +optional
182-
Datastore string `gcfg:"default-datastore,omitempty" json:"defaultDatastore,omitempty"`
182+
Datastore string `gcfg:"default-datastore,omitempty" json:"datastore,omitempty"`
183183

184184
// ResourcePool is the resource pool in which VMs are created/located.
185185
// +optional

scripts/e2e/bootstrap_job/spec/cluster.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ spec:
2020
global:
2121
secretName: "cloud-provider-vsphere-credentials"
2222
secretNamespace: "kube-system"
23+
insecure: true
2324
virtualCenter:
2425
"$VSPHERE_SERVER":
2526
network:

scripts/e2e/bootstrap_job/spec/provider-components.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ spec:
141141
datacenter:
142142
description: Datacenter is the datacenter in which VMs are created/located.
143143
type: string
144-
defaultDatastore:
144+
datastore:
145145
description: Datastore is the datastore in which VMs are created/located.
146146
type: string
147147
folder:

0 commit comments

Comments
 (0)