Opensearch Operator doesnt allow to mount PV via additional volumes

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch 2.19.0

Describe the issue:
The precreated PV for mounting files across nodes, when configured as part of opensearch-cluster.yaml file under additional volumes does not work. opensearch-operator throws error during installing the cluster.

Configuration:

spec:
  general:
   additionalVolumes:
   - name: my-fileshare-pvc
     persistentVolumeClaim:
       claimName: my-fileshare-pvc
     path: /usr/share/opensearch/custom

Relevant Logs or Screenshots:

Where did you find this configuration? According to the documentation the only supported objects are ConfigMaps, Secrets, emptyDir, projected volumes and CSI volumes.

@pablo , Got it, just trying to understand if this will not be supported at all by operator or is part of any future scope to support additional PV. Because without operator, normal helm deployments does support additional pv mount. Also, even eck operator supports additional PV mount for elastic when looking from a parity perspective.
Thanks!

@Nagpraveen Are you referring to OpenSearch helm charts? If so, could you point out where they are supported? I’m only aware of the persistence for the node data.

@pablo : Greetings!!

Yes, indeed the common pv is supported under extraVolumes under opensearch helm deployment.
Node’s individual persistence also is anyways supported.

Below is the working config for additional pv using helm deployment

extraVolumes:
  - name: fileshare-pv
    persistentVolumeClaim:
      claimName: fileshare-pvc
extraVolumeMounts:
  - name: fileshare-pv
    mountPath: /usr/share/opensearch/config/custom

@Nagpraveen Thanks for sharing, I missed that part.

Regarding the lack of support for PVC in additionalVolumes, I suggest opening a Feature Request in the Operator’s GitHub.

If you do so, please share the link to the GitHub feature request here.

1 Like

@pablo : Thank you for the review and suggestion.

I have opened up a feature request as advised:

Thanks!

1 Like