Bring back the functionality of nodeselectorterms field into the Helm chart

This commit is contained in:
M. Mert Yildiran 2023-06-27 01:32:16 +03:00
parent c07f1851b3
commit a8df589076
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461
5 changed files with 23 additions and 2 deletions

View File

@ -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"`
}

View File

@ -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: {}

View File

@ -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: {}

View File

@ -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:

View File

@ -42,7 +42,7 @@ tap:
packetcapture: libpcap
ignoretainted: false
resourcelabels: {}
nodeSelectorTerms: []
nodeselectorterms: []
ingress:
enabled: false
host: ks.svc.cluster.local