sealed-secrets

by joaquinito2051

Helm chartv1.16.1App v0.16.0

Helm chart for the sealed-secrets controller.

About this chart

Sealed Secrets

This chart contains the resources to use sealed-secrets.

Prerequisites

  • Kubernetes >= 1.16

Installing the Chart

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

Helm 3

$ helm3 install --namespace kube-system my-release sealed-secrets/sealed-secrets 

Helm 2

$ helm2 install --namespace kube-system --name my-release sealed-secrets/sealed-secrets

The command deploys a controller and CRD for sealed secrets on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete all of the resources associated with the chart my-release

Helm 2

$ helm2 delete [--purge] my-release

Helm 3

$ helm3 uninstall my-release -n kube-system

Using kubeseal

Install the kubeseal CLI by downloading the binary from sealed-secrets/releases.

Fetch the public key by passing the release name and namespace:

kubeseal --fetch-cert \
--controller-name=my-release \
--controller-namespace=my-release-namespace \
> pub-cert.pem

Read about kubeseal usage on sealed-secrets docs.

Configuration

ParameterDescriptionDefault
controller.createtrue if Sealed Secrets controller resources should be createdtrue
namespaceThe name of the Namespace to deploy the controller.Release.namespace
rbac.createtrue if rbac resources should be createdtrue
rbac.pspEnabledtrue if psp resources should be createdfalse
serviceAccount.createWhether to create a service account or nottrue
serviceAccount.nameThe name of the service account to create or use"sealed-secrets-controller"
secretNameThe name of the TLS secret containing the key used to encrypt secrets"sealed-secrets-key"
image.tagThe Sealed Secrets image tagv0.13.1
image.pullPolicyThe image pull policy for the deploymentIfNotPresent
image.repositoryThe repository to get the controller image fromquay.io/bitnami/sealed-secrets-controller
resourcesCPU/Memory resource requests/limits{}
crd.createtrue if crd resources should be createdtrue
crd.keeptrue if the sealed secret CRD should be kept when the chart is deletedtrue
networkPolicyWhether to create a network policy that allows access to the servicefalse
securityContext.runAsUserDefines under which user the operator Pod and its containers/processes run1001
securityContext.fsGroupDefines fsGroup for the operator Pod and its containers/processes run65534
commandArgsSet optional command line arguments passed to the controller process[]
ingress.enabledEnables Ingressfalse
ingress.annotationsIngress annotations{}
ingress.pathIngress path/v1/cert.pem
ingress.hostsIngress accepted hostnames["chart-example.local"]
ingress.tlsIngress TLS configuration[]
podAnnotationsAnnotations to annotate pods with.{}
podLabelsLabels to be added to pods{}
priorityClassNameOptional class to specify priority for pods""
serviceMonitor.createCreate servicemonitor from prometheus operatorfalse
serviceMonitor.intervalHow frequently Prometheus should scrape""
serviceMonitor.labelsLabels for the servicemonitor passed to Prometheus Operator{}
serviceMonitor.namespaceNamespace this servicemonitor is installed in""
serviceMonitor.scrapeTimeoutTimeout after which the scrape is ended""
dashboards.createCreate Grafana dashboard config mapfalse
dashboards.labelsExtra labels to apply to the dashboard configmaps{}
dashboards.namespaceNamespace this dashboards are installed in""
  • In the case that serviceAccount.create is false and rbac.create is true it is expected for a service account with the name serviceAccount.name to exist in the same namespace as this chart before installation.
  • If serviceAccount.create is true there cannot be an existing service account with the name serviceAccount.name.
  • If a secret with name secretName does not exist in the same namespace as this chart, then on install one will be created. If a secret already exists with this name the keys inside will be used.
  • OpenShift: unset the runAsUser and fsGroup like this:
  securityContext:
    runAsUser:
    fsGroup:

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.16.1 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