Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

disable k8s controller-runtime manager metrics server #492

Merged
merged 2 commits into from
Oct 11, 2022

Conversation

hamersaw
Copy link
Contributor

@hamersaw hamersaw commented Oct 10, 2022

TL;DR

In networking setups where k8s requires Pods serving webhooks to have hostNetwork: true deployments may suffer "unable to bind address :8080" in the flyte-pod-webhook deployment. This is because both flytepropeller and the pod-webhook pods use the k8s controller-runtime manager internally to manager k8s informers, caches, etc. A component of the controller-runtime manager is the metrics server, which serves prometheus metrics. In the above scenario, if the flytepropeller and pod-webhook pods are deployed on the same host there will be collisions. This PR disables the controller-runtime manager metrics server.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

^^^

Tracking Issue

fixes flyteorg/flyte#2974

Follow-up issue

flyteorg/flyte#2975 - we should serve the k8s controller-runtime manager metrics using FlytePropellers existing prometheus endpoint by using a separate registry.

@codecov
Copy link

codecov bot commented Oct 10, 2022

Codecov Report

Merging #492 (5a004ba) into master (a9b831b) will not change coverage.
The diff coverage is n/a.

@hamersaw hamersaw merged commit f0eef3f into master Oct 11, 2022
@hamersaw hamersaw deleted the feature/disable-k8s-metrics-server branch October 11, 2022 15:24
Ln11211 pushed a commit to Ln11211/flytepropeller that referenced this pull request Oct 18, 2022
* setting MetricsBindAddress to 0 to disable controller-runtime manager metrics server

Signed-off-by: Daniel Rammer <[email protected]>

* and now in the webhook

Signed-off-by: Daniel Rammer <[email protected]>

Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Ln11211 <[email protected]>
hamersaw added a commit that referenced this pull request Oct 24, 2022
* Update config.go

Set the default values to 0

Signed-off-by: LN <[email protected]>
Signed-off-by: Ln11211 <[email protected]>

* disable k8s controller-runtime manager metrics server (#492)

* setting MetricsBindAddress to 0 to disable controller-runtime manager metrics server

Signed-off-by: Daniel Rammer <[email protected]>

* and now in the webhook

Signed-off-by: Daniel Rammer <[email protected]>

Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Ln11211 <[email protected]>

* fix: Add servicename in certs (#491)

Before:
A hardcoded string was used for setting the secret namespace

After:
The value for the secret namespace for settings is grabbed dynamically.

Signed-off-by: Francisco J. Solis <[email protected]>

Signed-off-by: Francisco J. Solis <[email protected]>
Co-authored-by: Dan Rammer <[email protected]>
Signed-off-by: Ln11211 <[email protected]>

* Update config.go

Removed DefaultDeadlines

Signed-off-by: Ln11211 <[email protected]>

Signed-off-by: LN <[email protected]>
Signed-off-by: Ln11211 <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Francisco J. Solis <[email protected]>
Co-authored-by: Dan Rammer <[email protected]>
Co-authored-by: Francisco J. Solis <[email protected]>
eapolinario pushed a commit to eapolinario/flytepropeller that referenced this pull request Aug 9, 2023
* setting MetricsBindAddress to 0 to disable controller-runtime manager metrics server

Signed-off-by: Daniel Rammer <[email protected]>

* and now in the webhook

Signed-off-by: Daniel Rammer <[email protected]>

Signed-off-by: Daniel Rammer <[email protected]>
eapolinario pushed a commit to eapolinario/flytepropeller that referenced this pull request Aug 9, 2023
* Update config.go

Set the default values to 0

Signed-off-by: LN <[email protected]>
Signed-off-by: Ln11211 <[email protected]>

* disable k8s controller-runtime manager metrics server (flyteorg#492)

* setting MetricsBindAddress to 0 to disable controller-runtime manager metrics server

Signed-off-by: Daniel Rammer <[email protected]>

* and now in the webhook

Signed-off-by: Daniel Rammer <[email protected]>

Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Ln11211 <[email protected]>

* fix: Add servicename in certs (flyteorg#491)

Before:
A hardcoded string was used for setting the secret namespace

After:
The value for the secret namespace for settings is grabbed dynamically.

Signed-off-by: Francisco J. Solis <[email protected]>

Signed-off-by: Francisco J. Solis <[email protected]>
Co-authored-by: Dan Rammer <[email protected]>
Signed-off-by: Ln11211 <[email protected]>

* Update config.go

Removed DefaultDeadlines

Signed-off-by: Ln11211 <[email protected]>

Signed-off-by: LN <[email protected]>
Signed-off-by: Ln11211 <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Francisco J. Solis <[email protected]>
Co-authored-by: Dan Rammer <[email protected]>
Co-authored-by: Francisco J. Solis <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] flyte-pod-webhook bind address already in use on startup
2 participants