Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Helm/dev-portal/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: dev-portal
description: A Helm chart for Rodeo Api gateway dev portal
description: A Helm chart for MeteoGate Api gateway dev portal

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -15,14 +15,14 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: "1.15.1"
version: "1.15.2"


# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.11.0"
appVersion: "1.11.1"
sources:
- https://github.com/EUMETNET/Dev-portal/
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion Helm/dev-portal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The following table lists the configurable parameters of the Smartmetserver char
| `backend.config.keycloak_cluster_url` | URL for the Keycloak service | `http://keycloak.keycloak.svc.cluster.local` |
| `backend.config.status_check.max_attempts` | Maximum attemps per service check | `5` |
| `backend.config.status_check.retry_delay` | Delay (seconds) between retries | `2` |
| `backend.config.status_check.cache_ttl` | Status cache TTL (seconds) | `30` |
| `backend.config.status_check.cache_ttl` | Status cache TTL (seconds) | `240` |
| `backend.config.status_services` | List of external services to monitor | See values.yaml |
| `backend.secrets.secretName` | Name of a existing secret for the backend. If empty, one is created| `""` |
| `backend.secrets.vault_url` | URL for the Vaul service | `http://vault.vault.svc.cluster.local:8200` |
Expand Down
2 changes: 1 addition & 1 deletion Helm/dev-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ backend:
status_check:
max_attempts: 5
retry_delay: 2
cache_ttl: 30
cache_ttl: 240
status_services:
- name: "MeteoGate Website"
url: "https://meteogate.eu/"
Expand Down
4 changes: 2 additions & 2 deletions backend/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ server:
log_level: "DEBUG"
allowed_origins: ["*"]
status:
max_attempts: 3
max_attempts: 5
retry_delay: 2
cache_ttl: 30
cache_ttl: 240
services:
- name: "MeteoGate Website"
url: "https://meteogate.eu/"
Expand Down
4 changes: 2 additions & 2 deletions backend/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ class StatusServiceSettings(BaseSettings):
class StatusSettings(BaseSettings):
"""Status monitoring settings."""

max_attempts: int = 3
max_attempts: int = 5
retry_delay: int = 2
cache_ttl: int = 30
cache_ttl: int = 240
services: list[StatusServiceSettings] = []


Expand Down
4 changes: 3 additions & 1 deletion backend/app/services/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from app.models.status import ServiceHealth, ServiceStatus
from app.models.response import StatusResponse

MAX_RETRY_DELAY = 8

config = settings()

MAX_ATTEMPTS = config.status.max_attempts
Expand Down Expand Up @@ -56,7 +58,7 @@ async def check_http_service(
last_error = str(e)

if attempt < max_attempts:
delay = retry_delay**attempt
delay = min(retry_delay**attempt, MAX_RETRY_DELAY)
logger.debug(
"Retry %d/%d for %s: %s (next retry in %ds)",
attempt,
Expand Down
Loading