From 10617ae64f6280333585a65f9727c9b03e7ab616 Mon Sep 17 00:00:00 2001 From: bravof Date: Wed, 12 May 2021 11:55:33 -0400 Subject: [PATCH] bugfix(setcomm): affinity for snmp exporter and vnf label for chart statefulset --- .../charts/snmpexporter/templates/deployment.yaml | 10 ++++++++++ .../helm-charts/eechart/templates/statefulset.yaml | 1 + 2 files changed, 11 insertions(+) diff --git a/snmp_setcomm_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml b/snmp_setcomm_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml index 5aef90fe..314b87f5 100644 --- a/snmp_setcomm_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml +++ b/snmp_setcomm_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml @@ -14,6 +14,16 @@ spec: labels: {{- include "snmpexporter.selectorLabels" . | nindent 8 }} spec: + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: vnf + operator: In + values: + - {{ .Values.global.osm.vnf_id | lower}} + topologyKey: "kubernetes.io/hostname" securityContext: runAsUser: 0 initContainers: diff --git a/snmp_setcomm_ee_vnf/helm-charts/eechart/templates/statefulset.yaml b/snmp_setcomm_ee_vnf/helm-charts/eechart/templates/statefulset.yaml index 1868dd86..7a2f8463 100755 --- a/snmp_setcomm_ee_vnf/helm-charts/eechart/templates/statefulset.yaml +++ b/snmp_setcomm_ee_vnf/helm-charts/eechart/templates/statefulset.yaml @@ -16,6 +16,7 @@ spec: labels: app.kubernetes.io/name: {{ include "eechart.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} + vnf: {{ .Values.global.osm.vnf_id | lower}} spec: imagePullSecrets: - name: regcred -- GitLab