-
Couldn't load subscription status.
- Fork 27
TLS on Patroni REST API #33
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
Conversation
Codecov Report
@@ Coverage Diff @@
## tls-integration-test #33 +/- ##
========================================================
+ Coverage 60.62% 60.67% +0.04%
========================================================
Files 6 6
Lines 795 801 +6
Branches 123 123
========================================================
+ Hits 482 486 +4
- Misses 285 287 +2
Partials 28 28
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
| Whether TLS is enabled/disabled on Patroni REST API. | ||
| """ | ||
| unit_address = get_unit_address(ops_test, unit_name) | ||
| tls_ca = await get_tls_ca(ops_test, unit_name) |
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.
Could you return False here if not tls_ca?
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.
Yes, I'll add it.
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.
Added on 334a50d.
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.
Looks awesome
| planned_units: number of units planned for the cluster | ||
| superuser_password: password for the operator user | ||
| replication_password: password for the user used in the replication | ||
| tls_enabled: whether TLS is enabled |
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.
nit add verify
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.
This specific parameter is related to whether TLS is already enabled or not, different from the tests, where we have parameters related to verify whether TLS is enabled.
|
|
||
| # The CA bundle file is used to validate the server certificate when | ||
| # TLS is enabled, otherwise True is set because it's the default value | ||
| # for the verify parameter. |
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.
excellent commenting
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.
Thanks Mia!
* Add workaround for Patroni REST API TLS * Improve TLS status retrieval * Readd checks * Add additional check
Issue
Solution
Context
REPLICATINGwhat was already reviewed on TLS on Patroni REST API postgresql-k8s-operator#38 to the PostgreSQL VM charm.FOCUSyour review on them):tests/integration/helpers.pyandtests/integration/test_tls.py: new checks to ensure the API is accepting TLS connections and differently from the k8s charm now we use the TLS CA to verify the server certificate.Testing
Release Notes