From ddc1dc3d71510866440d0bf7d24afbaa1ae54889 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Mon, 15 Jan 2024 23:00:31 +0300 Subject: [PATCH] :hammer: Add `TcpStreamChannelTimeoutMs` field to `TapConfig` struct --- config/configStructs/tapConfig.go | 61 ++++++++++--------- .../templates/09-worker-daemon-set.yaml | 2 + helm-chart/values.yaml | 1 + manifests/complete.yaml | 2 + 4 files changed, 36 insertions(+), 30 deletions(-) diff --git a/config/configStructs/tapConfig.go b/config/configStructs/tapConfig.go index 6ed2cd21d..50ef1e317 100644 --- a/config/configStructs/tapConfig.go +++ b/config/configStructs/tapConfig.go @@ -125,36 +125,37 @@ type MetricsConfig struct { } type TapConfig struct { - Docker DockerConfig `yaml:"docker" json:"docker"` - Proxy ProxyConfig `yaml:"proxy" json:"proxy"` - PodRegexStr string `yaml:"regex" json:"regex" default:".*"` - Namespaces []string `yaml:"namespaces" json:"namespaces" default:"[]"` - Release ReleaseConfig `yaml:"release" json:"release"` - PersistentStorage bool `yaml:"persistentStorage" json:"persistentStorage" default:"false"` - PersistentStorageStatic bool `yaml:"persistentStorageStatic" json:"persistentStorageStatic" default:"false"` - EfsFileSytemIdAndPath string `yaml:"efsFileSytemIdAndPath" json:"efsFileSytemIdAndPath" default:""` - StorageLimit string `yaml:"storageLimit" json:"storageLimit" default:"500Mi"` - StorageClass string `yaml:"storageClass" json:"storageClass" default:"standard"` - DryRun bool `yaml:"dryRun" json:"dryRun" default:"false"` - Resources ResourcesConfig `yaml:"resources" json:"resources"` - ServiceMesh bool `yaml:"serviceMesh" json:"serviceMesh" default:"true"` - Tls bool `yaml:"tls" json:"tls" default:"true"` - IgnoreTainted bool `yaml:"ignoreTainted" json:"ignoreTainted" default:"false"` - Labels map[string]string `yaml:"labels" json:"labels" default:"{}"` - Annotations map[string]string `yaml:"annotations" json:"annotations" default:"{}"` - NodeSelectorTerms []v1.NodeSelectorTerm `yaml:"nodeSelectorTerms" json:"nodeSelectorTerms" default:"[]"` - Auth AuthConfig `yaml:"auth" json:"auth"` - Ingress IngressConfig `yaml:"ingress" json:"ingress"` - IPv6 bool `yaml:"ipv6" json:"ipv6" default:"true"` - Debug bool `yaml:"debug" json:"debug" default:"false"` - KernelModule KernelModuleConfig `yaml:"kernelModule" json:"kernelModule"` - Telemetry TelemetryConfig `yaml:"telemetry" json:"telemetry"` - DefaultFilter string `yaml:"defaultFilter" json:"defaultFilter"` - ReplayDisabled bool `yaml:"replayDisabled" json:"replayDisabled" default:"false"` - Capabilities CapabilitiesConfig `yaml:"capabilities" json:"capabilities"` - GlobalFilter string `yaml:"globalFilter" json:"globalFilter"` - Metrics MetricsConfig `yaml:"metrics" json:"metrics"` - TrafficSampleRate int `yaml:"trafficSampleRate" json:"trafficSampleRate" default:"100"` + Docker DockerConfig `yaml:"docker" json:"docker"` + Proxy ProxyConfig `yaml:"proxy" json:"proxy"` + PodRegexStr string `yaml:"regex" json:"regex" default:".*"` + Namespaces []string `yaml:"namespaces" json:"namespaces" default:"[]"` + Release ReleaseConfig `yaml:"release" json:"release"` + PersistentStorage bool `yaml:"persistentStorage" json:"persistentStorage" default:"false"` + PersistentStorageStatic bool `yaml:"persistentStorageStatic" json:"persistentStorageStatic" default:"false"` + EfsFileSytemIdAndPath string `yaml:"efsFileSytemIdAndPath" json:"efsFileSytemIdAndPath" default:""` + StorageLimit string `yaml:"storageLimit" json:"storageLimit" default:"500Mi"` + StorageClass string `yaml:"storageClass" json:"storageClass" default:"standard"` + DryRun bool `yaml:"dryRun" json:"dryRun" default:"false"` + Resources ResourcesConfig `yaml:"resources" json:"resources"` + ServiceMesh bool `yaml:"serviceMesh" json:"serviceMesh" default:"true"` + Tls bool `yaml:"tls" json:"tls" default:"true"` + IgnoreTainted bool `yaml:"ignoreTainted" json:"ignoreTainted" default:"false"` + Labels map[string]string `yaml:"labels" json:"labels" default:"{}"` + Annotations map[string]string `yaml:"annotations" json:"annotations" default:"{}"` + NodeSelectorTerms []v1.NodeSelectorTerm `yaml:"nodeSelectorTerms" json:"nodeSelectorTerms" default:"[]"` + Auth AuthConfig `yaml:"auth" json:"auth"` + Ingress IngressConfig `yaml:"ingress" json:"ingress"` + IPv6 bool `yaml:"ipv6" json:"ipv6" default:"true"` + Debug bool `yaml:"debug" json:"debug" default:"false"` + KernelModule KernelModuleConfig `yaml:"kernelModule" json:"kernelModule"` + Telemetry TelemetryConfig `yaml:"telemetry" json:"telemetry"` + DefaultFilter string `yaml:"defaultFilter" json:"defaultFilter"` + ReplayDisabled bool `yaml:"replayDisabled" json:"replayDisabled" default:"false"` + Capabilities CapabilitiesConfig `yaml:"capabilities" json:"capabilities"` + GlobalFilter string `yaml:"globalFilter" json:"globalFilter"` + Metrics MetricsConfig `yaml:"metrics" json:"metrics"` + TrafficSampleRate int `yaml:"trafficSampleRate" json:"trafficSampleRate" default:"100"` + TcpStreamChannelTimeoutMs int `yaml:"tcpStreamChannelTimeoutMs" json:"tcpStreamChannelTimeoutMs" default:"10000"` } func (config *TapConfig) PodRegex() *regexp.Regexp { diff --git a/helm-chart/templates/09-worker-daemon-set.yaml b/helm-chart/templates/09-worker-daemon-set.yaml index 424447753..474fe8242 100644 --- a/helm-chart/templates/09-worker-daemon-set.yaml +++ b/helm-chart/templates/09-worker-daemon-set.yaml @@ -78,6 +78,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: TCP_STREAM_CHANNEL_TIMEOUT_MS + value: '{{ .Values.tap.tcpStreamChannelTimeoutMs }}' resources: limits: cpu: {{ .Values.tap.resources.sniffer.limits.cpu }} diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 7a2034483..258ad4a5e 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -98,6 +98,7 @@ tap: metrics: port: 49100 trafficSampleRate: 100 + tcpStreamChannelTimeoutMs: 10000 logs: file: "" kube: diff --git a/manifests/complete.yaml b/manifests/complete.yaml index 026ed8508..42ca2539b 100644 --- a/manifests/complete.yaml +++ b/manifests/complete.yaml @@ -350,6 +350,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: TCP_STREAM_CHANNEL_TIMEOUT_MS + value: '10000' resources: limits: cpu: 750m