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

[pulsar-functions] Add maximum allowed amount of resources setting for functions #9584

Merged
merged 2 commits into from
Feb 16, 2021

Conversation

fantapsody
Copy link
Contributor

Motivation

The pulsar cluster may not allow users to request an arbitrary amount of resources for functions for various reasons, like quotas, limited physical resources, etc. And it's better to check the function creation requests and explicitly reject those of which the resources requested are greater than allowed.

Modifications

Add a worker config to set the maximum amount of resource a function must request

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Added unit tests to verify the configurations and checks.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

A sample configuration has been added to conf/functions_worker.yml.

@sijie
Copy link
Member

sijie commented Feb 15, 2021

@freeznet @nlu90 can you review this pull request?

@sijie sijie added this to the 2.8.0 milestone Feb 15, 2021
@sijie sijie added the type/feature The PR added a new feature or issue requested a new feature label Feb 15, 2021
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.

Very useful

LGTM

@codelipenghui codelipenghui merged commit 2d458f7 into apache:master Feb 16, 2021
Copy link
Member

@nlu90 nlu90 left a comment

Choose a reason for hiding this comment

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

LGTM

@fantapsody fantapsody deleted the func-max-res branch February 17, 2021 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/function type/feature The PR added a new feature or issue requested a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants