Add healthcheck http url

Add healthcheck http url for service checks.

Change-Id: I84cc6f9c0027418d17fffcb24bfadcce4fd558ff
This commit is contained in:
Hemanth Nakkina 2022-09-21 16:03:17 +05:30 committed by Hemanth N
parent 6f145e5a1f
commit 61784f64b9

View File

@ -199,6 +199,12 @@ class GlanceOperatorCharm(sunbeam_charm.OSBaseOperatorAPICharm):
def default_public_ingress_port(self):
return 9292
@property
def healthcheck_http_url(self) -> str:
"""Healthcheck HTTP URL for the service."""
# / returns 300 and /versions return 200
return f'http://localhost:{self.default_public_ingress_port}/versions'
def has_local_storage(self) -> bool:
"""Returns whether the application has been deployed with local
storage or not.