-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add system's PostgreSQL compatibility #129
Conversation
bef5352
to
99e11df
Compare
I think this PR is done. Just a remark that I already commented with @guicassolato, when running PostgreSQL the following errors and warnings have been observed in the system-app pre-hook pod:
But the pod apparently is able to finish and the PostgreSQL database seems to be populated. After commenting it with @guicassolato it seems that those errors and warnings are not a problem apparently, it's just rails tat tries to perform some tests when starting for which don't has permissions. Can you confirm it? If not, the only concern here that we should take into account is that those messages might be confusing for the user that reads the logs. |
The reason why it works despite of the error is because the database already exists. We are setting There's a special case where the customer wants to use a given PostgreSQL instance where taking the default db for system is not an option and/or for any other reason the Rails application needs to create system db in the first deploy. In these cases, the customer may need to modify
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I successfully tested the PostgreSQL template amp-postgresql.yml
included here and a custom-generated version amp-postgresql-eval-s3.yml
locally and onto our ocp/devel cluster respectively.
Thank you Gui. I tested locally too but it is good to have another tester 👍 |
Because we now we potentially have two different PostgreSQL databases we renamed the POSTGRESQL_IMAGE to ZYNC_DATABASE_IMAGE to only set the PostgreSQL database for Zync Database
Because we now might have potentially two PostgreSQL databases we specify a little bit more the description and displayName of the parameter ZYNC_DATABASE_PASSWORD.
Move System's MySQL ImageStream object into the SystemMySQLImage component. This allows us to be able to instantiate only the MySQL ImageStream when desired. This is needed to be able to optionally deploy it. For example, when System's PostgreSQL is used we should not deploy the System's MySQL ImageStream. The MYSQL_IMAGE parameter has also been renamed into SYSTEM_DATABASE_IMAGE
Renamed MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE and MYSQL_ROOT_PASSWORD chaning the 'MYSQL' prefix by the 'SYSTEM_DATABASE' prefix, making use of the same prefix than the parameters used when PostgreSQL is used
99e11df
to
d7e6f8b
Compare
This commit also contains the addition of the new amp-postgresql template.
d7e6f8b
to
5340351
Compare
Code Climate has analyzed commit 5340351 and detected 90 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
This PR adds the ability to use PostgreSQL as the System's database when using the Operator.
It also contains implementation to support it in the templates but we still have to decide whether we are going to support it there. I tried to split the commits so we can more easily remove that part of the functionality in case we don't need this functionality into the templates.
Changes performed: