sealed-secrets

by tjungbauer

Helm chartv1.0.31App 1.0.0Apache-2.0Verified publisher

A Helm chart to deploy sealed-secrets - depends on Bitnami's helm chart

About this chart

sealed-secrets

Description

A Helm chart to deploy sealed-secrets - depends on Bitnami's helm chart

Install Sealed Secrets

Install Sealed Secrets to secure your sensitive data. This chart here is used as a wrapper to allow additional settings if required and uses as a Subchart the Bitnami Chart:

You can also call this directly. This Chart was only created to wrap it into processes required for labs. However, it is mainly used to actively create the required Namespace first, since there were issues where the option in the source Helm Chart did not work.

Dependencies

This chart has the following dependencies:

RepositoryNameVersion
https://bitnami.github.io/sealed-secretssealed-secrets2.18.4
https://charts.stderr.at/tpl~1.0.31

It is best used with a full GitOps approach such as Argo CD does. For example, https://github.com/tjungbauer/openshift-clusterconfig-gitops

Maintainers

NameEmailUrl
tjungbauer[email protected]https://blog.stderr.at/

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/sealed-secrets

Parameters

NOTE: Only the parameters of the Subcharts that I ususally set are described here. Verify the full documentation of the Subchart at Bitnami Sealed Secret

Values

KeyTypeDefaultDescription
namespace.additionalAnnotationsobject{}Additional annotations for the Namespace.
namespace.additionalLabelsobject{}Additional labels for the Namespace.
namespace.createboolfalseCreate Namespace or not
namespace.descrstring""Description of the namespace.
namespace.displaystring""Display name of the namespace.
namespace.namestring"sealed-secrets"Namespace where Sealed Secrets shall be installed
sealed-secrets.containerSecurityContextobject{"enabled":false}Dont touch the security context values, deployment will fail in OpenShift otherwise.
sealed-secrets.enabledboolfalseEnable or disable deployment of Sealed Secrets
sealed-secrets.fullnameOverridestring"sealed-secrets"Overwrite the Full-name
sealed-secrets.nameOverridestring"sealed-secrets"Overwrite the name
sealed-secrets.namespacestring"sealed-secrets"Target Namespace
sealed-secrets.podSecurityContextobject{"enabled":false}Dont touch the security context values, deployment will fail in OpenShift otherwise.

Example

---
sealed-secrets:
  # Disabled by default
  enabled: false
  nameOverride: sealed-secrets
  fullnameOverride: sealed-secrets
  namespace: sealed-secrets
  # Dont touch the security context values, deployment will fail in OpenShift otherwise.
  podSecurityContext:
    enabled: false
  containerSecurityContext:
    enabled: false
  commandArgs:
    - "--update-status=true"

namespace:
  name: sealed-secrets
  create: true

Example Usage

Once the operator has been installed the command line tool kubeseal must be installed

Either use brew install kubeseal or download your appropriate release from: https://github.com/bitnami-labs/sealed-secrets/releases

Simple tests

  • Create a new project oc new-project myproject

  • Create a secret:

    echo -n bar | oc create secret generic mysecret --dry-run=client --from-file=foo=/dev/stdin -o yaml > mysecret.json`
    

    UNENCRYPTED secreted stored as mysecret.json --> not good practice, but good for testing :)

    Seal the secret:

    kubeseal --controller-name=sealed-secrets --controller-namespace=sealed-secrets < mysecret.json > mysealedsecret.json`
    

    Sealed secret is stored at mysealedsecret.json. It is safe to store this on Github

  • Installed the sealed secret oc create -f mysealedsecret.json

    Verify the existence:

    ❯ oc get SealedSecret
    NAME       AGE
    mysecret   4s
    
    ❯ oc get secrets mysecret
    NAME       TYPE     DATA   AGE
    mysecret   Opaque   1      13s
    

Updating or appending new values

echo -n "my new password" \
    | oc create secret generic dummy --dry-run=client --from-file=password=/dev/stdin -o json \
    | kubeseal --controller-namespace=sealed-secrets --controller-name=sealed-secrets --format yaml --merge-into mysealedsecret.json
❯ oc apply -f mysealedsecret.json
sealedsecret.bitnami.com/mysecret configured
❯ oc get secrets mysecret
NAME       TYPE     DATA   AGE
mysecret   Opaque   2      3m32s

Installing the Chart

To install the chart with the release name my-release:

helm install my-release tjungbauer/<chart-name>>

The command deploys the chart on the Kubernetes cluster in the default configuration.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.


Autogenerated from chart metadata using helm-docs v1.14.2

Deploy sealed-secrets with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has sealed-secrets on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartsealed-secrets is pinned at v1.0.31 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply