From 219a7eab4129b3e500bcaf6c62819011580895ba Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Mon, 24 Feb 2020 12:42:24 +0800 Subject: Add nodeaffinity for cFW pods Change-Id: I31077bbaff99f7ffc2c13abd5899afd05cf560f9 Issue-ID: MULTICLOUD-999 Signed-off-by: Bin Yang --- starlingx/demo/firewall-sriov/templates/deployment.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'starlingx/demo/firewall-sriov/templates/deployment.yaml') diff --git a/starlingx/demo/firewall-sriov/templates/deployment.yaml b/starlingx/demo/firewall-sriov/templates/deployment.yaml index 90677163..d4b59573 100644 --- a/starlingx/demo/firewall-sriov/templates/deployment.yaml +++ b/starlingx/demo/firewall-sriov/templates/deployment.yaml @@ -25,6 +25,19 @@ spec: "interface": "veth21" } ]' spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + {{- range .Values.global.nodeAffinity }} + - key: {{ .label.labelkey }} + operator: {{ .label.op }} + values: + {{- range .label.labelvalues }} + - {{ . }} + {{- end }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -48,6 +61,10 @@ spec: value: "{{.Values.global.unprotectedNetProviderDriver}}" - name: protectedNetProviderDriver value: "{{.Values.global.protectedNetProviderDriver}}" + - name: unprotectedNetProviderVlan + value: "{{.Values.global.unprotectedNetProviderVlan}}" + - name: protectedNetProviderVlan + value: "{{.Values.global.protectedNetProviderVlan}}" command: ["/bin/bash", "/opt/vfw_start.sh"] securityContext: privileged: true -- cgit 1.2.3-korg