Skip to content

Commit e5358b8

Browse files
committed
copy control plane data to azure.json for backwards compatibility
1 parent 71211a6 commit e5358b8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

controllers/helpers.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ func GetCloudProviderSecret(d azure.ClusterScoper, namespace, name string, owner
188188
secret.Data = map[string][]byte{
189189
"control-plane-azure.json": controlPlaneData,
190190
"worker-node-azure.json": workerNodeData,
191+
// added for backwards compatibility
192+
"azure.json": controlPlaneData,
191193
}
192194

193195
return secret, nil

controllers/helpers_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ func TestGetCloudProviderConfig(t *testing.T) {
157157
if diff := cmp.Diff(tc.expectedWorkerNodeConfig, string(cloudConfig.Data["worker-node-azure.json"])); diff != "" {
158158
t.Errorf(diff)
159159
}
160+
if diff := cmp.Diff(tc.expectedControlPlaneConfig, string(cloudConfig.Data["azure.json"])); diff != "" {
161+
t.Errorf(diff)
162+
}
160163
})
161164
}
162165
}

0 commit comments

Comments
 (0)