diff --git a/config/configStructs/tapConfig.go b/config/configStructs/tapConfig.go index ebf824ff2..0de70742b 100644 --- a/config/configStructs/tapConfig.go +++ b/config/configStructs/tapConfig.go @@ -109,7 +109,7 @@ type TapConfig struct { PacketCapture string `yaml:"packetcapture" json:"packetcapture" default:"libpcap"` IgnoreTainted bool `yaml:"ignoretainted" json:"ignoretainted" default:"false"` ResourceLabels map[string]string `yaml:"resourcelabels" json:"resourcelabels" default:"{}"` - NodeSelectorTerms []v1.NodeSelectorTerm `yaml:"nodeSelectorTerms" json:"nodeSelectorTerms" default:"[]"` + NodeSelectorTerms []v1.NodeSelectorTerm `yaml:"nodeselectorterms" json:"nodeselectorterms" default:"[]"` Ingress IngressConfig `yaml:"ingress" json:"ingress"` Debug bool `yaml:"debug" json:"debug" default:"false"` } diff --git a/helm-chart/templates/04-hub-pod.yaml b/helm-chart/templates/04-hub-pod.yaml index 47b490f2f..1ed6bc123 100644 --- a/helm-chart/templates/04-hub-pod.yaml +++ b/helm-chart/templates/04-hub-pod.yaml @@ -52,4 +52,11 @@ spec: - effect: NoSchedule operator: Exists {{- end }} +{{- if gt (len .Values.tap.nodeselectorterms) 0}} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + {{ .Values.tap.nodeselectorterms | toJson }} +{{- end }} status: {} diff --git a/helm-chart/templates/06-front-pod.yaml b/helm-chart/templates/06-front-pod.yaml index c4544f61d..2f0203678 100644 --- a/helm-chart/templates/06-front-pod.yaml +++ b/helm-chart/templates/06-front-pod.yaml @@ -51,4 +51,11 @@ spec: - effect: NoSchedule operator: Exists {{- end }} +{{- if gt (len .Values.tap.nodeselectorterms) 0}} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + {{ .Values.tap.nodeselectorterms | toJson }} +{{- end }} status: {} diff --git a/helm-chart/templates/09-worker-daemon-set.yaml b/helm-chart/templates/09-worker-daemon-set.yaml index fe719b98f..48f0ae6b2 100644 --- a/helm-chart/templates/09-worker-daemon-set.yaml +++ b/helm-chart/templates/09-worker-daemon-set.yaml @@ -93,6 +93,13 @@ spec: {{- if not .Values.tap.ignoretainted }} - effect: NoSchedule operator: Exists +{{- end }} +{{- if gt (len .Values.tap.nodeselectorterms) 0}} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + {{ .Values.tap.nodeselectorterms | toJson }} {{- end }} volumes: - hostPath: diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 5d62e6910..232c917ae 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -42,7 +42,7 @@ tap: packetcapture: libpcap ignoretainted: false resourcelabels: {} - nodeSelectorTerms: [] + nodeselectorterms: [] ingress: enabled: false host: ks.svc.cluster.local