Secrets in GCS
This example uses a bucket (
mybucket) to store GitHub credentials and a kubeconfig file.
Since you’re storing sensitive information you protect the bucket by restricting access to it. Encryption at rest is already provided automatically without additional setup.
Remember to run Halyard’s daemon and Spinnaker services with a service account that allows them to read that content.
Store your GitHub credentials in
github: password: <PASSWORD> token: <TOKEN>
Note: You could choose to store the password under different keys than
github.token. You’d just need to
change how to reference the secret
Storing sensitive files
Some Spinnaker configuration uses information stored as files. For example, upload the
kubeconfig file of your Kubernetes account directly to
gsutil cp /path/to/mykubeconfig gs://mybucket/mykubeconfig
Now that secrets are safely stored in the bucket, you reference them from your config files using the format below. The GCS-specific parameters (
f:<path to file>,
k:<optional yaml key>) can be in any order.
To reference secret literal values:
encrypted:gcs!b:<bucket>!f:<path to file>!k:<optional yaml key>
To reference secret files:
encryptedFile:gcs!b:<bucket>!f:<path to file>
k:<key> parameter is only necessary when storing secret values in a yaml file, like in our example. To reference
github.password from the file above, use:
But to reference your kubeconfig file, you can leave off the
k parameter and use