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

Feature: Add template for SealedSecret #77

Open
mlepeshkin opened this issue Sep 2, 2024 · 2 comments
Open

Feature: Add template for SealedSecret #77

mlepeshkin opened this issue Sep 2, 2024 · 2 comments

Comments

@mlepeshkin
Copy link

mlepeshkin commented Sep 2, 2024

It would be awesome to add support for SealedSecrets (templates and helpers) so we can use them just like unencrypted secrets in the current chart version.

Here’s what it could look like in values.yaml:

sealedSecrets:
  my-secret:
    encryptedData:
      FOO: "encryptedbar"

The template should then create a SealedSecret object using this definition.

We’re planning to add this to our project, and I’m happy to put together a PR to get this feature in.

@webchi
Copy link

webchi commented Dec 9, 2024

merged #78

@webchi
Copy link

webchi commented Jan 9, 2025

@mlepeshkin Hi! I have an error when trying to use more then one secret in the list:

sealedSecrets:
  secrets:
    encryptedData:
      APP_KEY: "AgBq8HvylIF7R+...I35H1ZE="
  regcred:
    annotations: 
      sealedsecrets.bitnami.com/cluster-wide: "true"    
    encryptedData:
      .dockerconfigjson: "AgDgc11XN1P9...vcjnoHWcLf4="

Error:

Error: YAML parse error on universal-chart/templates/secret.yml: error converting YAML to JSON: yaml: line 32: could not find expected ':'

Rendered yaml seems broken on annotations and end of a file

---
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
spec:
  encryptedData:
    .dockerconfigjson: AgDgc11XN1P9...vcjnoHWcLf4=
  template:
    metadata:
      name: doc-regcred
      labels:
        app.kubernetes.io/name: doc
        app.kubernetes.io/instance: doc
        helm.sh/chart: universal-chart-2.8.2
        app.kubernetes.io/managed-by: Helm
      annotations:
        sealedsecrets.bitnami.com/cluster-wide: "true"---
apiVersion: bitnami.com/v1alpha1                     ^---- here it is
kind: SealedSecret

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants