Commit f4c5ff96 authored by lavado's avatar lavado
Browse files

Merge branch 'fix/affinity_for_snmp_pods' into 'master'

fix(pod affinity): pods now are scheduled into the same node to allow file sharing

See merge request !89
parents 86b4a768 994fef22
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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:
+1 −1
Original line number Diff line number Diff line
@@ -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 }}