External Secret
Create ScaleOps token secret using External Secret
Overview
This guide outlines the steps to configure ScaleOps token secret using an External Secret.
It is assumed that you have already set up ClusterSecretStore or SecretStore .
If you follow this guide, do not include scaleopsToken in your helm values.
Steps
-
Get secret data:
kubectl create secret docker-registry scaleops \ --docker-username=scaleops \ --docker-server=registry.scaleops.com \ --docker-password=<YOUR_SCALEOPS_TOKEN> \ --namespace scaleops-system \ --dry-run=client -o go-template='{{ index .data ".dockerconfigjson" | base64decode }}' -
Store the output of the command above on your secret provider.
-
Create an External Secret:
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: scaleops-token-secret
namespace: scaleops-system
spec:
secretStoreRef:
name: SECRET_STORE_NAME # Replace with your secret store name
kind: ClusterSecretStore # Replace with your secret store kind
target:
name: scaleops
template:
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: "{{ .scaleops_token | toString }}"
data:
- secretKey: scaleops_token
remoteRef:
key: path/to/secret # Replace with your secret path