From 5efb48f0c538b9546b33ef81ac2a083769a3e9e1 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Tue, 27 Jun 2023 00:15:04 +0300 Subject: [PATCH] :rewind: Bring back the functionality of `ignoretainted` field into the Helm chart --- config/configStructs/tapConfig.go | 4 ++-- helm-chart/templates/04-hub-pod.yaml | 2 ++ helm-chart/templates/06-front-pod.yaml | 2 ++ helm-chart/templates/09-worker-daemon-set.yaml | 2 ++ helm-chart/values.yaml | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config/configStructs/tapConfig.go b/config/configStructs/tapConfig.go index 901d56ab2..3c58fb5d4 100644 --- a/config/configStructs/tapConfig.go +++ b/config/configStructs/tapConfig.go @@ -25,7 +25,7 @@ const ( PcapLabel = "pcap" ServiceMeshLabel = "servicemesh" TlsLabel = "tls" - IgnoreTaintedLabel = "ignoreTainted" + IgnoreTaintedLabel = "ignoretainted" IngressEnabledLabel = "ingress-enabled" DebugLabel = "debug" ContainerPort = 80 @@ -107,7 +107,7 @@ type TapConfig struct { ServiceMesh bool `yaml:"servicemesh" json:"servicemesh" default:"true"` Tls bool `yaml:"tls" json:"tls" default:"true"` PacketCapture string `yaml:"packetcapture" json:"packetcapture" default:"libpcap"` - IgnoreTainted bool `yaml:"ignoreTainted" json:"ignoreTainted" default:"false"` + 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:"[]"` Ingress IngressConfig `yaml:"ingress" json:"ingress"` diff --git a/helm-chart/templates/04-hub-pod.yaml b/helm-chart/templates/04-hub-pod.yaml index a0cb323a9..c0a423bf6 100644 --- a/helm-chart/templates/04-hub-pod.yaml +++ b/helm-chart/templates/04-hub-pod.yaml @@ -45,6 +45,8 @@ spec: tolerations: - effect: NoExecute operator: Exists +{{- if not .Values.tap.ignoretainted }} - effect: NoSchedule operator: Exists +{{- end }} status: {} diff --git a/helm-chart/templates/06-front-pod.yaml b/helm-chart/templates/06-front-pod.yaml index 974c7d1d6..e38ba95bd 100644 --- a/helm-chart/templates/06-front-pod.yaml +++ b/helm-chart/templates/06-front-pod.yaml @@ -44,6 +44,8 @@ spec: tolerations: - effect: NoExecute operator: Exists +{{- if not .Values.tap.ignoretainted }} - effect: NoSchedule operator: Exists +{{- end }} status: {} diff --git a/helm-chart/templates/09-worker-daemon-set.yaml b/helm-chart/templates/09-worker-daemon-set.yaml index 97eb692fb..cfc6a21c2 100644 --- a/helm-chart/templates/09-worker-daemon-set.yaml +++ b/helm-chart/templates/09-worker-daemon-set.yaml @@ -80,8 +80,10 @@ spec: tolerations: - effect: NoExecute operator: Exists +{{- if not .Values.tap.ignoretainted }} - effect: NoSchedule operator: Exists +{{- end }} volumes: - hostPath: path: /proc diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index e8f660c02..544c38a24 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -40,7 +40,7 @@ tap: servicemesh: true tls: true packetcapture: libpcap - ignoreTainted: false + ignoretainted: false resourceLabels: {} nodeSelectorTerms: [] ingress: