k8sgpt-ai / k8sgpt-operator

Automatic SRE Superpowers within your Kubernetes cluster
https://k8sgpt.ai
Apache License 2.0
314 stars 89 forks source link

[Feature]: add interval on ai backend request #419

Open JuHyung-Son opened 6 months ago

JuHyung-Son commented 6 months ago

Checklist

Is this feature request related to a problem?

No

Problem Description

No response

Solution Description

add ai backend request interval. if set, Sends requests to the AI backend server at set intervals, independent of the reconciler loop. this interval should be equal or higher than reconciliation's requeue interval.

Benefits

More control over ai backend requests.

Potential Drawbacks

No response

Additional Information

No response

arbreezy commented 6 months ago

@JuHyung-Son I think we should move this to the operator's repo, right ?

JuHyung-Son commented 6 months ago

oh right i will move this

arbreezy commented 6 months ago

@VaibhavMalik4187 would you like to assign it to you ?

VaibhavMalik4187 commented 6 months ago

@VaibhavMalik4187 would you like to assign it to you ?

Yes please

VaibhavMalik4187 commented 6 months ago

@arbreezy, @JuHyung-Son, I've been working on this issue but I have a few questions.

  1. Why not just adjust the existing reconcile interval based on the interval value received from the user?
  2. Is there any specific reason behind keeping the interval equal to or longer than the existing reconcile interval?
JuHyung-Son commented 6 months ago

good questions!

  1. Because reconcile does lots of things. like create new deployments, read k8sgpt crd, k8sgpt analyze ... and we want to add llm backend request interval. so it should be seperated. it will make problem if reconcile interval is 1 hour.
  2. llm request should be called after reconciler execute k8sgpt analyze.
VaibhavMalik4187 commented 6 months ago

good questions!

1. Because reconcile does lots of things. like create new deployments, read k8sgpt crd, k8sgpt analyze ... and we want to add llm backend request interval. so it should be seperated. it will make problem if reconcile interval is 1 hour.

2. llm request should be called after reconciler execute k8sgpt analyze.

Understood, thanks for the detailed answers.