diff --git a/config/configStructs/tapConfig.go b/config/configStructs/tapConfig.go index 4f1edb4a4..bc3938cf6 100644 --- a/config/configStructs/tapConfig.go +++ b/config/configStructs/tapConfig.go @@ -310,6 +310,12 @@ type SnapshotsConfig struct { StorageSize string `yaml:"storageSize" json:"storageSize" default:"20Gi"` } +type DelayedDissectionConfig struct { + Image string `yaml:"image" json:"image" default:"kubeshark/worker:master"` + CPU string `yaml:"cpu" json:"cpu" default:"1"` + Memory string `yaml:"memory" json:"memory" default:"2Gi"` +} + type CaptureConfig struct { Stopped bool `yaml:"stopped" json:"stopped" default:"false"` StopAfter string `yaml:"stopAfter" json:"stopAfter" default:"5m"` @@ -325,6 +331,7 @@ type TapConfig struct { ExcludedNamespaces []string `yaml:"excludedNamespaces" json:"excludedNamespaces" default:"[]"` BpfOverride string `yaml:"bpfOverride" json:"bpfOverride" default:""` Capture CaptureConfig `yaml:"capture" json:"capture"` + DelayedDissection DelayedDissectionConfig `yaml:"delayedDissection" json:"delayedDissection"` Snapshots SnapshotsConfig `yaml:"snapshots" json:"snapshots"` Release ReleaseConfig `yaml:"release" json:"release"` PersistentStorage bool `yaml:"persistentStorage" json:"persistentStorage" default:"false"` diff --git a/helm-chart/templates/02-cluster-role.yaml b/helm-chart/templates/02-cluster-role.yaml index 0911c4263..6e610fd9f 100644 --- a/helm-chart/templates/02-cluster-role.yaml +++ b/helm-chart/templates/02-cluster-role.yaml @@ -86,3 +86,9 @@ rules: verbs: - create - get + - apiGroups: + - batch + resources: + - jobs + verbs: + - "*" \ No newline at end of file diff --git a/helm-chart/templates/04-hub-deployment.yaml b/helm-chart/templates/04-hub-deployment.yaml index be2e96e41..9d0febb9a 100644 --- a/helm-chart/templates/04-hub-deployment.yaml +++ b/helm-chart/templates/04-hub-deployment.yaml @@ -40,6 +40,18 @@ spec: - "{{ if hasKey .Values.tap.capture "stopAfter" }}{{ .Values.tap.capture.stopAfter }}{{ else }}5m{{ end }}" - -snapshot-size-limit - '{{ .Values.tap.snapshots.storageSize }}' + {{- if .Values.tap.delayedDissection.image }} + - -dissector-image + - '{{ .Values.tap.delayedDissection.image }}' + {{- end }} + {{- if .Values.tap.delayedDissection.cpu }} + - -dissector-cpu + - '{{ .Values.tap.delayedDissection.cpu }}' + {{- end }} + {{- if .Values.tap.delayedDissection.memory }} + - -dissector-memory + - '{{ .Values.tap.delayedDissection.memory }}' + {{- end }} {{- if .Values.tap.gitops.enabled }} - -gitops {{- end }} diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index ac605ce5e..f30ee7593 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -32,6 +32,10 @@ tap: enabled: true storageSize: 1Gi dbMaxSize: 500Mi + delayedDissection: + image: kubeshark/worker:master + cpu: "1" + memory: 2Gi snapshots: storageClass: "" storageSize: 20Gi diff --git a/manifests/complete.yaml b/manifests/complete.yaml index 5d4172f79..dd64d869c 100644 --- a/manifests/complete.yaml +++ b/manifests/complete.yaml @@ -410,6 +410,12 @@ rules: verbs: - create - get + - apiGroups: + - batch + resources: + - jobs + verbs: + - "*" --- # Source: kubeshark/templates/03-cluster-role-binding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -808,6 +814,8 @@ spec: - "5m" - -snapshot-size-limit - '20Gi' + - -dissector-image + - 'kubeshark/worker:master' env: - name: POD_NAME valueFrom: