geerlingguy / tower-operator

DEPRECATED: This project was moved and renamed to: https://github.com/ansible/awx-operator
82 stars 34 forks source link

Be able to configure a storage class for postgres #14

Closed fstern closed 4 years ago

fstern commented 4 years ago

Hi,

To use a specific storage class for the postgres pod, I've added a variable to the respective template.

geerlingguy commented 4 years ago

Makes sense; this is a good feature to have as I typically have a 'fast' or 'io1' storage class on prod clusters set up specifically to use the fastest SSD-backed storage possible for databases.

geerlingguy commented 4 years ago

I've pushed a follow-up commit that uses storageClassName, since according to this doc for PVs, the annotation is deprecated and will be removed in a future Kubernetes release.

I also changed the behavior a little; I default the variable to an empty string (''), and only set the parameter in the PV's spec if it is not empty.