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

未关闭
#49 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
go, kubernetes

调研方向

从 controllers/user_controller.go 的 408-438 行附近开始,然后阅读链接的 Operator SDK client list 示例,了解 label matching。跟踪 S3User secret 的创建和获取方式,并决定如何处理预先存在的 secret。完成标准是 matching 不再列出 namespace 中的每个 secret,并且现有的 S3User secret 有明确的 label migration 路径。

由索引模型根据 Issue 内容生成。

描述

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

主要语言
Go
星标
66
派生
16
PR 合并指标
30 天内没有已合并 PR

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InseeFrLab/s3-operator 的其他 Issue

查看 InseeFrLab/s3-operator 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。