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

feat: external calculation via gRPC servers #4859

Closed
wants to merge 21 commits into from

Conversation

gauron99
Copy link
Contributor

@gauron99 gauron99 commented Aug 3, 2023

STATUS

ready to be worked on prerequisite PR merged.

this PR is a follow up for this. Both of these are part of the Parent PR that Ive separated into 2 for easier and more clear reviews etc.

gRPC servers summary

this PR implements new way to manipulate/alter/ external metrics.
Each server has:

  • its own url to connect to where gRPC server is running with pre-defined .proto structure (KEDA is gRPC client that will try to connect)
  • optional security certificate directory (user gives certificate directory - similar to metrics server certificate)
  • needs to have unique name (this is mandatory, last grpc server can be used in formula for further manipulation same as a trigger)
  • timeout to initially connect

explanation

proto file exists in pkg/externalscaling/api which describes the structure of following generated KEDA client side for gRPC and is the base for the gRPC server that user can implement.
If this server is implemented, structure in SO is defined and KEDA successfully connects - this feature implements possibility for user to use defined external triggers, send them to this server where they can manipulate them however they want and return whatever they want in the same structure. This structure is converted to the one KEDA uses ([]external_metrics.ExternalMetricValue) and simply returns the metrics, passing it to HPA. (possibly through formula and then passing it to HPA if defined)

possible struct view in SO

struct name is to be determined

advanced:
 modifiers:
  target: "2"
  formula: "xxx"
  external:
  - name: grpc_one
    url: localhost:7999
    timeout: 10
  - name: grpc_two
    url: localhost:8000
    timeout: 1m12s

Checklist

Closes #4583

gauron99 added 21 commits July 19, 2023 14:10
Signed-off-by: gauron99 <[email protected]>
…ne scaling logic for external calculator list

Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

Thank you for your contribution! 🙏 We will review your PR as soon as possible.

🏖️ Over the summer, the response time will be longer than usual due to maintainers taking time off so please bear with us.

While you are waiting, make sure to:

Learn more about:

@tomkerkhove
Copy link
Member

Any update on this? If we don't hear back in the near future we'd likely need to close this PR

@gauron99
Copy link
Contributor Author

I have rebased part of what needs to be rebased. its not complete but more pressing issues were at hand. I was told its not exactly a wanted issue but would be nice to have ready. If youd like this to be implemented I can up the priority.
Or if not at all feel free to close it

Copy link

stale bot commented Mar 19, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Mar 19, 2024
Copy link

stale bot commented Mar 30, 2024

This issue has been automatically closed due to inactivity.

@stale stale bot closed this Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale All issues that are marked as stale due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants