splunk / splunk-connect-for-kubernetes

Helm charts associated with kubernetes plug-ins
Apache License 2.0
344 stars 270 forks source link

Enable the helm chart users to customize the Security Context config. #872

Open zamsong123 opened 1 month ago

zamsong123 commented 1 month ago

<

What would you like to be added: Enable the helm chart users to customize the Security Context config.

Why is this needed: For some of the enterprise users of the helm chart, there could be some security context check in the K8s clusters. e.g. runAsNonRoot must be set to "true" So it will be nice if we could enable the helm chart uses to config.

zamsong123 commented 1 month ago

After analysis of the helm chart I notice there are 4 changes needed for this change:

  1. daemonset under splunk-kubernetes-logging
  2. daemonset under splunk-kubernetes-metrics
  3. deploymentMetricsAggregator under splunk-kubernetes-metrics
  4. deployment under splunk-kubernetes-objects

I will create a PR to make the change

zamsong123 commented 1 month ago

Did some testing and below is the output: splunk-connect-for-kubernetes % helm template . | grep securityContext -A10 securityContext: allowPrivilegeEscalation: false capabilities: drop: