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

[Functions] Pass configured metricsPort to k8s runtime #14502

Merged
merged 1 commit into from
Mar 2, 2022

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Mar 1, 2022

Motivation

PR #9610 made changes in the way that metricsPort is handled in Pulsar Functions Kubernetes Runtime. This broke metrics for Pulsar Functions.

Additional context

There's also an alternative fix #14085 . That PR lacks tests and doesn't handle the case where metrics are disabled by setting metricsPort to an empty value.

Modifications

  • pass metricsPort configured in functionRuntimeFactoryConfigs.metricsPort in functions_worker.yml on to KubernetesRuntime in the InstanceConfig instance since [pulsar-functions] move metricsPort to InstanceConfig #9610 made this change.
  • handle the case where metricsPort is set to an empty value. In this case, don't add the Prometheus scraping annotations.

@lhotari lhotari added type/bug The PR fixed a bug or issue reported a bug area/function labels Mar 1, 2022
@lhotari lhotari self-assigned this Mar 1, 2022
@github-actions
Copy link

github-actions bot commented Mar 1, 2022

@lhotari:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions
Copy link

github-actions bot commented Mar 1, 2022

@lhotari:Thanks for providing doc info!

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

@zzzming
Copy link
Contributor

zzzming commented Mar 1, 2022

LGTM

Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

LGTM

@lhotari lhotari requested a review from zymap March 1, 2022 19:40
@lhotari
Copy link
Member Author

lhotari commented Mar 1, 2022

@freeznet please review

@lhotari lhotari merged commit daed6a0 into apache:master Mar 2, 2022
@lhotari lhotari deleted the lh-pass-metricsPort-to-k8s-runtime branch March 2, 2022 13:00
@codelipenghui codelipenghui added this to the 2.11.0 milestone Mar 3, 2022
codelipenghui pushed a commit that referenced this pull request Mar 9, 2022
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Mar 9, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Mar 9, 2022
(cherry picked from commit daed6a0)
(cherry picked from commit fe90b2c)
codelipenghui pushed a commit that referenced this pull request Mar 12, 2022
@codelipenghui codelipenghui modified the milestones: 2.11.0, 2.10.0 Mar 12, 2022
codelipenghui pushed a commit that referenced this pull request Mar 18, 2022
@codelipenghui codelipenghui added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Mar 18, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/function cherry-picked/branch-2.8 Archived: 2.8 is end of life cherry-picked/branch-2.9 Archived: 2.9 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.4 release/2.9.3 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants