Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ingress usage #349

Merged
merged 8 commits into from
Oct 4, 2022
Merged

Fix ingress usage #349

merged 8 commits into from
Oct 4, 2022

Conversation

sed-i
Copy link
Contributor

@sed-i sed-i commented Sep 2, 2022

(Note: this PR was split out of #340.)

Issue

The self-scrape job is "down" when prometheus is related to traefik.The external hostname is not passed to prom_scrape constructor for the self-scraping endpoint.

Solution

Use external_url in constructing the self-scraping job.

Note: the quality of the solution in this PR is affected by canonical/traefik-k8s-operator#78.

Testing Instructions

Deploy prom and relate to traefik. Then look at prom's /api/v1/targets.

Release Notes

Fix ingress usage.

src/charm.py Outdated Show resolved Hide resolved
@sed-i sed-i marked this pull request as ready for review September 2, 2022 13:58
Base automatically changed from feature/validation-fix-only to main September 5, 2022 23:50
@sed-i sed-i force-pushed the feature/fix-ingress-usage branch from 46a0132 to 3b26882 Compare September 5, 2022 23:58
@sed-i sed-i force-pushed the feature/fix-ingress-usage branch from 3b26882 to 0491636 Compare September 14, 2022 10:00
tests/integration/test_external_url.py Outdated Show resolved Hide resolved
tests/integration/test_external_url.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
Fix reload under ingress

Add positive assertion

Do not use star notation for the self-scrape job

Pass external hostname to MetricsEndpointProvider

Fix reload

Use update-status ass the refresh event

Add test stubs
@sed-i sed-i force-pushed the feature/fix-ingress-usage branch from b5846c1 to 6e9d4b5 Compare September 29, 2022 21:55
@sed-i sed-i requested review from dstathis and removed request for balbirthomas October 1, 2022 06:05
@sed-i sed-i merged commit 04430af into main Oct 4, 2022
@sed-i sed-i deleted the feature/fix-ingress-usage branch October 4, 2022 20:53
)

def setUp(self):
metadata_file = open("metadata.yaml")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is dependent on the invocation directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants