projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug 1560 to ensure that OSM is healthy after installation
[osm/devops.git]
/
installers
/
charm
/
prometheus
/
src
/
pod_spec.py
diff --git
a/installers/charm/prometheus/src/pod_spec.py
b/installers/charm/prometheus/src/pod_spec.py
index
541cf3e
..
202114e
100644
(file)
--- a/
installers/charm/prometheus/src/pod_spec.py
+++ b/
installers/charm/prometheus/src/pod_spec.py
@@
-95,6
+95,7
@@
def _validate_data(config_data: Dict[str, Any], relation_data: Dict[str, Any]) -
"tls_secret_name": lambda value, _: isinstance(value, str)
if value is not None
else True,
"tls_secret_name": lambda value, _: isinstance(value, str)
if value is not None
else True,
+ "enable_web_admin_api": lambda value, _: isinstance(value, bool),
}
relation_validators = {}
problems = []
}
relation_validators = {}
problems = []
@@
-307,9
+308,7
@@
def _make_pod_command(config: Dict[str, Any], port: int) -> List[str]:
Returns:
List[str]: command to startup the process.
"""
Returns:
List[str]: command to startup the process.
"""
- return [
- "sh",
- "-c",
+ command = [
"/bin/prometheus",
"--config.file=/etc/prometheus/prometheus.yml",
"--storage.tsdb.path=/prometheus",
"/bin/prometheus",
"--config.file=/etc/prometheus/prometheus.yml",
"--storage.tsdb.path=/prometheus",
@@
-320,6
+319,9
@@
def _make_pod_command(config: Dict[str, Any], port: int) -> List[str]:
port, config.get("web_subpath")
),
]
port, config.get("web_subpath")
),
]
+ if config.get("enable_web_admin_api"):
+ command.append("--web.enable-admin-api")
+ return command
def make_pod_spec(
def make_pod_spec(