comments on base64-ness of secrets

This commit is contained in:
Tim Hockin 2015-02-23 10:57:51 -08:00
parent 0d339383f4
commit dee17e393e
1 changed files with 5 additions and 3 deletions

View File

@ -273,7 +273,8 @@ type Secret struct {
ObjectMeta ObjectMeta
// Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN. // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN.
// The serialized form of the secret data is a base64 encoded string. // The serialized form of the secret data is a base64 encoded string,
// representing the arbitrary (possibly non-string) data value here.
Data map[string][]byte `json:"data,omitempty"` Data map[string][]byte `json:"data,omitempty"`
// Used to facilitate programatic handling of secret data. // Used to facilitate programatic handling of secret data.
@ -398,8 +399,9 @@ To create a pod that uses an ssh key stored as a secret, we first need to create
} }
``` ```
**Note:** The values of secret data are encoded as base64-encoded strings. Newlines are not **Note:** The serialized JSON and YAML values of secret data are encoded as
valid within these strings and must be omitted. base64 strings. Newlines are not valid within these strings and must be
omitted.
Now we can create a pod which references the secret with the ssh key and consumes it in a volume: Now we can create a pod which references the secret with the ssh key and consumes it in a volume: