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

Convert secrets to sealed secrets #923

Merged
merged 2 commits into from
Aug 8, 2020
Merged

Convert secrets to sealed secrets #923

merged 2 commits into from
Aug 8, 2020

Conversation

marccampbell
Copy link
Member

This adds an experimental feature to integrated the bitnami sealedsecrets controller into kots.

With this change, if a secret is deployed to the same namespace as kots, and the secret looks like

apiVersion: v1
data:
  cert.pem: <base64 encoded certificate?
kind: Secret
metadata:
  labels:
    kots.io/buildphase: secret
    kots.io/secrettype: sealedsecrets

  name: kots-sealed-secret
  namespace: default
type: Opaque

All secrets in the base will be replaced with encrypted sealed secrets.

return nil
}

secret := decoded.(*v1.Secret)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm gonna ok this lack of error checking :)

@marccampbell marccampbell merged commit cec4fef into master Aug 8, 2020

_, gvk, err := decode(contents, nil, nil)
if err != nil {
return nil
Copy link
Member

@emosbaugh emosbaugh Aug 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a comment like this may be good here

return nil // not an error because the file might not be yaml

@marccampbell marccampbell deleted the sealed-secrets branch May 23, 2022 11:57
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

Successfully merging this pull request may close these issues.

None yet

3 participants