From 8cd224da93af7347831581633de880134a73ae37 Mon Sep 17 00:00:00 2001 From: garciaale Date: Mon, 25 Jan 2021 18:53:39 +0000 Subject: [PATCH 1/2] Fixes affinity location Signed-off-by: garciaale --- .../snmpexporter/templates/deployment.yaml | 19 ++++++++++--------- snmp_ee_vnf/snmp_ee_vnfd.yaml | 1 - 2 files changed, 10 insertions(+), 10 deletions(-) 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 f9920ea6..be0692bf 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/snmp_ee_vnfd.yaml b/snmp_ee_vnf/snmp_ee_vnfd.yaml index 5bb273a4..11354a8b 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 -- GitLab From f28b3b9155039fce25f706bb2e1a7bf32c5c5ae6 Mon Sep 17 00:00:00 2001 From: garciaale Date: Tue, 26 Jan 2021 21:24:41 +0000 Subject: [PATCH 2/2] Fixes vnf label in statefulset Signed-off-by: garciaale --- snmp_ee_vnf/helm-charts/eechart/templates/statefulset.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/snmp_ee_vnf/helm-charts/eechart/templates/statefulset.yaml b/snmp_ee_vnf/helm-charts/eechart/templates/statefulset.yaml index dbde1114..c188ad1d 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 -- GitLab