reactive-tech / kubegres

Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql instances and manage databases replication, failover and backup.
https://www.kubegres.io
Apache License 2.0
1.32k stars 74 forks source link

issues#72 Support overwrite liveness and readiness configuration #75

Closed owenchenxy closed 2 years ago

alex-arica commented 2 years ago

Thank you for the PR. It looks good!

We need 2 more changes so that it is ready for production:

owenchenxy commented 2 years ago

Thank you for the PR. It looks good!

We need 2 more changes so that it is ready for production:

  • the file ResourcesCreatorFromTemplate contains the logics used the first time a cluster of Posgres is created when applying a YAML file of "kind: Kubegres". Please add the logics to assign the new properties from that YAML to the newly created StatefulSets, at the end of the method initStatefulSet
  • Please add 2 test files for LivenessProbeSpecEnforcer and ReadinessProbeSpecEnforcer. You can use the examples available in other test files such as spec_resource_test . Note that when running your new tests, you can uncomment //Skip("Temporarily skipping test") in other test files so that you only run your new tests. Otherwise, it will take over 1h to run all other tests and it will slow down your progress. Once your tests pass, you can submit the PR.

Hi Alex,

I added these required change in the new commit. there are two tests for livenessProbe and readinessProbe. They all passed. Please review the PR and let me know if there is still works to be done.

alex-arica commented 2 years ago

Thank you! I merged your changes in the main branch. This Thursday, I will run some tests locally and if everything is working fine, Kubegres version 1.15 will be released in prod with your changes.