8000 Allow Zync Database to be configured as an external database on the operator by miguelsorianod · Pull Request #489 · 3scale/3scale-operator · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allow Zync Database to be configured as an external database on the operator #489

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

Merged
merged 3 commits into from
Oct 13, 2020

Conversation

miguelsorianod
Copy link
Contributor
@miguelsorianod miguelsorianod commented Oct 8, 2020

This PR intends to allow Zync Database to be configured externally.

Currently it does so by adding a field .spec.highAvailability.externalZyncDatabaseEnabled, whose value (true or false) only takes effect when spec.highAvailability.enabled is set to true. This implies that with this implementation the only way to set an external zync database is by enabling the other ones to be external too. We can discuss whether we want that to happen or be more granular, taking into account the implications.
The reason why behavior of the existing spec.highAvailability.Enabled has not been changed to include external zync database is because doing that would break current users deployments (thus why another different new optional parameter is needed)

When the zync database is configured externally:

  • The zync-database-postgresql ImageStream is not created anymore
  • The zync-database DeploymentConfig is not created anymore
  • The zync-database Service is not created anymore

This is an operator-only functionality.

The possibility of splitting the internal zync database specific components into its own component has been evaluated but to simplify the number of changes needed and diminish the impact on templates side that approach has not been followed.

Let's iterate from here.

  • Add unit tests
  • Add documentation

@miguelsorianod miguelsorianod requested a review from eguzki October 8, 2020 11:48
@miguelsorianod miguelsorianod force-pushed the allow-external-zync-db-on-operator branch 2 times, most recently from 207bcd3 to 9488701 Compare October 8, 2020 12:41
@eguzki
Copy link
Member
eguzki commented Oct 8, 2020

Looking good so far

@miguelsorianod miguelsorianod force-pushed the allow-external-zync-db-on-operator branch from 9488701 to 4f96390 Compare October 8, 2020 17:16
@miguelsorianod
Copy link
Contributor Author
miguelsorianod commented Oct 8, 2020

Added unit tests and documentation.

Ready for a review @eguzki.

Pending doing some local testing with internal DBs configured before merging the PR.

@miguelsorianod miguelsorianod marked this pull request as ready for review October 8, 2020 17:16
@miguelsorianod miguelsorianod changed the title [WIP] Allow Zync Database to be configured as an external database on the operator Allow Zync Database to be configured as an external database on the operator Oct 8, 2020
@miguelsorianod miguelsorianod force-pushed the allow-external-zync-db-on-operator branch from 4f96390 to 3c9d2e5 Compare October 9, 2020 09:42
@miguelsorianod
Copy link
Contributor Author
miguelsorianod commented Oct 9, 2020

I've tried in a local ocp cluster the following:

  • Create apimanager without setting HA
  • Create apimanager with HA without setting externalzync
  • Create apimanager with HA setting externalzync too
  • Create apimanager without HA setting externalzync enabled

And the expected elements seem to be created / not created accordingly to each scenario. QE testing will help us with testing it with real external DBs endpoints available and content.

To me I think this is ready @eguzki

@miguelsorianod miguelsorianod force-pushed the allow-external-zync-db-on-operator branch 2 times, most recently from 178cdf4 to 19eb741 Compare October 9, 2020 12:30
@miguelsorianod miguelsorianod force-pushed the allow-external-zync-db-on-operator branch from 19eb741 to 19a571c Compare October 13, 2020 09:00
@codeclimate
Copy link
codeclimate bot commented Oct 13, 2020

Code Climate has analyzed commit 19a571c and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 3
Style 1

View more on Code Climate.

@miguelsorianod miguelsorianod merged commit 5ab55bb into master Oct 13, 2020
@miguelsorianod miguelsorianod deleted the allow-external-zync-db-on-operator branch October 13, 2020 09:42
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
0