How to fix the read only file system access while installing the OpenSearch

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
opensource {{opensearch:2.9.0}}

Describe the issue:
I am trying into install the OpenSearch 2.9.0 version component in Azure AKS cluster using HELM charts. But during deployment helm charts complain that there is read only issue on the pod for certain paths and the deployments failed. java.nio.file.FileSystemException: /usr/share/opensearch/config/opensearch.keystore.tmp: Read-only file system, that are causing the issue. I have attached here Screenshot.
we need a way to avoid the read only error.


Relevant Logs or Screenshots:

@bhanu1 please check [BUG][OpenSearch] OpenSearch fails to start when readOnlyRootFilesystem set to 'true' · Issue #369 · opensearch-project/helm-charts · GitHub (and related issues in this repository), thank you

@bhanu1 This is caused by your mounting to a config folder. OpenSearch lost the ability to write to the config folder.

You have 2 options here.

  1. Change the mounting to the following
   - name: opensearch-meta-cer-secret
        name: opensearch-meta-cer-secret

   - name: opensearch-meta-cer-secret
     mountPath: /usr/share/opensearch/config/certs
     readOnly: true
  1. Use secrets instead of configmap and then use secretMounts option in values.yml.
kubectl create secret generic opensearch-meta-cer-secret  --from-file=<cert_file> --from-file=<key_file>
  - name: opensearch-meta-cer-secret-mount
    secretName: opensearch-meta-cer-secret
    path: /usr/share/opensearch/config/certs