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
71 stars 64 forks source link

Update ansible-vars-iac.yaml to include Postgres #146

Closed GonzaloUlla closed 3 years ago

GonzaloUlla commented 3 years ago

Per CONFIG-VARS.md#postgres, V4_CFG_POSTGRES_SERVERS is required.

Adding an internal: true example configuration to ansible-vars-iac.yaml

thpang commented 3 years ago

That is incorrect. The value is pulled from the IAC terraform.tfstate file here, There should be no value. If it's passed from IAC it'll use the external DB. If it's not provided, then it'll be crunchy that gets setup. However, you need to add the entry as the documentation states.

GonzaloUlla commented 3 years ago

If it's not provided, then it'll be crunchy that gets setup.

Actually, if Postgres default.internal key is not provided, the Ansible task fails.

Check issue #147

thpang commented 3 years ago

I see your point here; however, if you've chosen not to setup an external database the docs do say you need the entry. It's just they, or in this case you, have not added that entry. Having the default value you suggest is not always correct.

GonzaloUlla commented 3 years ago

Whether you choose to setup an external database or not, you always need to set the default and default.internal elements, per CONFIG-VARS.md#postgres

If those entries were not provided, why not assume it is intended to use crunchy instead of failing?

Leaving an empty line after ## Postgres in ansible-vars-iac.yaml#L25 and not defining a default behavior, it's error-prone. Example files should work out of the box IMHO.