blob: 0e7ddc24eea3b265c3e68f0ae311c0c9cb6475b4 [file]
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 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>