Skip to content

Commit c8e6a55

Browse files
author
Michael Chmielewski
committed
Merge remote-tracking branch 'upstream/master'
2 parents 5050945 + ece4e2e commit c8e6a55

File tree

6 files changed

+25
-39
lines changed

6 files changed

+25
-39
lines changed

Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
name: threatstack-agent
3-
version: 2.1.3
4-
appVersion: 2.3.4
3+
version: 2.2.1
4+
appVersion: 2.4.1
55
description: A Helm chart for the Threat Stack Cloud Security Agent
66
keywords:
77
- security

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,12 @@ The following kubernetes objects are created when the chart is installed:
5353
| daemonset.customAuditRules | string | `""` | |
5454
| daemonset.customLuaFilter | string | `""` | |
5555
| daemonset.customTsAuditdConfig | string | `""` | |
56-
| daemonset.enableContainerd | bool | `false` | Defaults to `false`, configures the daemonset agents to listen to the containerd daemon socket |
57-
| daemonset.enableDocker | bool | `true` | Defaults to `true`, configures the daemonset agents to listen to the docker daemon socket |
56+
| daemonset.enableContainerd | bool | `unset` | Configures the daemonset agents to listen to the containerd daemon socket. **By default in agent 2.4.0+, the agent detects if containerd is running at startup** |
57+
| daemonset.enableDocker | bool | `unset` | Configures the daemonset agents to listen to the docker daemon socket. **By default in agent 2.4.0+, the agent detects if docker is running at startup** |
5858
| daemonset.nodeSelector | object | `{}` | |
5959
| daemonset.podAnnotations."container.apparmor.security.beta.kubernetes.io/threatstack-agent" | string | `"unconfined"` | |
6060
| daemonset.priorityClassName | string | `""` | Optionally set the priority class name for the daemonset pods. Note that priority classes are not created via this helm chart. Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ |
6161
| daemonset.tolerations | list | `[]` | |
62-
| daemonset.volumes.containerdsocket.hostPath | string | `"/run/containerd/containerd.sock"` | Path to docker daemon's socket |
63-
| daemonset.volumes.dockersocket.hostPath | string | `"/var/run/docker.sock"` | Path to docker daemon's socket |
64-
| daemonset.volumes.oldcontainerdsocket.hostPath | string | `"/var/run/docker/containerd/docker-containerd.sock"` | Path to older containerd daemon's socket |
6562
| eksAmazon2 | bool | `false` | If `true`, the Daemonset definition will be modified to execute commands for the agent to work correctly on EKS with Amazon Linux 2 nodes. Defaults to `false` |
6663
| eksAmazon2Cmd.args[0] | string | `"-c"` | |
6764
| eksAmazon2Cmd.args[1] | string | `"chroot /threatstackfs /bin/bash -c 'service auditd stop; systemctl disable auditd'; eval tsagent setup $THREATSTACK_SETUP_ARGS; eval tsagent config --set $THREATSTACK_CONFIG_ARGS; sleep 5; /opt/threatstack/sbin/tsagentd -logstdout"` | |

templates/_helpers.tpl

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,29 @@ Create chart name and version as used by the chart label.
3232
{{- end -}}
3333

3434
{{/*
35-
Return runtime config if docker enabled
35+
Return runtime config if docker is disabled
3636
*/}}
3737
{{- define "threatstack-agent.docker-config" -}}
38-
{{- if .Values.daemonset.enableDocker -}}
38+
{{- if kindIs "invalid" .Values.daemonset.enableDocker -}}
39+
{{- else -}}
40+
{{- if eq .Values.daemonset.enableDocker false -}}
41+
{{- default "container_runtimes.docker.enabled false container_runtimes.docker.kubernetes_enabled false" -}}
42+
{{- else -}}
3943
{{- default "container_runtimes.docker.enabled true container_runtimes.docker.kubernetes_enabled true" -}}
4044
{{- end -}}
4145
{{- end -}}
46+
{{- end -}}
4247

4348
{{/*
44-
Return runtime config if containerd enabled
49+
Return runtime config if containerd is disabled
4550
*/}}
4651
{{- define "threatstack-agent.containerd-config" -}}
47-
{{- if .Values.daemonset.enableContainerd -}}
52+
{{- if kindIs "invalid" .Values.daemonset.enableContainerd -}}
53+
{{- else -}}
54+
{{- if eq .Values.daemonset.enableContainerd false -}}
55+
{{- default "container_runtimes.containerd.enabled false container_runtimes.containerd.kubernetes_enabled false" -}}
56+
{{- else -}}
4857
{{- default "container_runtimes.containerd.enabled true container_runtimes.containerd.kubernetes_enabled true" -}}
4958
{{- end -}}
5059
{{- end -}}
60+
{{- end -}}

templates/daemonset.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ spec:
8383
exec:
8484
command: [ "sh", "-c", "tsagent status" ]
8585
initialDelaySeconds: 15
86-
periodSeconds: 60
86+
periodSeconds: 360
8787
timeoutSeconds: 5
8888
successThreshold: 1
8989
failureThreshold: 5
@@ -124,12 +124,6 @@ spec:
124124
volumeMounts:
125125
- name: hostfs
126126
mountPath: /threatstackfs
127-
- name: dockersocket
128-
mountPath: /var/run/docker.sock
129-
- name: containerdsocket
130-
mountPath: /run/containerd/containerd.sock
131-
- name: oldcontainerdsocket
132-
mountPath: /var/run/docker/containerd/docker-containerd.sock
133127
{{- if .Values.daemonset.customAuditRules }}
134128
- name: custom-audit-rules
135129
mountPath: /opt/threatstack/etc/audit-custom.rules
@@ -149,15 +143,6 @@ spec:
149143
- hostPath:
150144
path: /
151145
name: hostfs
152-
- hostPath:
153-
path: {{ .Values.daemonset.volumes.dockersocket.hostPath }}
154-
name: dockersocket
155-
- hostPath:
156-
path: {{ .Values.daemonset.volumes.containerdsocket.hostPath }}
157-
name: containerdsocket
158-
- hostPath:
159-
path: {{ .Values.daemonset.volumes.oldcontainerdsocket.hostPath }}
160-
name: oldcontainerdsocket
161146
{{- if .Values.daemonset.customAuditRules }}
162147
- name: custom-audit-rules
163148
configMap:

templates/deployment-api-reader.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ spec:
6666
exec:
6767
command: [ "sh", "-c", "tsagent status" ]
6868
initialDelaySeconds: 15
69-
periodSeconds: 60
69+
periodSeconds: 360
7070
timeoutSeconds: 5
7171
successThreshold: 1
7272
failureThreshold: 5

values.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@ apiReader:
145145
#
146146
########
147147
daemonset:
148-
enableDocker: true
149-
enableContainerd: false
148+
# Override the agent's default detection behavior that determines
149+
# which docker service to monitor
150+
#
151+
# enableDocker: false
152+
# enableContainerd: false
150153

151154
additionalRuntimeConfig: "log.level info"
152155
# Override the agent's liveness probe logic from the default:
@@ -188,15 +191,6 @@ daemonset:
188191
# Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
189192
priorityClassName: ""
190193

191-
# Configure hostPaths for docker and containerd sockets
192-
volumes:
193-
dockersocket:
194-
hostPath: "/var/run/docker.sock"
195-
containerdsocket:
196-
hostPath: "/run/containerd/containerd.sock"
197-
oldcontainerdsocket:
198-
hostPath: "/var/run/docker/containerd/docker-containerd.sock"
199-
200194
## Annotations to add to the threatstack daemonset pod(s)
201195
#
202196
# To remove the apparmor annotation, add a comment as the attribute value,

0 commit comments

Comments
 (0)