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

secrets: avoid repeated calls to k8s API #455

Comments

@mdonadoni
Copy link
Member

mdonadoni commented May 3, 2024

As of now, each call to get_secret_value results in an API call made to k8s. Let's refactor the code so that it's easy to fetch all the secrets once, without making repeated requests. This will also be useful to cache secrets in reana-job-controller, to avoid calling the k8s API many times for each new job.

As an example, the k8s API is called twice when creating the k8s configuration for the kerberos-related pods:

keytab_file = secrets_store.get_secret_value("CERN_KEYTAB")
cern_user = secrets_store.get_secret_value("CERN_USER")

@mdonadoni mdonadoni self-assigned this May 3, 2024
mdonadoni added a commit to mdonadoni/pytest-reana that referenced this issue May 3, 2024
Update secrets-related fixtures to be compatible with latest changes to
`reana-commons`.

Closes reanahub/reana-commons#455
mdonadoni added a commit to mdonadoni/reana-commons that referenced this issue May 3, 2024
mdonadoni added a commit to mdonadoni/reana-server that referenced this issue May 3, 2024
…anahub#686)

Refactor secrets-related endpoints to adapt to performance-related
refactor of `reana-commons`. Improve validation of endpoints'
parameters.

Closes reanahub/reana-commons#455
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this issue May 3, 2024
mdonadoni added a commit to mdonadoni/pytest-reana that referenced this issue May 6, 2024
mdonadoni added a commit to mdonadoni/reana-commons that referenced this issue May 6, 2024
mdonadoni added a commit to mdonadoni/reana-server that referenced this issue May 6, 2024
…anahub#686)

Refactor secrets-related endpoints to adapt to performance-related
refactor of `reana-commons`. Improve validation of endpoints'
parameters.

Closes reanahub/reana-commons#455
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this issue May 6, 2024
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this issue May 6, 2024
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this issue May 6, 2024
mdonadoni added a commit to mdonadoni/reana-job-controller that referenced this issue May 6, 2024
Cache user secrets to avoid fetching them multiple times when creating
many jobs.

Closes reanahub/reana-commons#455
mdonadoni added a commit to mdonadoni/pytest-reana that referenced this issue Aug 8, 2024
mdonadoni added a commit to mdonadoni/reana-commons that referenced this issue Aug 8, 2024
mdonadoni added a commit to mdonadoni/reana-server that referenced this issue Aug 8, 2024
…anahub#686)

Refactor secrets-related endpoints to adapt to performance-related
refactor of `reana-commons`. Improve validation of endpoints'
parameters.

Closes reanahub/reana-commons#455
mdonadoni added a commit to mdonadoni/reana-server that referenced this issue Aug 8, 2024
…anahub#686)

Refactor secrets-related endpoints to adapt to performance-related
refactor of `reana-commons`. Improve validation of endpoints'
parameters.

Closes reanahub/reana-commons#455
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this issue Aug 8, 2024
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this issue Aug 8, 2024
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this issue Aug 8, 2024
mdonadoni added a commit to mdonadoni/reana-job-controller that referenced this issue Aug 8, 2024
Cache user secrets to avoid fetching them multiple times when creating
many jobs.

Closes reanahub/reana-commons#455
mdonadoni added a commit to mdonadoni/reana-server that referenced this issue Aug 8, 2024
…anahub#686)

Refactor secrets-related endpoints to adapt to performance-related
refactor of `reana-commons`. Improve validation of endpoints'
parameters.

Closes reanahub/reana-commons#455
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this issue Aug 19, 2024
mdonadoni added a commit to mdonadoni/reana-commons that referenced this issue Aug 19, 2024
mdonadoni added a commit to mdonadoni/reana-server that referenced this issue Aug 19, 2024
…anahub#686)

Refactor secrets-related endpoints to adapt to performance-related
refactor of `reana-commons`. Improve validation of endpoints'
parameters.

Closes reanahub/reana-commons#455
mdonadoni added a commit to mdonadoni/reana-workflow-controller that referenced this issue Aug 19, 2024
mdonadoni added a commit to mdonadoni/reana-job-controller that referenced this issue Aug 19, 2024
Cache user secrets to avoid fetching them multiple times when creating
many jobs.

Closes reanahub/reana-commons#455
tiborsimko pushed a commit to mdonadoni/reana-commons that referenced this issue Aug 21, 2024
tiborsimko pushed a commit to mdonadoni/reana-workflow-controller that referenced this issue Aug 21, 2024
tiborsimko pushed a commit to mdonadoni/reana-server that referenced this issue Aug 21, 2024
…anahub#686)

Refactor secrets-related endpoints to adapt to performance-related
refactor of `reana-commons`. Improve validation of endpoints'
parameters.

Closes reanahub/reana-commons#455
tiborsimko pushed a commit to mdonadoni/reana-job-controller that referenced this issue Aug 21, 2024
)

Cache user secrets to avoid fetching them multiple times when creating
many jobs.

Closes reanahub/reana-commons#455
tiborsimko pushed a commit to mdonadoni/reana-job-controller that referenced this issue Aug 21, 2024
)

Cache user secrets to avoid fetching them multiple times when creating
many jobs.

Closes reanahub/reana-commons#455
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment