From cb08b66efb55545a1e98139508aac15f4c6c1af3 Mon Sep 17 00:00:00 2001
From: "Dzmitry_Paulouski (slb)"
 <504-Paulouski@users.noreply.community.opengroup.org>
Date: Thu, 2 Sep 2021 07:40:06 +0000
Subject: [PATCH] Add node selector

---
 devops/azure/chart/helm-config.yaml          | 2 ++
 devops/azure/chart/templates/deployment.yaml | 4 ++++
 devops/azure/chart/values.yaml               | 4 +++-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/devops/azure/chart/helm-config.yaml b/devops/azure/chart/helm-config.yaml
index 9323d6f1a..9d27a76c9 100644
--- a/devops/azure/chart/helm-config.yaml
+++ b/devops/azure/chart/helm-config.yaml
@@ -17,6 +17,8 @@ global:
 
   # Service(s) Replica Count
   replicaCount: 1
+  nodepool: services
+  isAutoscalingEnabled: false
 
 ################################################################################
 # Specify the Gitlab branch being used for image creation
diff --git a/devops/azure/chart/templates/deployment.yaml b/devops/azure/chart/templates/deployment.yaml
index 4651e38c7..a6f9651b7 100644
--- a/devops/azure/chart/templates/deployment.yaml
+++ b/devops/azure/chart/templates/deployment.yaml
@@ -28,6 +28,10 @@ spec:
         app: {{ .Chart.Name }}
         aadpodidbinding: osdu-identity
     spec:
+{{- if .Values.global.isAutoscalingEnabled }}
+      nodeSelector:
+        nodepool: {{ .Values.global.nodepool }}
+{{- end }}
       volumes:
         - name: azure-keyvault
           csi:
diff --git a/devops/azure/chart/values.yaml b/devops/azure/chart/values.yaml
index d503dd73d..67b358725 100644
--- a/devops/azure/chart/values.yaml
+++ b/devops/azure/chart/values.yaml
@@ -14,8 +14,10 @@
 
 global:
   replicaCount: 1
+  nodepool: services
+  isAutoscalingEnabled: false
 
 image:
   repository: community.opengroup.org:5555/osdu/platform/system/notification
   branch: master
-  tag: latest
\ No newline at end of file
+  tag: latest
-- 
GitLab