bitnami / kube-libsonnet

Bitnami's jsonnet library for building Kubernetes manifests
https://bitnami.com
Apache License 2.0
172 stars 49 forks source link

SealedSecret seems broken #14

Closed nabadger closed 4 years ago

nabadger commented 5 years ago

A couple of issues I'm finding:

Something like this works for me:

# Create example secret and extra only the encrypted portion into `data.json`
kubectl create secret generic mysecret --dry-run --from-literal=foo=bar -o json >mysecret.json
kubeseal < mysecret.json | jq -r .spec.encryptedData > data.json
// Define SealedSecret (kube.libsonnet)
SealedSecret(name): $._Object('bitnami.com/v1alpha1', 'SealedSecret', name) {
},
// Create sealed-secret (calling code)
my_secret: kube.SealedSecret("mysecret") { 
    spec: {
      encryptedData: kubecfg.parseJson(importstr "./data.json"),
    },
  },
iremmats commented 5 years ago

Was scanning through this too. It should be encryptedData.

jjo commented 4 years ago

Fixed by #36.