Skip to content

Commit

Permalink
feat(lacework-agent) Optionally create clusterAgent templated resources
Browse files Browse the repository at this point in the history
When using clusterAgent.enable make optional creating the rbac resources by setting
clusterAgent.createRoleBinding: to create the ClusterRoleBinding
clusterAgent.createRole: to create the ClusterRole
clusterAgent.createServiceAccount: to create the ServiceAccount
  • Loading branch information
sbeaulie committed Sep 24, 2024
1 parent daa191f commit ad04999
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lacework-agent/templates/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if (.Values.clusterAgent).enable -}}
{{- if (and (.Values.clusterAgent).enable (.Values.clusterAgent).createRoleBinding) -}}
apiVersion: rbac.authorization.k8s.io/v1
# This cluster role binding allows anyone in the "manager" group to read secrets in any namespace.
kind: ClusterRoleBinding
Expand Down
2 changes: 1 addition & 1 deletion lacework-agent/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if (.Values.clusterAgent).enable -}}
{{- if (and (.Values.clusterAgent).enable (.Values.clusterAgent).createRole) -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
2 changes: 1 addition & 1 deletion lacework-agent/templates/service-account.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if (.Values.clusterAgent).enable -}}
{{- if (and (.Values.clusterAgent).enable (.Values.clusterAgent).createServiceAccount) -}}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
3 changes: 3 additions & 0 deletions lacework-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ clusterAgent:
# https://docs.lacework.net/onboarding/restricted/configure-agent-behavior-in-configjson-file#proxyurl-propert
proxyUrl:
hostNetworkAccess: false
createRoleBinding: true
createRole: true
createServiceAccount: true
image:
registry: docker.io
repository: lacework/k8scollector
Expand Down

0 comments on commit ad04999

Please sign in to comment.