1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00

Check whether the user has explicitly configured bootDiagnostics in the mpool's bootDiagnostics field. If not configured, the Azure Stack Hub default is applied

This commit is contained in:
Gaoyun
2026-01-16 00:42:21 +00:00
parent 15d1d85a87
commit e7bd4cae84

View File

@@ -204,13 +204,16 @@ func GenerateMachines(clusterID, resourceGroup, subscriptionID string, session *
}
if in.Platform.CloudName == aztypes.StackCloud {
azureMachine.Spec.Diagnostics = &capz.Diagnostics{
Boot: &capz.BootDiagnostics{
StorageAccountType: capz.UserManagedDiagnosticsStorage,
UserManaged: &capz.UserManagedBootDiagnostics{
StorageAccountURI: fmt.Sprintf("https://%s.blob.%s", storageAccountName, in.StorageSuffix),
// For Azure Stack Cloud, apply default diagnostics only if user hasn't specified bootDiagnostics
if mpool.BootDiagnostics == nil {
azureMachine.Spec.Diagnostics = &capz.Diagnostics{
Boot: &capz.BootDiagnostics{
StorageAccountType: capz.UserManagedDiagnosticsStorage,
UserManaged: &capz.UserManagedBootDiagnostics{
StorageAccountURI: fmt.Sprintf("https://%s.blob.%s", storageAccountName, in.StorageSuffix),
},
},
},
}
}
}
@@ -278,13 +281,16 @@ func GenerateMachines(clusterID, resourceGroup, subscriptionID string, session *
}
if in.Platform.CloudName == aztypes.StackCloud {
bootstrapAzureMachine.Spec.Diagnostics = &capz.Diagnostics{
Boot: &capz.BootDiagnostics{
StorageAccountType: capz.UserManagedDiagnosticsStorage,
UserManaged: &capz.UserManagedBootDiagnostics{
StorageAccountURI: fmt.Sprintf("https://%s.blob.%s", storageAccountName, in.StorageSuffix),
// For Azure Stack Cloud, apply default diagnostics only if user hasn't specified bootDiagnostics
if mpool.BootDiagnostics == nil {
bootstrapAzureMachine.Spec.Diagnostics = &capz.Diagnostics{
Boot: &capz.BootDiagnostics{
StorageAccountType: capz.UserManagedDiagnosticsStorage,
UserManaged: &capz.UserManagedBootDiagnostics{
StorageAccountURI: fmt.Sprintf("https://%s.blob.%s", storageAccountName, in.StorageSuffix),
},
},
},
}
}
}