Manage secrets with KOTS Auto-Gitops (Alpha)
KOTS Auto-GitOps is a legacy feature and is not recommended for use. For modern enterprise customers that prefer software deployment processes that use CI/CD pipelines, Replicated recommends the Helm CLI installation method, which is more commonly used in these types of enterprise environments.
When you enable Auto-GitOps, the Replicated KOTS Admin Console pushes the rendered application manifests to the configured git repository. Application manifests often contain secrets and sensitive information that should not be committed to git.
Replicated KOTS v1.18 introduces an integration with SealedSecrets to encrypt secrets before committing. This integration is currently alpha and subject to change in future releases of KOTS. For more information, see the sealed-secrets Github repository.
To enable this integration, a Secret with specific labels must be deployed to the same namespace as the Admin Console. This secret must contain the SealedSecrets public key and is used by KOTS to replace all Secret objects created by the application and by the Admin Console.
This Secret must be manually deployed to the same namespace as the Admin Console. There is currently no way to automate or use the Admin Console to configure this functionality. The Secret can be named anything unique that does not conflict with application Secrets. The labels in this example YAML file are important and must be used.
apiVersion: v1
kind: Secret
metadata:
name: kots-sealed-secret
namespace: NAMESPACE
labels:
kots.io/buildphase: secret
kots.io/secrettype: sealedsecrets
data:
cert.pem: SEALED_SECRET_KEY
Replace:
-
NAMESPACEwith the namespace where the Admin Console is installed. -
SEALED_SECRET_KEYwith the base64 encoded, sealed Secret public key. The sealed Secret public key is included in the sealed Secret controller logs during startup.Example:
kubectl logs -n kube-system sealed-secrets-controller-7684c7b86c-6bhhw2022/04/20 15:49:49 Starting sealed-secrets controller version: 0.17.5controller version: 0.17.52022/04/20 15:49:49 Searching for existing private keys2022/04/20 15:49:58 New key written to kube-system/sealed-secrets-keyxmwv22022/04/20 15:49:58 Certificate is-----BEGIN CERTIFICATE-----MIIEzDCCArSgAwIBAgIQIkCjUuODpQV7zK44IB3O9TANBgkqhkiG9w0BAQsFADAAMB4XDTIyMDQyMDE1NDk1OFoXDTMyMDQxNzE1NDk1OFowADCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAN0cle8eERYUglhGapLQZWYS078cP9yjOZpoUtXempNE4eLBMo2bDAOopL9YV6TIh2EQMGO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