grafana / k6-operator

An operator for running distributed k6 tests.
Apache License 2.0
541 stars 147 forks source link

Helm: add configuring securityContext for the operator deployment #402

Closed MohanedSaad closed 3 weeks ago

MohanedSaad commented 1 month ago

Feature Description

We have recently implemented a seccomp profile on all of our apps which involves injecting the below code snippet in the securityContext block in either the values.yaml file or the deployment manifest. However when attempting to do this for k6-operator (which we deploy via the helm chart) it appears that one can't overwrite the securityContext and it seems to return the defaulted securityContext {}. Anyone faced the same issue before?

securityContext
  seccompProfile:
    type: RuntimeDefault  

Suggested Solution (optional)

Ability to overwrite the securityContext default config.

Already existing or connected issues / PRs (optional)

No response

yorugac commented 1 month ago

Hi @MohanedSaad, thanks for opening the issue. It's true that Helm chart does not allow to configure securityContext for the operator itself. One can set those with bundle.yaml installation or with kustomize installation of course, but Helm needs changes in templates. So it's a feature request to extend Helm.