diff --git a/snmp_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml b/snmp_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml index 5aef90febced06d2c3b57c4c07d7a1b9281fb269..f9920ea6f92ebb0581d5bc575fa84b72b0cdfac3 100644 --- a/snmp_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml +++ b/snmp_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml @@ -3,12 +3,21 @@ kind: Deployment metadata: name: {{ include "snmpexporter.fullname" . }} labels: - {{- include "snmpexporter.labels" . | nindent 4 }} + vnf: {{ .Values.global.osm.vnf_id | lower}} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "snmpexporter.selectorLabels" . | nindent 6 }} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: vnf + operator: In + values: + - {{ .Values.global.osm.vnf_id | lower}} template: metadata: labels: diff --git a/snmp_ee_vnf/helm-charts/eechart/templates/statefulset.yaml b/snmp_ee_vnf/helm-charts/eechart/templates/statefulset.yaml index 1868dd86fb480df75f76427c9211475d816ca855..dbde1114a843216dd876b220c654c4151012b8a4 100755 --- a/snmp_ee_vnf/helm-charts/eechart/templates/statefulset.yaml +++ b/snmp_ee_vnf/helm-charts/eechart/templates/statefulset.yaml @@ -3,7 +3,7 @@ kind: StatefulSet metadata: name: {{ include "eechart.fullname" . }} labels: -{{ include "eechart.labels" . | indent 4 }} + vnf: {{ .Values.global.osm.vnf_id | lower}} spec: serviceName: {{ include "eechart.fullname" . }} replicas: {{ .Values.replicaCount }}