Merge remote-tracking branch 'origin/front-pcap-dump-enabled-env' into front-pcap-dump-enabled-env

This commit is contained in:
tiptophelmet
2025-04-16 22:29:29 +03:00
12 changed files with 71 additions and 19 deletions

View File

@@ -210,6 +210,7 @@ Example for overriding image names:
| `tap.metrics.port` | Pod port used to expose Prometheus metrics | `49100` |
| `tap.enabledDissectors` | This is an array of strings representing the list of supported protocols. Remove or comment out redundant protocols (e.g., dns).| The default list excludes: `udp` and `tcp` |
| `tap.mountBpf` | BPF filesystem needs to be mounted for eBPF to work properly. This helm value determines whether Kubeshark will attempt to mount the filesystem. This option is not required if filesystem is already mounts. │ `true`|
| `tap.gitops.enabled` | Enable GitOps functionality. This will allow you to use GitOps to manage your Kubeshark configuration. | `false` |
| `logs.file` | Logs dump path | `""` |
| `pcapdump.enabled` | Enable recording of all traffic captured according to other parameters. Whatever Kubeshark captures, considering pod targeting rules, will be stored in pcap files ready to be viewed by tools | `true` |
| `pcapdump.maxTime` | The time window into the past that will be stored. Older traffic will be discarded. | `2h` |

View File

@@ -33,6 +33,9 @@ spec:
- "8080"
- -loglevel
- '{{ .Values.logLevel | default "warning" }}'
{{- if .Values.tap.gitops.enabled }}
- -gitops
{{- end }}
env:
- name: POD_NAME
valueFrom:

View File

@@ -1,7 +1,7 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: kubeshark-config-map-default
name: {{ include "kubeshark.configmapName" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubeshark.co/app: hub

View File

@@ -1,7 +1,7 @@
kind: Secret
apiVersion: v1
metadata:
name: kubeshark-secret-default
name: {{ include "kubeshark.secretName" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubeshark.co/app: hub

View File

@@ -1,3 +1,4 @@
{{ if .Values.tap.gitops.enabled -}}
apiVersion: batch/v1
kind: Job
metadata:
@@ -19,6 +20,5 @@ spec:
{{ else }}
image: '{{ .Values.tap.docker.registry }}/hub:{{ not (eq .Values.tap.docker.tag "") | ternary .Values.tap.docker.tag (include "kubeshark.defaultVersion" .) }}'
{{- end }}
command: ["/bin/sh", "-c"]
args:
- "kubectl delete cm kubeshark-config-map || true && kubectl delete secret kubeshark-secret || true"
command: ["/app/cleanup"]
{{ end -}}

View File

@@ -49,6 +49,18 @@ Create the name of the service account to use
{{- printf "%s-service-account" .Release.Name }}
{{- end }}
{{/*
Set configmap and secret names based on gitops.enabled
*/}}
{{- define "kubeshark.configmapName" -}}
kubeshark-config-map{{ if .Values.tap.gitops.enabled }}-default{{ end }}
{{- end -}}
{{- define "kubeshark.secretName" -}}
kubeshark-secret{{ if .Values.tap.gitops.enabled }}-default{{ end }}
{{- end -}}
{{/*
Escape double quotes in a string
*/}}

View File

@@ -151,6 +151,8 @@ tap:
enabled: false
watchdog:
enabled: true
gitops:
enabled: false
sentry:
enabled: false
environment: production