Secrets¶
It is possible to define secrets to be created in a namespace for a specific capability, or in every namespace generically. The main use case is to create secrets in the ArgoCD namespace so that it can read private repositories, which is where the name secrets came from in the first place. However, they can be used with other capabilities, and/or application namespaces as well.
More info can be found in Core Concepts documentation on Secrets.
Prerequisites¶
Secrets are encrypted using asymmetric encryption and therefore require a public and private keypair. Keypairs must be generated and managed by administrators and can provide the public key to Users for encrypting secrets. For more info, please see the Admin guide on configuring secret encryption.
Encrypting secrets¶
You can download the crypttool from the Downloads section of its repository. Once downloaded, the crypttool has two options for encrypting content:
Encrypting a file with crypttool¶
Example
Encrypting from stdin with crypttool¶
Example
using cURL against the webservice api¶
Example
other options¶
Options are endless. Be creative...
defining secrets¶
Encrypted Secrets can be specified in multiple places.
By defining the secret in the Paas spec directly (Paas.spec.secrets
) the
secret will be created in all namespaces belonging to the paas.
Example
Setting an secret for all namespaces
By defining the secret as part of a capability (such as argocd
), the secret will
be deployed in the namespace belonging to the capability specifically.
Example
Setting an secret for a specific capability
By defining the secret as part of a PaasNs, the secret will be deployed in the corresponding namespace only.