Ignore Bootstrap Token secrets that don't use predictable names.

This aligns with spec changes coming in https://github.com/kubernetes/community/pull/381.

Signed-off-by: Joe Beda <joe.github@bedafamily.com>
This commit is contained in:
Joe Beda
2017-02-20 10:21:07 -08:00
parent eb755a3306
commit 3a3c2fa0c8
10 changed files with 119 additions and 18 deletions

View File

@@ -277,7 +277,9 @@ func (e *BootstrapSigner) getTokens() map[string]string {
// Check and warn for duplicate secrets. Behavior here will be undefined.
if _, ok := ret[tokenID]; ok {
glog.V(3).Infof("Duplicate bootstrap tokens found for id %s, ignoring on in %s/%s", tokenID, secret.Namespace, secret.Name)
// This should never happen as we ensure a consistent secret name.
// But leave this in here just in case.
glog.V(1).Infof("Duplicate bootstrap tokens found for id %s, ignoring on in %s/%s", tokenID, secret.Namespace, secret.Name)
continue
}