Skip to content

Commit

Permalink
Merge pull request #34 from onesteinbv/16.0-fix-argocd_website
Browse files Browse the repository at this point in the history
[FIX] argocd_website: Fix to use domain based on applications config file for checking status
  • Loading branch information
ByteMeAsap authored Apr 16, 2024
2 parents e155b85 + 5a11ff9 commit 23c2f13
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion argocd_website/models/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from datetime import timedelta

import requests
import yaml
from yaml import Loader

from odoo import _, fields, models
from odoo.exceptions import MissingError, ValidationError
Expand Down Expand Up @@ -30,7 +32,9 @@ def _compute_access_url(self):
def check_health(self):
self.ensure_one()
try:
res = requests.get("https://" + self.domain)
config = yaml.load(self.config, Loader=Loader)
helm = yaml.load(config["helm"], Loader=Loader)
res = requests.get("https://%s" % self._get_domain(helm))
except Exception:
return False
return res.ok
Expand Down

0 comments on commit 23c2f13

Please sign in to comment.