VOL-3074: Create node affinity for openolt adapter image

Change-Id: I168ac28aacebb02cc0b4a8e95e78cbc29a13422b
diff --git a/voltha-adapter-openolt/Chart.yaml b/voltha-adapter-openolt/Chart.yaml
index dfa74a4..2725604 100644
--- a/voltha-adapter-openolt/Chart.yaml
+++ b/voltha-adapter-openolt/Chart.yaml
@@ -14,7 +14,7 @@
 ---
 apiVersion: "v1"
 name: "voltha-adapter-openolt"
-version: 2.4.6
+version: 2.4.7
 description: "A Helm chart for Voltha OpenOLT Adapter"
 keywords:
   - "onf"
diff --git a/voltha-adapter-openolt/templates/openolt-deploy.yaml b/voltha-adapter-openolt/templates/openolt-deploy.yaml
index 4cb5ffc..41ba36f 100644
--- a/voltha-adapter-openolt/templates/openolt-deploy.yaml
+++ b/voltha-adapter-openolt/templates/openolt-deploy.yaml
@@ -65,6 +65,17 @@
         runAsGroup: {{ .Values.securityContext.runAsGroup }}
         fsGroup: {{ .Values.securityContext.fsGroup }}
       {{- end }}
+      {{- if .Values.nodeAffinityConfig.enabled }}
+      affinity:
+        nodeAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            nodeSelectorTerms:
+            - matchExpressions:
+              - key: "{{ .Values.nodeAffinityConfig.node_label_key }}"
+                operator: In
+                values:
+                - "{{ .Values.nodeAffinityConfig.node_label_value }}"
+      {{- end }}
       containers:
         - name: adapter-open-olt
           image: '{{ tpl .Values.images.adapter_open_olt.registry . }}{{ tpl .Values.images.adapter_open_olt.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_olt.tag . ) . }}'
diff --git a/voltha-adapter-openolt/values.yaml b/voltha-adapter-openolt/values.yaml
index 7719a0c..1d027d7 100644
--- a/voltha-adapter-openolt/values.yaml
+++ b/voltha-adapter-openolt/values.yaml
@@ -38,6 +38,12 @@
   runAsUser: 1001
   runAsGroup: 1001
 
+# Node Affinity Configuration
+nodeAffinityConfig:
+  enabled: false
+  node_label_key: "in-band"
+  node_label_value: "yes"
+
 # Define connectivity to required services
 services:
   kafka: