Skip to content

Commit 73079dd

Browse files
authored
Merge pull request #51 from olhado/3.2-changes
3.2 changes
2 parents cae1e4e + 4c849ca commit 73079dd

14 files changed

+97
-43
lines changed

Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2022 F5, Inc.
3+
# Copyright (c) 2020-2023 F5, Inc.
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal
@@ -22,8 +22,8 @@
2222
#######
2323
apiVersion: v1
2424
name: threatstack-agent
25-
version: 3.1.1
26-
appVersion: 3.1.1
25+
version: 3.2.0
26+
appVersion: 3.2.0
2727
description: A Helm chart for the Threat Stack Cloud Security Agent
2828
keywords:
2929
- security

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2022 F5, Inc.
3+
Copyright (c) 2020-2023 F5, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ The following kubernetes objects are created when the chart is installed:
5353
| daemonset.customLuaFilter | string | `""` | |
5454
| daemonset.customTsAuditdConfig | string | `""` | |
5555
| 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** |
56+
| daemonset.enableCrio | bool | `unset` | Configures the daemonset agents to listen to the CRI-O daemon socket. |
5657
| 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** |
5758
| daemonset.enableLowPowerMode | bool | false | Configures the daemonset agents to perform better in tightly-resourced environments. The agent trades some telemetry reporting for reduced CPU and memory consumption. Ref: https://threatstack.zendesk.com/hc/en-us/articles/360016132692-Threat-Stack-Kubernetes-Deployment |
5859
| daemonset.nodeSelector | object | `{}` | |
@@ -78,6 +79,7 @@ The following kubernetes objects are created when the chart is installed:
7879
| image.version | string | `""` | The docker tag for the container image to install. It defaults to Threat Stack's latest offical docker image version for the agent at the time the chart was released. **NOTE:** Changing this could lead to pulling an unofficial, incorrect, or incompatible image, and is strongly discouraged. >>> **Warning:** Setting `customDaemonsetCmd` improperly can result in the Threat Stack agent not running correctly >>> |
7980
| imagePullSecrets | list | `[]` | If pulling the agent from a private/internal docker registry that requires credentials, you will need to add the name of your docker credentials secret to this array. *This secret needs to be defined outside of installing this helm chart.* Defaults to an empty array which will only work with public registries. * For more guidance with using private container registries, please review the following kubernetes documentation for details around how to set this upcorrectly with your registry service: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line https://kubernetes.io/docs/concepts/containers/images/#using-a-private-registry |
8081
| nameOverride | string | `""` | |
82+
| openShift | bool | `false` | If `true`, the default memory limit for the daemonset agent pods will be increased to `1Gi`, as OpenShift appears to require more memory for the agent to work properly. |
8183
| podSecurityPolicyEnabled | bool | `false` | Deploy Threat Stack with the Pod Security Policy for clusters with strict admission control requirements. |
8284
| rbac.create | bool | `true` | If `true`, will create the needed service account to run. If false, the chart will leverage the service account defined in `rbac.serviceAccountName` |
8385
| rbac.serviceAccountName | string | `"threatstack-agent"` | |

templates/NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{/*
22
MIT License
33

4-
Copyright (c) 2020-2022 F5, Inc.
4+
Copyright (c) 2020-2023 F5, Inc.
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

templates/_helpers.tpl

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{/*
22
MIT License
33
4-
Copyright (c) 2020-2022 F5, Inc.
4+
Copyright (c) 2020-2023 F5, Inc.
55
66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal
@@ -75,6 +75,17 @@ Return capabilities required for api-reader pod
7575
{{- range .Values.capabilities -}}"{{- . -}}", {{ end -}}
7676
{{- end -}}
7777

78+
{{/*
79+
Return higher memory limit for agent if OpenShift is enabled
80+
*/}}
81+
{{- define "threatstack-agent.daemonset-openshift-default-memlimit" -}}
82+
{{- if .Values.openShift -}}
83+
{{- "1Gi" -}}
84+
{{- else -}}
85+
{{- "512Mi" -}}
86+
{{- end -}}
87+
{{- end -}}
88+
7889
{{/*
7990
Return eBPF configuration required if enabled
8091
*/}}
@@ -125,6 +136,20 @@ Return runtime config if containerd is disabled
125136
{{- end -}}
126137
{{- end -}}
127138

139+
{{/*
140+
Return runtime config if CRI-O is disabled
141+
*/}}
142+
{{- define "threatstack-agent.crio-config" -}}
143+
{{- if kindIs "invalid" .Values.daemonset.enableCrio -}}
144+
{{- else -}}
145+
{{- if eq .Values.daemonset.enableCrio false -}}
146+
{{- default "container_runtimes.crio.enabled false" -}}
147+
{{- else -}}
148+
{{- default "container_runtimes.crio.enabled true" -}}
149+
{{- end -}}
150+
{{- end -}}
151+
{{- end -}}
152+
128153
{{/*
129154
Return Service Account Name if rbac is enabled
130155
*/}}
@@ -140,7 +165,7 @@ Return Service Account Name if rbac is enabled
140165
Return Additional Runtime Config for Daemonset
141166
*/}}
142167
{{- define "threatstack-agent.daemonset-runtimeConfig" -}}
143-
{{- $runtimeConfig := list (include "threatstack-agent.docker-config" .) (include "threatstack-agent.containerd-config" .) -}}
168+
{{- $runtimeConfig := list (include "threatstack-agent.docker-config" .) (include "threatstack-agent.containerd-config" .) (include "threatstack-agent.crio-config" .) -}}
144169
{{- $runtimeConfig = append $runtimeConfig (include "threatstack-agent.daemonset-lowPowerMode-config" .) -}}
145170
{{- $runtimeConfig = append $runtimeConfig (include "threatstack-agent.daemonset-ebpf-config" .) -}}
146171
{{- $runtimeConfig = append $runtimeConfig .Values.daemonset.additionalRuntimeConfig -}}

templates/cluster-role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2022 F5, Inc.
3+
# Copyright (c) 2020-2023 F5, Inc.
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal

templates/cluster-rolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2022 F5, Inc.
3+
# Copyright (c) 2020-2023 F5, Inc.
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal

templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2022 F5, Inc.
3+
# Copyright (c) 2020-2023 F5, Inc.
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal

templates/daemonset.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2022 F5, Inc.
3+
# Copyright (c) 2020-2023 F5, Inc.
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal
@@ -89,15 +89,21 @@ spec:
8989
name: {{ include "threatstack-agent.name" . }}
9090
{{- if eq .Values.gkeContainerOs true }}
9191
{{ toYaml .Values.gkeContainerOsCmd | indent 8 }}
92-
{{- end }}
93-
{{- if eq .Values.gkeUbuntu true }}
92+
{{- else if eq .Values.gkeUbuntu true }}
9493
{{ toYaml .Values.gkeUbuntuCmd | indent 8 }}
95-
{{- end }}
96-
{{- if eq .Values.eksAmazon2 true }}
94+
{{- else if eq .Values.eksAmazon2 true }}
9795
{{ toYaml .Values.eksAmazon2Cmd | indent 8 }}
98-
{{- end }}
99-
{{- if .Values.customDaemonsetCmd }}
96+
{{- else if .Values.customDaemonsetCmd }}
10097
{{ toYaml .Values.customDaemonsetCmd | indent 8 }}
98+
{{- else }}
99+
command: ["bash"]
100+
args:
101+
- -c
102+
- >-
103+
eval "tsagent setup --deploy-key $THREATSTACK_SETUP_DEPLOY_KEY $THREATSTACK_SETUP_ARGS" &&
104+
tsagent config --set $THREATSTACK_CONFIG_ARGS &&
105+
unset THREATSTACK_SETUP_DEPLOY_KEY THREATSTACK_SETUP_ARGS THREATSTACK_CONFIG_ARGS &&
106+
exec /opt/threatstack/sbin/tsagentd -logstdout=1
101107
{{- end }}
102108
{{- if .Values.daemonset.livenessProbe }}
103109
livenessProbe:
@@ -146,7 +152,7 @@ spec:
146152
memory: "256Mi"
147153
cpu: "200m"
148154
limits:
149-
memory: "512Mi"
155+
memory: {{ include "threatstack-agent.daemonset-openshift-default-memlimit" . }}
150156
cpu: "400m"
151157
{{- end }}
152158
volumeMounts:

templates/deployment-api-reader.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2022 F5, Inc.
3+
# Copyright (c) 2020-2023 F5, Inc.
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal
@@ -88,13 +88,21 @@ spec:
8888
- image: {{ .Values.image.repository }}:{{ if not .Values.image.version }}{{ .Chart.AppVersion }}{{ else }}{{ .Values.image.version }}{{ end }}
8989
imagePullPolicy: {{ .Values.image.pullPolicy }}
9090
name: {{ include "threatstack-agent.name" . }}
91+
command: ["bash"]
92+
args:
93+
- -c
94+
- >-
95+
eval "tsagent setup --deploy-key $THREATSTACK_SETUP_DEPLOY_KEY $THREATSTACK_SETUP_ARGS" &&
96+
tsagent config --set $THREATSTACK_CONFIG_ARGS &&
97+
unset THREATSTACK_SETUP_DEPLOY_KEY THREATSTACK_SETUP_ARGS THREATSTACK_CONFIG_ARGS &&
98+
exec /opt/threatstack/sbin/tsagentd -logstdout=1
9199
{{- if .Values.apiReader.livenessProbe }}
92100
livenessProbe:
93101
{{ toYaml .Values.apiReader.livenessProbe | indent 10 }}
94102
{{- else }}
95103
livenessProbe:
96104
exec:
97-
command: [ "sh", "-c", "tsagent status" ]
105+
command: [ "bash", "-c", "tsagent status" ]
98106
initialDelaySeconds: 15
99107
periodSeconds: 360
100108
timeoutSeconds: 5

0 commit comments

Comments
 (0)