From 14113787dd0f78701e489f0df90a07cb980ae0c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Prokopi=C4=87?= Date: Thu, 11 Feb 2021 15:45:56 +0100 Subject: [PATCH] Set OsType Linux in ManagedClusterAgentPoolProfileProperties --- cloud/services/agentpools/agentpools.go | 2 ++ cloud/services/agentpools/agentpools_test.go | 1 + 2 files changed, 3 insertions(+) diff --git a/cloud/services/agentpools/agentpools.go b/cloud/services/agentpools/agentpools.go index c3dd6c85d4a..736b314fb90 100644 --- a/cloud/services/agentpools/agentpools.go +++ b/cloud/services/agentpools/agentpools.go @@ -53,6 +53,7 @@ func (s *Service) Reconcile(ctx context.Context, spec interface{}) error { profile := containerservice.AgentPool{ ManagedClusterAgentPoolProfileProperties: &containerservice.ManagedClusterAgentPoolProfileProperties{ VMSize: containerservice.VMSizeTypes(agentPoolSpec.SKU), + OsType: containerservice.Linux, OsDiskSizeGB: &agentPoolSpec.OSDiskSizeGB, Count: &agentPoolSpec.Replicas, Type: containerservice.VirtualMachineScaleSets, @@ -87,6 +88,7 @@ func (s *Service) Reconcile(ctx context.Context, spec interface{}) error { existingProfile := containerservice.AgentPool{ ManagedClusterAgentPoolProfileProperties: &containerservice.ManagedClusterAgentPoolProfileProperties{ VMSize: existingPool.ManagedClusterAgentPoolProfileProperties.VMSize, + OsType: containerservice.Linux, OsDiskSizeGB: existingPool.ManagedClusterAgentPoolProfileProperties.OsDiskSizeGB, Count: existingPool.ManagedClusterAgentPoolProfileProperties.Count, Type: containerservice.VirtualMachineScaleSets, diff --git a/cloud/services/agentpools/agentpools_test.go b/cloud/services/agentpools/agentpools_test.go index cb99f6ce71f..14ab066de89 100644 --- a/cloud/services/agentpools/agentpools_test.go +++ b/cloud/services/agentpools/agentpools_test.go @@ -243,6 +243,7 @@ func TestReconcile(t *testing.T) { Count: to.Int32Ptr(2), OsDiskSizeGB: to.Int32Ptr(100), VMSize: containerservice.VMSizeTypesStandardD2sV3, + OsType: containerservice.Linux, OrchestratorVersion: to.StringPtr("9.99.9999"), ProvisioningState: to.StringPtr("Succeeded"), VnetSubnetID: to.StringPtr(""),