Mounting a volume to container is not clear
- Dominant language
- Go
- Stars
- 283
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to attach a volume from a configmap to an init container but it is not entirely clear how to do it from the CRD spec. I've also been unable to find any examples of somebody doing this:
The code so far:
```yaml
---
apiVersion: solr.apache.org/v1beta1
kind: SolrCloud
metadata:
name: test
spec:
replicas: 1
customSolrKubeOptions:
podOptions:
volumes:
- source:
configMap:
name: configset
defaultContainerMount:
mountPath: /config
name: config.xml
sidecarContainer:
- name: config-loader
image: alpine/curl:latest
command:
- "sh"
- "-c"
- "ls -la /config"
volumeMounts:
- name: configset
mountPath: /config
---
kind: ConfigMap
apiVersion: v1
metadata:
name: configset
data:
config.xml: |
...
```
It runs and the /config mount exists but it is always empty.
1. Are there any examples of volume mounts with this operator?
2. What am I doing wrong?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the CRD spec for customSolrKubeOptions.podOptions and compare the requested volumes and sidecarContainer settings with the generated pod specification. Verify the ConfigMap volume and container volumeMount names and paths; done means a working example or clarified configuration that makes config.xml available at /config in the init or sidecar container.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100