Skip to content

Commit 08d80ed

Browse files
authored
✨ Update the Helm chart to v53.2.2 (#4)
1 parent b982360 commit 08d80ed

6 files changed

Lines changed: 167 additions & 0 deletions

File tree

charts/chart/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ Example for overriding image names:
164164
| `tap.snapshots.cloud.gcs.credentialsJson` | Service account JSON key. When set, the chart auto-creates a Secret with `SNAPSHOT_GCS_CREDENTIALS_JSON`. | `""` |
165165
| `tap.delayedDissection.cpu` | CPU allocation for delayed dissection jobs | `1` |
166166
| `tap.delayedDissection.memory` | Memory allocation for delayed dissection jobs | `4Gi` |
167+
| `tap.delayedDissection.storageSize` | Storage size for dissection job PVC. When empty, falls back to `tap.snapshots.local.storageSize`. When the resolved value is non-empty, a PVC is created; otherwise an `emptyDir` is used. | `""` |
168+
| `tap.delayedDissection.storageClass` | Storage class for dissection job PVC. When empty, falls back to `tap.snapshots.local.storageClass`. | `""` |
167169
| `tap.release.repo` | URL of the Helm chart repository | `https://helm.kubeshark.com` |
168170
| `tap.release.name` | Helm release name | `kubeshark` |
169171
| `tap.release.namespace` | Helm release namespace | `default` |

charts/chart/templates/02-cluster-role.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ rules:
8686
verbs:
8787
- create
8888
- get
89+
- apiGroups:
90+
- ""
91+
resources:
92+
- persistentvolumeclaims
93+
verbs:
94+
- create
95+
- get
96+
- list
97+
- delete
8998
- apiGroups:
9099
- batch
91100
resources:

charts/chart/templates/04-hub-deployment.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ spec:
5656
- -dissector-memory
5757
- '{{ .Values.tap.delayedDissection.memory }}'
5858
{{- end }}
59+
{{- $dissectorStorageSize := .Values.tap.delayedDissection.storageSize | default .Values.tap.snapshots.local.storageSize }}
60+
{{- if $dissectorStorageSize }}
61+
- -dissector-storage-size
62+
- '{{ $dissectorStorageSize }}'
63+
{{- end }}
64+
{{- $dissectorStorageClass := .Values.tap.delayedDissection.storageClass | default .Values.tap.snapshots.local.storageClass }}
65+
{{- if $dissectorStorageClass }}
66+
- -dissector-storage-class
67+
- '{{ $dissectorStorageClass }}'
68+
{{- end }}
5969
{{- if .Values.tap.gitops.enabled }}
6070
- -gitops
6171
{{- end }}

charts/chart/templates/09-worker-daemon-set.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ spec:
131131
valueFrom:
132132
fieldRef:
133133
fieldPath: metadata.namespace
134+
- name: NODE_NAME
135+
valueFrom:
136+
fieldRef:
137+
fieldPath: spec.nodeName
134138
- name: TCP_STREAM_CHANNEL_TIMEOUT_MS
135139
value: '{{ .Values.tap.misc.tcpStreamChannelTimeoutMs }}'
136140
- name: TCP_STREAM_CHANNEL_TIMEOUT_SHOW
@@ -227,6 +231,9 @@ spec:
227231
mountPropagation: HostToContainer
228232
- mountPath: /app/data
229233
name: data
234+
{{- if .Values.tap.persistentStorage }}
235+
subPathExpr: $(NODE_NAME)
236+
{{- end }}
230237
{{- if .Values.tap.tls }}
231238
- command:
232239
- ./tracer
@@ -257,6 +264,10 @@ spec:
257264
valueFrom:
258265
fieldRef:
259266
fieldPath: metadata.namespace
267+
- name: NODE_NAME
268+
valueFrom:
269+
fieldRef:
270+
fieldPath: spec.nodeName
260271
- name: PROFILING_ENABLED
261272
value: '{{ .Values.tap.pprof.enabled }}'
262273
- name: SENTRY_ENABLED
@@ -328,6 +339,9 @@ spec:
328339
mountPropagation: HostToContainer
329340
- mountPath: /app/data
330341
name: data
342+
{{- if .Values.tap.persistentStorage }}
343+
subPathExpr: $(NODE_NAME)
344+
{{- end }}
331345
- mountPath: /etc/os-release
332346
name: os-release
333347
readOnly: true
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
suite: dissection storage configuration
2+
templates:
3+
- templates/04-hub-deployment.yaml
4+
tests:
5+
- it: should fallback to snapshot storageSize when dissection storageSize is empty
6+
asserts:
7+
- contains:
8+
path: spec.template.spec.containers[0].command
9+
content: -dissector-storage-size
10+
- contains:
11+
path: spec.template.spec.containers[0].command
12+
content: "20Gi"
13+
14+
- it: should fallback to snapshot storageClass when dissection storageClass is empty
15+
set:
16+
tap.snapshots.local.storageClass: gp2
17+
asserts:
18+
- contains:
19+
path: spec.template.spec.containers[0].command
20+
content: -dissector-storage-class
21+
- contains:
22+
path: spec.template.spec.containers[0].command
23+
content: gp2
24+
25+
- it: should not render dissector-storage-class when both dissection and snapshot storageClass are empty
26+
asserts:
27+
- notContains:
28+
path: spec.template.spec.containers[0].command
29+
content: -dissector-storage-class
30+
31+
- it: should prefer dissection storageSize over snapshot storageSize
32+
set:
33+
tap.delayedDissection.storageSize: 100Gi
34+
tap.snapshots.local.storageSize: 50Gi
35+
asserts:
36+
- contains:
37+
path: spec.template.spec.containers[0].command
38+
content: -dissector-storage-size
39+
- contains:
40+
path: spec.template.spec.containers[0].command
41+
content: "100Gi"
42+
43+
- it: should prefer dissection storageClass over snapshot storageClass
44+
set:
45+
tap.delayedDissection.storageClass: io2
46+
tap.snapshots.local.storageClass: gp2
47+
asserts:
48+
- contains:
49+
path: spec.template.spec.containers[0].command
50+
content: -dissector-storage-class
51+
- contains:
52+
path: spec.template.spec.containers[0].command
53+
content: io2
54+
55+
- it: should fallback to snapshot config for both storageSize and storageClass
56+
set:
57+
tap.snapshots.local.storageSize: 30Gi
58+
tap.snapshots.local.storageClass: gp3
59+
asserts:
60+
- contains:
61+
path: spec.template.spec.containers[0].command
62+
content: -dissector-storage-size
63+
- contains:
64+
path: spec.template.spec.containers[0].command
65+
content: "30Gi"
66+
- contains:
67+
path: spec.template.spec.containers[0].command
68+
content: -dissector-storage-class
69+
- contains:
70+
path: spec.template.spec.containers[0].command
71+
content: gp3
72+
73+
- it: should not render dissector-storage-size when both dissection and snapshot storageSize are empty
74+
set:
75+
tap.delayedDissection.storageSize: ""
76+
tap.snapshots.local.storageSize: ""
77+
asserts:
78+
- notContains:
79+
path: spec.template.spec.containers[0].command
80+
content: -dissector-storage-size
81+
82+
- it: should render all dissector args together with custom values
83+
set:
84+
tap.delayedDissection.cpu: "4"
85+
tap.delayedDissection.memory: 8Gi
86+
tap.delayedDissection.storageSize: 200Gi
87+
tap.delayedDissection.storageClass: local-path
88+
asserts:
89+
- contains:
90+
path: spec.template.spec.containers[0].command
91+
content: -dissector-cpu
92+
- contains:
93+
path: spec.template.spec.containers[0].command
94+
content: "4"
95+
- contains:
96+
path: spec.template.spec.containers[0].command
97+
content: -dissector-memory
98+
- contains:
99+
path: spec.template.spec.containers[0].command
100+
content: 8Gi
101+
- contains:
102+
path: spec.template.spec.containers[0].command
103+
content: -dissector-storage-size
104+
- contains:
105+
path: spec.template.spec.containers[0].command
106+
content: "200Gi"
107+
- contains:
108+
path: spec.template.spec.containers[0].command
109+
content: -dissector-storage-class
110+
- contains:
111+
path: spec.template.spec.containers[0].command
112+
content: local-path
113+
114+
- it: should still render existing dissector-cpu and dissector-memory args
115+
asserts:
116+
- contains:
117+
path: spec.template.spec.containers[0].command
118+
content: -dissector-cpu
119+
- contains:
120+
path: spec.template.spec.containers[0].command
121+
content: "1"
122+
- contains:
123+
path: spec.template.spec.containers[0].command
124+
content: -dissector-memory
125+
- contains:
126+
path: spec.template.spec.containers[0].command
127+
content: 4Gi

charts/chart/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ tap:
3737
delayedDissection:
3838
cpu: "1"
3939
memory: 4Gi
40+
storageSize: ""
41+
storageClass: ""
4042
snapshots:
4143
local:
4244
storageClass: ""
@@ -205,6 +207,7 @@ tap:
205207
- http
206208
- icmp
207209
- kafka
210+
- mongodb
208211
- redis
209212
- ws
210213
- ldap
@@ -224,6 +227,8 @@ tap:
224227
- 5672
225228
kafka:
226229
- 9092
230+
mongodb:
231+
- 27017
227232
redis:
228233
- 6379
229234
ldap:

0 commit comments

Comments
 (0)