Store delegate tokens as Kubernetes secrets
You can store your delegate tokens as a Kubernetes secret instead of a ConfigMap.
To store the delegate token as a Kubernetes secret:
Create a Kubernetes secret. For details, go to the Kubernetes documentation: Secrets.
Create a delegate-token.yaml file.
apiVersion: v1
kind: Secret
metadata:
name: token-secret
namespace: harness-delegate-ng
type: Opaque
stringData:
DELEGATE_TOKEN: <Delegate-token-value>Run the following to apply the YAML file.
kubectl -f delegate-token.yaml
Modify the delegate.yaml file to provide the reference to the secret you created.
- name: DELEGATE_TOKEN
valueFrom:
secretKeyRef:
name: token-secret
key: DELEGATE_TOKEN