bitnami/sealed-secrets

Preserve annotations and labels on SealedSecret objects

开放

#1,625 创建于 2024年11月4日

 (4 条评论) (2 个反应) (1 位负责人)Go (771 个派生)auto 404
enhancementhelp wanted

仓库指标

星标
 (9,222 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Which component: 0.27.1

Is your feature request related to a problem? Please describe. Sealed Secrets is often used with ArgoCD/Flux. In ArgoCD, argocd.argoproj.io/sync-wave annotation is used everywhere to control the priority of the git sync operation. Because SealedSecret object doesn't preserve any annotations and labels, it requires manual update of the json file after running kubeseal command.

Describe the solution you'd like Easiest solution would be just preserve the same annotations and labels from the kubeseal input secret.

Describe alternatives you've considered N/A

Additional context

Input secret

{
    "kind": "Secret",
    "apiVersion": "v1",
    "metadata": {
        "name": "s3-access",
        "namespace": "loki",
        "annotations": {
            "argocd.argoproj.io/sync-wave": "-10"
        }
    },
    "stringData": {
        "foo": "bar"
    }
}

Output SealedSecret

{
  "kind": "SealedSecret",
  "apiVersion": "bitnami.com/v1alpha1",
  "metadata": {
    "name": "s3-access",
    "namespace": "loki",
    "annotations": {                           
          "argocd.argoproj.io/sync-wave": "-10"  // This is what we want
    },                                            
    "creationTimestamp": null
  },
  "spec": {
    "template": {
      "metadata": {
        "name": "s3-access",
        "namespace": "loki",
        "creationTimestamp": null,
        "annotations": {
          "argocd.argoproj.io/sync-wave": "-10"
        }
      }
    },
    "encryptedData": {
      "foo": "AgBNnuq7/9OG+...."
    }
  }
}

The previous feature request was closed incorrectly. https://github.com/bitnami-labs/sealed-secrets/issues/460

贡献者指南