1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +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,6 +204,8 @@ func GenerateMachines(clusterID, resourceGroup, subscriptionID string, session *
}
if in.Platform.CloudName == aztypes.StackCloud {
// 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,
@@ -213,6 +215,7 @@ func GenerateMachines(clusterID, resourceGroup, subscriptionID string, session *
},
}
}
}
azureMachine.SetGroupVersionKind(capz.GroupVersion.WithKind("AzureMachine"))
result = append(result, &asset.RuntimeFile{
@@ -278,6 +281,8 @@ func GenerateMachines(clusterID, resourceGroup, subscriptionID string, session *
}
if in.Platform.CloudName == aztypes.StackCloud {
// 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,
@@ -287,6 +292,7 @@ func GenerateMachines(clusterID, resourceGroup, subscriptionID string, session *
},
}
}
}
bootstrapAzureMachine.SetGroupVersionKind(capz.GroupVersion.WithKind("AzureMachine"))