Multi role deployment using helm chart opensearch

I have a requirement to setup the cluster with 3 master nodes and 2 data nodes . How can i achieve this with the single helm chart.

Right now I am using latest official helm chart with all master nodes only and replica 3. How can i specify data nodes too in the same chart.

I tried adding the nodegroup as data inside the values.yaml , but it was taking either data node or master node configuration only i.e it was creating master nodes or data nodes only.

It was not creating the master and data nodes collectively. I dont want to use the two separate yaml for master and data node deployment.

If anyone is implemented the same , do let me know.

Sorry for the late update , was able to figure out the way how we can create the data node and master nodes within the same values.yaml. Will share the github link soon for the same.