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

doc(volumes): add docs for attaching additional volumes #739

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions example/test_solrcloud_additional_volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Mounting Additional Volumes
#
# It is also possible to mount additional volumes to the SolrCloud (or its initContainers). Some example scenarios where you might use this would be:
# - Custom solr plugins that rely on certain data to be present on disk
# - Bootstrapping additional configuration for Solr via a ConfigMap
#
# Below is an example of the last scenario:

apiVersion: solr.apache.org/v1beta1
kind: SolrCloud
metadata:
name: test
namespace: test
spec:
replicas: 1
customSolrKubeOptions:
podOptions:
volumes:
- source:
configMap:
name: configset
defaultMode: 0777
name: configset
defaultContainerMount:
mountPath: /configset
name: configset
sidecarContainers:
- name: config-loader
image: alpine/curl:latest
command:
- "sh"
- "-c"
- "ls -la /configset"
volumeMounts:
- name: configset
mountPath: /configset

# Note the `source` spec may change based on the implementation. In this case, the `configMap` spec requires field `name`.
# See volume spec in CRD: https://github.com/apache/solr-operator/blob/main/config/crd/bases/solr.apache.org_solrclouds.yaml#L6800

---
kind: ConfigMap
apiVersion: v1
metadata:
name: configset
namespace: test
data:
config.xml: |
<?xml version="1.0" encoding="UTF-8" ?>
<config>
...
</config>
Loading