apache / apache/solr-operator

SOLR StatefulSet gets a broken securityContext by default

Open
#466 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
283
Forks
148
PR merge metrics
No merged PRs in 30d

Description

Upon deploying a SolrCloud CR for the first time with the Operator (version 0.6.0), ZK is fine but the SOLR StatefulSet fails to start Pods because of:
```
create Pod demo-solrcloud-0 in StatefulSet demo-solrcloud failed error: pods "demo-solrcloud-0" is forbidden: unable to validate against any security context constraint: [provider restricted: .spec.securityContext.fsGroup: Invalid value: []int64{8983}: 8983 is not an allowed group provider restrictedfsgroup: .spec.securityContext.fsGroup: Invalid value: []int64{8983}: 8983 is not an allowed group]
```

If in the SolrCloud CR I specify an empty context, everything start fine:
```yaml
spec:
customSolrKubeOptions:
podOptions:
podSecurityContext: {}
```

I don't know if this is expected, a bug or some edge case for OpenShift but there was no documentation for it.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by deploying the version 0.6.0 SolrCloud example on OpenShift and inspect the generated SOLR StatefulSet securityContext under the restricted security context constraint. Compare that behavior with the podOptions.podSecurityContext: {} workaround; done means a default SolrCloud deployment creates Pods successfully without requiring that override.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.