mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-12 12:49:57 +00:00
✨ Add trafficSampleRate
field to TapConfig
This commit is contained in:
@@ -159,6 +159,7 @@ type TapConfig struct {
|
||||
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"`
|
||||
}
|
||||
|
||||
func (config *TapConfig) PodRegex() *regexp.Regexp {
|
||||
|
@@ -17,3 +17,4 @@ data:
|
||||
TELEMETRY_DISABLED: '{{ not .Values.tap.telemetry.enabled | ternary "true" "" }}'
|
||||
REPLAY_DISABLED: '{{ .Values.tap.replayDisabled | ternary "true" "" }}'
|
||||
GLOBAL_FILTER: '{{ .Values.tap.globalFilter }}'
|
||||
TRAFFIC_SAMPLE_RATE: '{{ .Values.tap.trafficSampleRate }}'
|
||||
|
@@ -39,8 +39,8 @@ tap:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 50Mi
|
||||
serviceMesh: false
|
||||
tls: false
|
||||
serviceMesh: true
|
||||
tls: true
|
||||
ignoreTainted: false
|
||||
labels: {}
|
||||
annotations: {}
|
||||
@@ -93,6 +93,7 @@ tap:
|
||||
globalFilter: ""
|
||||
metrics:
|
||||
port: 49100
|
||||
trafficSampleRate: 100
|
||||
logs:
|
||||
file: ""
|
||||
kube:
|
||||
|
@@ -102,6 +102,7 @@ data:
|
||||
TELEMETRY_DISABLED: ''
|
||||
REPLAY_DISABLED: ''
|
||||
GLOBAL_FILTER: ''
|
||||
TRAFFIC_SAMPLE_RATE: '100'
|
||||
---
|
||||
# Source: kubeshark/templates/02-cluster-role.yaml
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
@@ -248,6 +249,29 @@ spec:
|
||||
app.kubeshark.co/app: front
|
||||
type: ClusterIP
|
||||
---
|
||||
# Source: kubeshark/templates/16-worker-service-metrics.yaml
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: kubeshark-worker-metrics
|
||||
namespace: default
|
||||
annotations:
|
||||
prometheus.io/scrape: 'true'
|
||||
prometheus.io/port: '49100'
|
||||
spec:
|
||||
selector:
|
||||
app.kubeshark.co/app: worker
|
||||
helm.sh/chart: kubeshark-52.0.0
|
||||
app.kubernetes.io/name: kubeshark
|
||||
app.kubernetes.io/instance: kubeshark
|
||||
app.kubernetes.io/version: "52.0.0"
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
ports:
|
||||
- name: metrics
|
||||
protocol: TCP
|
||||
port: 49100
|
||||
targetPort: 49100
|
||||
---
|
||||
# Source: kubeshark/templates/09-worker-daemon-set.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
@@ -291,12 +315,18 @@ spec:
|
||||
- any
|
||||
- -port
|
||||
- '30001'
|
||||
- -metrics-port
|
||||
- '49100'
|
||||
- -servicemesh
|
||||
- -procfs
|
||||
- /hostproc
|
||||
image: 'docker.io/kubeshark/worker:v52.0.0'
|
||||
imagePullPolicy: Always
|
||||
name: sniffer
|
||||
ports:
|
||||
- containerPort: 49100
|
||||
protocol: TCP
|
||||
name: metrics
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
|
Reference in New Issue
Block a user