forked from hashicorp/consul
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug looking for boot token in StringData field
Previously, we would re-use an existing bootstrap token if the Secret already existed, by looking for the token in the StringData field of the Secret. Unfortunately, the StringData field of a Kubernetes Secret is only used as a convenience when writing a Kubernetes Secret. When reading the secret it is not populated and is converted to a []byte and moved to the Data field. This conversion happens in a real Kubernetes cluster but not with the testing 'fakeclient', hence not being caught by our tests. This change removes all use of StringData to avoid confusion.
- Loading branch information
Showing
2 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters