Skip to content

Commit 4307090

Browse files
chore(cluster-shield,sysdig-deploy): Automatic bump to version 1.14.0 (#2333)
Co-authored-by: francesco-furlan <[email protected]> Co-authored-by: Francesco Furlan <[email protected]>
1 parent d1a2928 commit 4307090

File tree

9 files changed

+1436
-34
lines changed

9 files changed

+1436
-34
lines changed

charts/cluster-shield/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: cluster-shield
33
description: Cluster Shield Helm Chart for Kubernetes
44
type: application
5-
version: 1.13.0
6-
appVersion: "1.13.0"
5+
version: 1.14.0
6+
appVersion: "1.14.0"
77
maintainers:
88
- name: AlbertoBarba
99

charts/cluster-shield/templates/_helpers.tpl

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ Adds kubernetes related keys to the configuration.
5151
{{- define "cluster-shield.configMap" -}}
5252
{{- $conf := deepCopy .Values.cluster_shield -}}
5353
{{- $_ := set $conf "kubernetes" (include "cluster-shield.configurationKubernetes" . | fromYaml) -}}
54+
{{- if regexMatch "^v?([0-9]+)(\\.[0-9]+)?(\\.[0-9]+)?(-([0-9A-Za-z\\-]+(\\.[0-9A-Za-z\\-]+)*))?(\\+([0-9A-Za-z\\-]+(\\.[0-9A-Za-z\\-]+)*))?$" (.Values.onPremCompatibilityVersion | default "") -}}
55+
{{- if semverCompare "< 7.3.0" .Values.onPremCompatibilityVersion -}}
56+
{{- if hasKey $conf.features "respond" -}}
57+
{{- $_ := unset $conf.features "respond" -}}
58+
{{- end -}}
59+
{{- end -}}
60+
{{- end -}}
5461
{{- if eq "true" (include "cluster-shield.containerVulnerabilityManagementEnabled" .) -}}
5562
{{- if regexMatch "^v?([0-9]+)(\\.[0-9]+)?(\\.[0-9]+)?(-([0-9A-Za-z\\-]+(\\.[0-9A-Za-z\\-]+)*))?(\\+([0-9A-Za-z\\-]+(\\.[0-9A-Za-z\\-]+)*))?$" (.Values.onPremCompatibilityVersion | default "") -}}
5663
{{- if semverCompare "< 6.12.0" .Values.onPremCompatibilityVersion -}}
@@ -498,28 +505,47 @@ run-all-namespaced
498505
{{- end }}
499506
{{- end }}
500507

508+
{{/*
509+
Generic helper: checks if .Values.cluster_shield.features.respond.response_actions.cluster.<action>.trigger == "all"
510+
Usage: {{ include "cluster.response_actions.is_enabled" (dict "Action" "delete_pod" "Context" .) }}
511+
*/}}
512+
{{- define "cluster.response_actions.is_enabled" -}}
513+
{{- $action := .Action }}
514+
{{- $ctx := .Context }}
515+
{{- with $ctx.Values.cluster_shield.features.respond.response_actions -}}
516+
{{- $entry := index . $action }}
517+
{{- if and $entry (eq $entry.trigger "none") -}}
518+
false
519+
{{- else -}}
520+
true
521+
{{- end -}}
522+
{{- else -}}
523+
true
524+
{{- end -}}
525+
{{- end -}}
526+
501527
{{/*
502528
Response Actions: Cluster actions
503529
In the future we will have more complex logic to determine if the action is enabled or not.
504530
*/}}
505531
{{- define "cluster.response_actions.rollout_restart.enabled" }}
506-
{{- include "cluster.response_actions_enabled" . }}
532+
{{- include "cluster.response_actions.is_enabled" (dict "Action" "rollout_restart" "Context" .) }}
507533
{{- end}}
508534
{{- define "cluster.response_actions.delete_pod.enabled" }}
509-
{{- include "cluster.response_actions_enabled" . }}
535+
{{- include "cluster.response_actions.is_enabled" (dict "Action" "delete_pod" "Context" .) }}
510536
{{- end}}
511537
{{- define "cluster.response_actions.isolate_network.enabled" }}
512-
{{- include "cluster.response_actions_enabled" . }}
538+
{{- include "cluster.response_actions.is_enabled" (dict "Action" "isolate_network" "Context" .) }}
513539
{{- end}}
514540
{{- define "cluster.response_actions.delete_network_policy.enabled" }}
515-
{{- include "cluster.response_actions_enabled" . }}
541+
{{- include "cluster.response_actions.is_enabled" (dict "Action" "delete_network_policy" "Context" .) }}
516542
{{- end}}
517543
{{- define "cluster.response_actions.get_logs.enabled" }}
518-
{{- include "cluster.response_actions_enabled" . }}
544+
{{- include "cluster.response_actions.is_enabled" (dict "Action" "get_logs" "Context" .) }}
519545
{{- end}}
520546
{{- define "cluster.response_actions.volume_snapshot.enabled" }}
521-
{{- include "cluster.response_actions_enabled" . }}
547+
{{- include "cluster.response_actions.is_enabled" (dict "Action" "volume_snapshot" "Context" .) }}
522548
{{- end}}
523-
{{- define "cluster.response_actions.delete_volume_snapshot.enabled" }}
524-
{{- include "cluster.response_actions_enabled" . }}
549+
{{- define "cluster.response_actions.delete_volume_snapshot.enabled" -}}
550+
{{- include "cluster.response_actions.is_enabled" (dict "Action" "delete_volume_snapshot" "Context" .) -}}
525551
{{- end}}

charts/cluster-shield/templates/clusterrole.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,13 @@ rules:
235235
{{- end }}
236236

237237
{{- if eq "true" (include "cluster.response_actions.isolate_network.enabled" .) }}
238+
- apiGroups:
239+
- batch
240+
resources:
241+
- jobs
242+
verbs:
243+
- get # needed to identify the pods to isolate
244+
238245
- apiGroups:
239246
- apps
240247
resources:
@@ -263,12 +270,20 @@ rules:
263270
{{- end }}
264271

265272
{{- if eq "true" (include "cluster.response_actions.get_logs.enabled" .) }}
273+
- apiGroups:
274+
- batch
275+
resources:
276+
- jobs
277+
verbs:
278+
- get # needed to identify the pods to get logs from
279+
266280
- apiGroups:
267281
- apps
268282
resources:
269283
- daemonsets
270284
- deployments
271285
- statefulsets
286+
- replicasets
272287
verbs:
273288
- get # needed to identify the pods to get logs from
274289

@@ -288,12 +303,20 @@ rules:
288303
{{- end }}
289304

290305
{{- if eq "true" (include "cluster.response_actions.volume_snapshot.enabled" .) }}
306+
- apiGroups:
307+
- batch
308+
resources:
309+
- jobs
310+
verbs:
311+
- get # needed to identify the pods with PVCs
312+
291313
- apiGroups:
292314
- apps
293315
resources:
294316
- daemonsets
295317
- deployments
296318
- statefulsets
319+
- replicasets
297320
verbs:
298321
- get # needed to identify the pods with PVCs
299322

charts/cluster-shield/templates/openshift_securitycontextconstraint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ allowHostDirVolumePlugin: true
1212
allowHostIPC: false
1313
allowHostNetwork: true
1414
allowHostPID: true
15-
allowHostPorts: false
15+
allowHostPorts: {{ .Values.hostNetwork }}
1616
allowPrivilegeEscalation: true
1717
allowPrivilegedContainer: true
1818
allowedCapabilities: []

0 commit comments

Comments
 (0)