From e1106e25c47d960b598f660ddea73d509d8ac1b3 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Wed, 27 Sep 2023 01:57:15 +0300 Subject: [PATCH] :sparkles: Use `emptyDir` as the default type of `data` volume --- cmd/tapRunner.go | 5 ----- helm-chart/templates/09-worker-daemon-set.yaml | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/tapRunner.go b/cmd/tapRunner.go index 93899f032..a879b5563 100644 --- a/cmd/tapRunner.go +++ b/cmd/tapRunner.go @@ -58,11 +58,6 @@ func tap() { return } - if !config.Config.Tap.PersistentStorage { - config.Config.Tap.StorageLimit = "200Mi" - log.Warn().Msg("Storage limit cannot be modified while persistentstorage is set to false!") - } - log.Info(). Str("limit", config.Config.Tap.StorageLimit). Msg(fmt.Sprintf("%s will store the traffic up to a limit (per node). Oldest TCP/UDP streams will be removed once the limit is reached.", misc.Software)) diff --git a/helm-chart/templates/09-worker-daemon-set.yaml b/helm-chart/templates/09-worker-daemon-set.yaml index 36a29d496..455a17b57 100644 --- a/helm-chart/templates/09-worker-daemon-set.yaml +++ b/helm-chart/templates/09-worker-daemon-set.yaml @@ -225,4 +225,7 @@ spec: {{- if .Values.tap.persistentstorage }} persistentVolumeClaim: claimName: kubeshark-persistent-volume-claim +{{- else }} + emptyDir: + sizeLimit: {{ .Values.tap.storagelimit }} {{- end }}