Skip to content

Commit a00e876

Browse files
authored
Merge pull request #1358 from shysank/azure_json_backwards_compatible
πŸ› Make cloud config secret key backward compatible
2 parents 71211a6 + e5358b8 commit a00e876

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)