diff --git a/example/test_solrcloud_additional_volume.yaml b/example/test_solrcloud_additional_volume.yaml new file mode 100644 index 00000000..a33dba3e --- /dev/null +++ b/example/test_solrcloud_additional_volume.yaml @@ -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: | + + + ... + \ No newline at end of file