Skip to content

Commit

Permalink
Merge pull request #901 from CecileRobertMichon/boot-diagnostics
Browse files Browse the repository at this point in the history
✨ Enable VM boot diagnostics
  • Loading branch information
k8s-ci-robot authored Sep 1, 2020
2 parents 3386cdd + 0ccb197 commit 3c0b4df
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cloud/services/scalesets/vmss.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ func (s *Service) Reconcile(ctx context.Context) error {
},
},
StorageProfile: storageProfile,
DiagnosticsProfile: &compute.DiagnosticsProfile{
BootDiagnostics: &compute.BootDiagnostics{
Enabled: to.BoolPtr(true),
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfile{
NetworkInterfaceConfigurations: &[]compute.VirtualMachineScaleSetNetworkConfiguration{
{
Expand Down
20 changes: 20 additions & 0 deletions cloud/services/scalesets/vmss_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ func TestReconcileVMSS(t *testing.T) {
},
},
},
DiagnosticsProfile: &compute.DiagnosticsProfile{
BootDiagnostics: &compute.BootDiagnostics{
Enabled: to.BoolPtr(true),
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfile{
NetworkInterfaceConfigurations: &[]compute.VirtualMachineScaleSetNetworkConfiguration{
{
Expand Down Expand Up @@ -453,6 +458,11 @@ func TestReconcileVMSS(t *testing.T) {
},
},
},
DiagnosticsProfile: &compute.DiagnosticsProfile{
BootDiagnostics: &compute.BootDiagnostics{
Enabled: to.BoolPtr(true),
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfile{
NetworkInterfaceConfigurations: &[]compute.VirtualMachineScaleSetNetworkConfiguration{
{
Expand Down Expand Up @@ -580,6 +590,11 @@ func TestReconcileVMSS(t *testing.T) {
},
},
},
DiagnosticsProfile: &compute.DiagnosticsProfile{
BootDiagnostics: &compute.BootDiagnostics{
Enabled: to.BoolPtr(true),
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfile{
NetworkInterfaceConfigurations: &[]compute.VirtualMachineScaleSetNetworkConfiguration{
{
Expand Down Expand Up @@ -660,6 +675,11 @@ func TestReconcileVMSS(t *testing.T) {
DisablePasswordAuthentication: to.BoolPtr(true),
},
},
DiagnosticsProfile: &compute.DiagnosticsProfile{
BootDiagnostics: &compute.BootDiagnostics{
Enabled: to.BoolPtr(true),
},
},
StorageProfile: &compute.VirtualMachineScaleSetUpdateStorageProfile{
ImageReference: &compute.ImageReference{
Publisher: to.StringPtr("fake-publisher"),
Expand Down
5 changes: 5 additions & 0 deletions cloud/services/virtualmachines/virtualmachines.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ func (s *Service) Reconcile(ctx context.Context) error {
Priority: priority,
EvictionPolicy: evictionPolicy,
BillingProfile: billingProfile,
DiagnosticsProfile: &compute.DiagnosticsProfile{
BootDiagnostics: &compute.BootDiagnostics{
Enabled: to.BoolPtr(true),
},
},
},
}

Expand Down
10 changes: 10 additions & 0 deletions cloud/services/virtualmachines/virtualmachines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,11 @@ func TestReconcileVM(t *testing.T) {
},
},
},
DiagnosticsProfile: &compute.DiagnosticsProfile{
BootDiagnostics: &compute.BootDiagnostics{
Enabled: to.BoolPtr(true),
},
},
NetworkProfile: &compute.NetworkProfile{
NetworkInterfaces: &[]compute.NetworkInterfaceReference{
{
Expand Down Expand Up @@ -1013,6 +1018,11 @@ func TestReconcileVM(t *testing.T) {
},
},
},
DiagnosticsProfile: &compute.DiagnosticsProfile{
BootDiagnostics: &compute.BootDiagnostics{
Enabled: to.BoolPtr(true),
},
},
OsProfile: &compute.OSProfile{
ComputerName: to.StringPtr("my-vm"),
AdminUsername: to.StringPtr("capi"),
Expand Down

0 comments on commit 3c0b4df

Please sign in to comment.