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

coordinator: make metrics endpoint configurable #491

Merged
merged 1 commit into from
May 29, 2024

Conversation

davidweisse
Copy link
Contributor

@davidweisse davidweisse commented May 23, 2024

This makes the Coordinator metrics endpoint configurable via an environment variable. If CONTRAST_METRICS_PORT is set, the metrics server will start on that port. If the variable is not set, the metrics server will not start.

For CI, the endpoint is activated through the PatchCoordinatorMetrics function.

@davidweisse davidweisse added the changelog PRs that should be part of the release notes label May 23, 2024
Copy link

github-actions bot commented May 23, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-05-29 12:41 UTC

@CLAassistant
Copy link

CLAassistant commented May 26, 2024

CLA assistant check
All committers have signed the CLA.

@davidweisse davidweisse force-pushed the feat/coordinator-optional-metrics branch 2 times, most recently from 018ed18 to 83fb938 Compare May 27, 2024 08:06
internal/kuberesource/sets.go Outdated Show resolved Hide resolved
internal/kuberesource/sets.go Outdated Show resolved Hide resolved
internal/kuberesource/sets.go Outdated Show resolved Hide resolved
internal/kuberesource/sets.go Outdated Show resolved Hide resolved
@katexochen katexochen removed their request for review May 27, 2024 08:30
@davidweisse davidweisse force-pushed the feat/coordinator-optional-metrics branch from 83fb938 to 4864464 Compare May 27, 2024 08:50
@davidweisse davidweisse requested a review from katexochen as a code owner May 27, 2024 08:50
coordinator/main.go Outdated Show resolved Hide resolved
@davidweisse davidweisse force-pushed the feat/coordinator-optional-metrics branch from 4864464 to c34e4b3 Compare May 27, 2024 11:06
@davidweisse davidweisse requested a review from burgerdev May 27, 2024 12:16
@@ -96,6 +96,7 @@ func (ct *ContrastTest) Init(t *testing.T, resources []any) {
resources = kuberesource.PatchImages(resources, ct.ImageReplacements)
resources = kuberesource.PatchNamespaces(resources, ct.Namespace)
resources = kuberesource.PatchServiceMeshAdminInterface(resources, 9901)
resources = kuberesource.PatchCoordinatorMetrics(resources, 9102)
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about patching this within contrasttest. We might want to add a test case where we disable the metrics endpoint to check it is actually not reachable. Same for the envoy admin iface or other config things. Any thoughts on this @burgerdev ?

Anyway, nothing we must address in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree: we should eventually test these scenarios, but until then we can leave it here.

@davidweisse davidweisse force-pushed the feat/coordinator-optional-metrics branch from c34e4b3 to 0c5d008 Compare May 29, 2024 11:33
@davidweisse davidweisse force-pushed the feat/coordinator-optional-metrics branch from 0c5d008 to a4a73d9 Compare May 29, 2024 12:30
@davidweisse davidweisse merged commit 6e80c05 into main May 29, 2024
9 checks passed
@davidweisse davidweisse deleted the feat/coordinator-optional-metrics branch May 29, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog PRs that should be part of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants