-
Notifications
You must be signed in to change notification settings - Fork 18
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
[DPE-1993] Patroni COS #261
Conversation
Codecov Report
@@ Coverage Diff @@
## main #261 +/- ##
==========================================
+ Coverage 78.92% 78.98% +0.06%
==========================================
Files 10 10
Lines 2149 2151 +2
Branches 349 349
==========================================
+ Hits 1696 1699 +3
+ Misses 383 381 -2
- Partials 70 71 +1
|
self.on[PEER].relation_changed, | ||
self.on.secret_changed, | ||
self.on.secret_remove, |
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.
certificates
rel events don't guarantee that the scheme will switch, so we update on events that can potentially change or remove the certs
templates/patroni.yml.j2
Outdated
@@ -19,7 +19,7 @@ log: | |||
file_size: 600 | |||
|
|||
restapi: | |||
listen: '{{ self_ip }}:8008' | |||
listen: '0.0.0.0:8008' |
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.
So that we can connect from localhost.
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 think it will produce issues with juju spaces once we are ready.
Anyway LGTM for now.
@delgod any security concerns here?
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.
Sounds like it's OK to scrape by self_ip so reverting that change.
templates/patroni.yml.j2
Outdated
@@ -19,7 +19,7 @@ log: | |||
file_size: 600 | |||
|
|||
restapi: | |||
listen: '{{ self_ip }}:8008' | |||
listen: '0.0.0.0:8008' |
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 think it will produce issues with juju spaces once we are ready.
Anyway LGTM for now.
@delgod any security concerns here?
src/charm.py
Outdated
return [ | ||
{ | ||
"metrics_path": "/metrics", | ||
"static_configs": [{"targets": ["localhost:8008"]}], |
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.
why not {{ self_ip }} here instead of localhost? :-)
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.
It should work, but last time we discussed that, I think COS preferred to only scrape localhost. I'll ping them on MM to recheck.
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.
Sounds like it's OK to do that. Retested locally and all seems to be in order.
bc75919
to
7a47678
Compare
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.
LGTM!
* Add Patroni COS integration * Bump libs * Unit tests * Scrape IP instead of localhost * Fix unit tests * Increase upgrade timout * Bump libs * Revert data_interfaces
Add Patroni COS dashboard and configuration.