-
Notifications
You must be signed in to change notification settings - Fork 114
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
Run solr-operator and solr helm chart on openshift get error "would violate PodSecurity "restricted:v1.24"" #671
Comments
It looks like related with this issue: #489 |
Here is the quick hack to add those container securityContext
According to PSS, it's needed: |
Update:
|
If these changes are ok to run in other environments, we could utilize that patch. Make a PR and we can go from there. I'm glad you found a workaround without modifying the operator though. Most of the maintainers don't run openshift, so it's hard for us to fix this ourselves. We need to rely on contributions from people running openshift. |
Expose container securityContext as configuration in chart values file can be the solution, so user could have full control about what they want to run, it's up to user to follow "Pod Security Standards" or not. |
My client uses Kyverno to warn or enforce various best practices. They recently added rules to warn about deployments that will not run in K8S PSA "restricted" mode: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted. I managed to apply these for solr containers and custom init containers, but not for the operator-managed init containers. Since Solr runs well with these restrictions, I support making them standard. On the POD level: podSecurityContext:
seccompProfile:
type: RuntimeDefault On the container level: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL While OpenShift will require even more changes, the PSA "restricted" mode is a generic k8s thing that I support aiming for as default. |
When try to run solr-operator and solr helm chart on openshift get the following error regarding podSecurity, the question is where to change that podSecurity?
Tried to change the security context via solr helm values.yaml like this :
But could not set allowPrivilegeEscalation and capabilities there, they are on container lever security context.
in CustomSolrKubeOptions, perhaps not only expose podOptions.PodSecurityContext, also expose container SecurityContext somehow, the AllowPrivilegeEscalation is defined on that level.
in corev1:
The text was updated successfully, but these errors were encountered: