Reference secrets from an external secret manager in Helm overrides
Harness Self-Managed Enterprise Edition supports the ability to reference secrets for Harness Cloud Cost Management (CCM) from a an external secret manager in your Helm overrides.
Prerequisites
The following prerequisites are needed:
-
Knowledge of external secret operators.
-
Installation of an operator.
-
A
ClusterSecretStoreorSecretStoreset up for your secret. For more information, go to External Secret Spec in the Kubernetes documentation. -
Test creating an
externalSecretobject that can pull the secret and create a Kubernetes object.
Reference Harness CCM secrets via external secrets
You can add an external secret reference for your Harness CCM secrets to your overrides.yaml file.
For example, the batch-processing service uses the S3_SYNC_CONFIG_ACCESSKEY secret. Let's say you want reference it from a different provider.
Here's the override syntax:
ccm:
batch-processing:
secrets:
secretManagement:
externalSecretsOperator:
- secretStore:
name: ""
kind: ""
remoteKeys:
S3_SYNC_CONFIG_ACCESSKEY:
name: ""
S3_SYNC_CONFIG_SECRETKEY:
name: ""
...
When utilizing GCP Secret Manager, you must establish either a ClusterSecretStore or a SecretStore within your GCP environment. Configure these stores with appropriate workload identity or serviceAccount permissions to access secrets from the secret manager.
For instance, name your ClusterSecretStore as gcp-sm-css. Inside the secret manager, ensure there's a secret named ccm-s3-config that holds the requisite value.
Here's how the override should be structured:
ccm:
batch-processing:
secrets:
secretManagement:
externalSecretsOperator:
- secretStore:
name: "gcp-sm-css"
kind: "ClusterSecretStore"
remoteKeys:
S3_SYNC_CONFIG_ACCESSKEY:
name: "ccm-s3-config"
Secret list by service
Here is the list of secrets that you can store externally for each service:
batch-ProcessingNEXT_GEN_MANAGER_SECRETCE_NG_SERVICE_SECRETS3_SYNC_CONFIG_ACCESSKEYS3_SYNC_CONFIG_SECRETKEYHARNESS_CE_AZURE_CLIENTSECRETHARNESS_CE_AZURE_SASHARNESS_CE_AZURE_CLIENTIDHARNESS_CE_AZURE_TENANTIDHMAC_ACCESS_KEYHMAC_SECRET_KEY
ce-nextgenJWT_AUTH_SECRETNEXT_GEN_MANAGER_SECRETJWT_IDENTITY_SERVICE_SECRETNOTIFICATION_CLIENT_SECRETACCESS_CONTROL_SECRETAWS_ACCESS_KEYAWS_SECRET_KEYAWS_ACCOUNT_IDAWS_DESTINATION_BUCKETAWS_TEMPLATE_LINKCE_AWS_TEMPLATE_URLAZURE_APP_CLIENT_SECRET
cloud-infoGCP_CREDENTIALS