sassoftware / viya4-deployment

This project contains Ansible code that creates a baseline in an existing Kubernetes environment for use with the SAS Viya Platform, generates the manifest for an order, and then can also deploy that order into the Kubernetes environment specified.
Apache License 2.0
69 stars 62 forks source link

Why does Crunchy PostgreSQL consume the "pg-storage" sc in RWO mode and not uses the AWS default sc? #516

Closed miaeyg closed 5 months ago

miaeyg commented 6 months ago

When I review the PVCs in my AWS cluster deployed using the IaC + DaC Github projects I see something that looks odd to me:

(I omitted lines from the command output)

[sas@36497430c52a /]$ kubectl -n demo get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE ... sas-crunchy-platform-postgres-00-j498-pgdata Bound pvc-744d3c02-74dd-447c-a817-40243cca10d9 128Gi RWO pg-storage 2d20h sas-crunchy-platform-postgres-repo1 Bound pvc-4bd671e8-8525-41c8-921e-402dcea03f0e 128Gi RWO pg-storage 2d20h ...

The odd thing is that the PVCs for the crunchy postgresql ask for RWO from the "pg-storage" storage class and this seems odd because the "pg-storage" storage class is using the "nfs-subdir-external-provisioner-pg-storage" provisioner which is meant for RWX access modes. If crunchy postgresql needs RWO access mode why isn't it using the default AWS storage class which is "gp2" like all other RWO access modes do?

dhoucgitter commented 5 months ago

Hi @miaeyg, DAC uses the nfs-subdir-external-provisioner to create two separate storageClasses named sas and pg-storage. The pg-storage class was intentionally created with attributes chosen for db use including a Reclaim policy of "Retain" instead of "Delete". The nfs-subdir-external-provisioner supports PVC requests for RWO storage which is the access mode that the sas-crunchy-platform-pg-storage-* PVCs currently use.

miaeyg commented 5 months ago

Thanks @dhoucgitter

Wondering why use an NFS-based (nfs-subdir-external-provisioner) provisioner for the pg-storage class when known in advance it is intended only for RWO access by the crunchy-platform-pg-storage-* PVCs.

Wouldn't it be better to base the pg-storage storage class on a newly created EBS-based storage class having a Reclaim policy of "Retain"?

dhoucgitter commented 5 months ago

Hi @miaeyg, we are currently relying on the nfs-subdir-external-provisioner to create and manage our storage classes using the specified access mode without any issues. However, there has been discussion about the potential deprecation of nfs-subdir-external-provisioner which may have us switching to an alternative in the near future.

miaeyg commented 5 months ago

.ש'ד-

miaeyg commented 5 months ago

OK, Closing