Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cadence): Preliminary PostgreSQL support #1172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

richardlarocque
Copy link

Updates the chart to better support a PostgreSQL backend.

This commit does not provide feature parity with existing Cassandra or
MySQL support. The chart has options to spin up a MySQL or Cassandra
instance and configure it for you. This commit offers nothing
equivalent for Postgres; if you want to use a Postgres backend you must
provision and configure it yourself.

More specifically, we assume that:

  • The Postgres service is up and running.
  • The cadence user and its password are configured.
  • The databases cadence and cadence_visibility exist and are
    accessible by the cadence user.
    (This assumes default names are used. Adjust accordingly if you're
    using different names.)

As long as those requirements are met, the jobs for "schema setup" and
"schema update" should work just as they would for the MySQL backend.
The option to disable either job through the "schema.setup.enabled"
and "schema.update.enabled" values remains as before.

The changes to support this new behavior are very minor. We simply
remove an overly strict "if mysql" check in the setup job and add an
postgres implementation for the update job.


Q A
Bug fix? no
New feature? yes
API breaks? no (some behavior is changed, but it is very unlikely anyone would notice or care)
Deprecations? no
Related tickets N/A
License Apache 2.0

Checklist

  • Code meets the Developer Guide
  • User guide and development docs updated (if needed)
  • Related Helm chart(s) updated (if needed)

Updates the chart to better support a PostgreSQL backend.

This commit does not provide feature parity with existing Cassandra or
MySQL support.  The chart has options to spin up a MySQL or Cassandra
instance and configure it for you.  This commit offers nothing
equivalent for Postgres; if you want to use a Postgres backend you must
provision and configure it yourself.

More specifically, we assume that:
- The Postgres service is up and running.
- The `cadence` user and its password are configured.
- The databases `cadence` and `cadence_visibility` exist and are
  accessible by the `cadence` user.
(This assumes default names are used.  Adjust accordingly if you're
using different names.)

As long as those requirements are met, the jobs for "schema setup" and
"schema update" should work just as they would for the MySQL backend.
The option to disable either job through the "schema.setup.enabled"
and "schema.update.enabled" values remains as before.

The changes to support this new behavior are very minor.  We simply
remove an overly strict "if mysql" check in the setup job and add an
postgres implementation for the update job.
@richardlarocque
Copy link
Author

I admit that this change is lightly tested and my knowledge of helm is not great. I present this PR without strong confidence that it is as solid as it could be.

But I'm pretty sure it is an improvement on the current chart, so I wanted to at least make it available for inclusion in upstream, if desired.

@sagikazarmark
Copy link
Member

Thanks @richardlarocque !

I'll review it as soon as I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants