Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add security context to the init-container of the env injector #498

Open
ghostfrik opened this issue Mar 13, 2023 · 2 comments
Open

Add security context to the init-container of the env injector #498

ghostfrik opened this issue Mar 13, 2023 · 2 comments
Labels
question Further information is requested

Comments

@ghostfrik
Copy link

Is it possible to add security context to the init container?

We have applied some security policies to our AKS cluster. We managed to configure the security context for the akv2k8s deployments (the injector and the controller are running fine), but the side-container that gets deployed with our main application to inject the environment variables does not have any.

Is there a way to add these to the init-container?

allowPrivilegeEscalation: false 
runAsUser: 65534
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true

I am using the helm chart version 2.2.0, appVersion: 1.3.1

@ghostfrik ghostfrik added the question Further information is requested label Mar 13, 2023
@Speeddymon
Copy link

https://open-policy-agent.github.io/gatekeeper/website/docs/mutation/ may help if you're running Gatekeeper (or your cloud provider's gatekeeper offering e.g. Azure Policy for Kubernetes) in your cluster.

@ghostfrik
Copy link
Author

https://open-policy-agent.github.io/gatekeeper/website/docs/mutation/ may help if you're running Gatekeeper (or your cloud provider's gatekeeper offering e.g. Azure Policy for Kubernetes) in your cluster.

We have decided to change the source code of the plugin or basically implement what has been requested in #282 with some additional tags (like the readonly filesystem), because the injector does not work properly with some of the security tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants