k8sgpt-operator icon indicating copy to clipboard operation
k8sgpt-operator copied to clipboard

[Feature]: manual restart of k8sgpt-deployment pod needed when openai-api-key gets changed

Open jkleinlercher opened this issue 1 year ago • 1 comments

Checklist

  • [X] I've searched for similar issues and couldn't find anything matching
  • [X] I've discussed this feature request in the K8sGPT Slack and got positive feedback

Is this feature request related to a problem?

Yes

Problem Description

I needed to change the openai-api-key but the old key was used until I restarted the k8sgpt-deployment pod. From my point of view this is suboptimal.

Solution Description

We should mount the secret as a vollume and reread it if it gets changed.

Benefits

When changing the openai-api-key in the kubernetes secret there is no other manual thing to do.

Potential Drawbacks

No response

Additional Information

No response

jkleinlercher avatar May 31 '23 20:05 jkleinlercher

I think it's easier to sort out this by watching the changes in the secret and then restart the container to read the new value, otherwise we have to change the serve mode in k8sgpt

arbreezy avatar Jun 06 '23 15:06 arbreezy