From 7d72e9be7cf54988ac68cf3b1b93ecb8ec4a554f Mon Sep 17 00:00:00 2001 From: mithun shanbhag Date: Thu, 8 Dec 2022 23:26:35 +0530 Subject: [PATCH 1/6] use networkProfile azure --- iac/createResources.bicep | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iac/createResources.bicep b/iac/createResources.bicep index 2091a13..b3ec79e 100644 --- a/iac/createResources.bicep +++ b/iac/createResources.bicep @@ -1250,6 +1250,9 @@ resource aks 'Microsoft.ContainerService/managedClusters@2022-09-02-preview' = { type: 'SystemAssigned' } properties: { + networkProfile: { + networkPlugin: 'azure' + } dnsPrefix: aksClusterDnsPrefix nodeResourceGroup: aksClusterNodeResourceGroup agentPoolProfiles: [ From 32a9ce86689e499d4a10d739e8c9195714eb3be2 Mon Sep 17 00:00:00 2001 From: mithun shanbhag Date: Fri, 9 Dec 2022 00:35:43 +0530 Subject: [PATCH 2/6] reduce node count --- iac/createResources.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iac/createResources.bicep b/iac/createResources.bicep index b3ec79e..5ed8447 100644 --- a/iac/createResources.bicep +++ b/iac/createResources.bicep @@ -1259,7 +1259,7 @@ resource aks 'Microsoft.ContainerService/managedClusters@2022-09-02-preview' = { { name: 'agentpool' osDiskSizeGB: 0 // Specifying 0 will apply the default disk size for that agentVMSize. - count: 3 + count: 1 vmSize: 'standard_d2s_v3' osType: 'Linux' mode: 'System' From fcaad5b87db9ba702ab40cbc1fee8b3370b8f791 Mon Sep 17 00:00:00 2001 From: mithun shanbhag Date: Fri, 9 Dec 2022 00:36:54 +0530 Subject: [PATCH 3/6] updated deployment manifest --- src/ContosoTraders.Api.Products/Manifests/Deployment.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml b/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml index 2421372..46d14bd 100644 --- a/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml +++ b/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml @@ -13,7 +13,12 @@ spec: app: contoso-traders-products spec: nodeSelector: - "kubernetes.io/os": linux + kubernetes.io/role: agent + beta.kubernetes.io/os: linux + type: virtual-kubelet + tolerations: + - key: virtual-kubelet.io/provider + operator: Exists containers: - name: contoso-traders-products #Note: The '{ENVIRONMENT}' token will be substituted with the value of the ENVIRONMENT github secret by github workflow. From 4aaba5f14b6104b6bfb13e490b9465236dad221d Mon Sep 17 00:00:00 2001 From: mithun shanbhag Date: Fri, 9 Dec 2022 00:58:12 +0530 Subject: [PATCH 4/6] manifest updates --- src/ContosoTraders.Api.Products/Manifests/Deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml b/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml index 46d14bd..fd0c371 100644 --- a/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml +++ b/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml @@ -22,7 +22,7 @@ spec: containers: - name: contoso-traders-products #Note: The '{ENVIRONMENT}' token will be substituted with the value of the ENVIRONMENT github secret by github workflow. - image: contosotradersacr{ENVIRONMENT}.azurecr.io/contosotradersapiproducts:latest + image: contosotradersacrtest.azurecr.io/contosotradersapiproducts:latest env: - name: KeyVaultEndpoint valueFrom: @@ -39,5 +39,5 @@ spec: cpu: 100m memory: 128Mi limits: - cpu: 250m - memory: 256Mi + cpu: 100m + memory: 128Mi From 44474014f351066748776642f9b647ac17cecb8b Mon Sep 17 00:00:00 2001 From: mithun shanbhag Date: Fri, 9 Dec 2022 00:58:41 +0530 Subject: [PATCH 5/6] manifest update --- src/ContosoTraders.Api.Products/Manifests/Deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml b/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml index fd0c371..ee99f09 100644 --- a/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml +++ b/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml @@ -22,7 +22,7 @@ spec: containers: - name: contoso-traders-products #Note: The '{ENVIRONMENT}' token will be substituted with the value of the ENVIRONMENT github secret by github workflow. - image: contosotradersacrtest.azurecr.io/contosotradersapiproducts:latest + image: contosotradersacr{ENVIRONMENT}.azurecr.io/contosotradersapiproducts:latest env: - name: KeyVaultEndpoint valueFrom: From 25ca2daae0f6df7530e57e582c01ff6d36b478d9 Mon Sep 17 00:00:00 2001 From: mithun shanbhag Date: Fri, 9 Dec 2022 01:48:58 +0530 Subject: [PATCH 6/6] update tolerations --- src/ContosoTraders.Api.Products/Manifests/Deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml b/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml index ee99f09..597b849 100644 --- a/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml +++ b/src/ContosoTraders.Api.Products/Manifests/Deployment.yaml @@ -19,6 +19,8 @@ spec: tolerations: - key: virtual-kubelet.io/provider operator: Exists + - key: azure.com/aci + effect: NoSchedule containers: - name: contoso-traders-products #Note: The '{ENVIRONMENT}' token will be substituted with the value of the ENVIRONMENT github secret by github workflow.