projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Workaround for Charmcraft Display Bug
[osm/devops.git]
/
installers
/
charm
/
mysqld-exporter
/
src
/
charm.py
diff --git
a/installers/charm/mysqld-exporter/src/charm.py
b/installers/charm/mysqld-exporter/src/charm.py
index
91be02a
..
153dbfd
100755
(executable)
--- a/
installers/charm/mysqld-exporter/src/charm.py
+++ b/
installers/charm/mysqld-exporter/src/charm.py
@@
-185,9
+185,9
@@
class MysqlExporterCharm(CharmedOsmBase):
self._check_missing_dependencies(config)
data_source = (
self._check_missing_dependencies(config)
data_source = (
- config.mysql_uri.replace("mysql://", "").split("/")[0]
+ f'{config.mysql_uri.replace("mysql://", "").replace("@", "@(").split("/")[0]})/'
if config.mysql_uri
if config.mysql_uri
- else f"root:{self.mysql_client.root_password}@
{self.mysql_client.host}:{self.mysql_client.port}
"
+ else f"root:{self.mysql_client.root_password}@
({self.mysql_client.host}:{self.mysql_client.port})/
"
)
# Create Builder for the PodSpec
)
# Create Builder for the PodSpec
@@
-209,7
+209,7
@@
class MysqlExporterCharm(CharmedOsmBase):
config.image_pull_policy,
run_as_non_root=config.security_context,
)
config.image_pull_policy,
run_as_non_root=config.security_context,
)
- container_builder.add_port(name=
self.app.name
, port=PORT)
+ container_builder.add_port(name=
"exporter"
, port=PORT)
container_builder.add_http_readiness_probe(
path="/api/health",
port=PORT,
container_builder.add_http_readiness_probe(
path="/api/health",
port=PORT,