InseeFrLab / InseeFrLab/s3-operator

Add a label to the S3User's Secret to allow label matching and speed up fetching the secret

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
66
Forks
16
PR merge metrics
No merged PRs in 30d

Description

As of current version, the user controller lists every secret in a namespace to find the one secret matching a S3User, which is fairly inefficient :

https://github.com/InseeFrLab/s3-operator/blob/57a7f12a60736fc695a5d8ba5204ba91524feea4/controllers/user_controller.go#L408-L438

This could benefit from a dedicated label add to the secret when it's created. This is not difficult in itself, but requires some thought regarding pre-existing secrets (as in : Should the operator reconcile secrets to add labels ? Should this be managed with a small one-shot script to add the label to every S3User secret ?)

EDIT : [usage example visible in Operator SDK doc](https://sdk.operatorframework.io/docs/building-operators/golang/references/client/#list)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.