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 f9920ea6f92ebb0581d5bc575fa84b72b0cdfac3..be0692bf9b655cf0c613f740091c7b0981439ce6 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 @@ -9,20 +9,21 @@ spec: 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: {{- 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_ee_vnf/helm-charts/eechart/templates/statefulset.yaml b/snmp_ee_vnf/helm-charts/eechart/templates/statefulset.yaml index dbde1114a843216dd876b220c654c4151012b8a4..c188ad1d98bb93247c8fa0ee9132d9494f43e8ff 100755 --- a/snmp_ee_vnf/helm-charts/eechart/templates/statefulset.yaml +++ b/snmp_ee_vnf/helm-charts/eechart/templates/statefulset.yaml @@ -2,8 +2,6 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ include "eechart.fullname" . }} - labels: - vnf: {{ .Values.global.osm.vnf_id | lower}} spec: serviceName: {{ include "eechart.fullname" . }} replicas: {{ .Values.replicaCount }} @@ -16,6 +14,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 diff --git a/snmp_ee_vnf/snmp_ee_vnfd.yaml b/snmp_ee_vnf/snmp_ee_vnfd.yaml index 5bb273a4429f84eee8389217da25291f8f0d1ccd..11354a8b562bb560ac6f17f26b3c2d4a193b3073 100644 --- a/snmp_ee_vnf/snmp_ee_vnfd.yaml +++ b/snmp_ee_vnf/snmp_ee_vnfd.yaml @@ -77,7 +77,6 @@ vnfd: execution-environment-list: - connection-point-ref: vnf-mgmt helm-chart: eechart - helm-version: v2 id: monitor metric-service: snmpexporter id: default-vnf-configuration