mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #41838 from apprenda/kubeadm_fixed_token_String
Automatic merge from submit-queue (batch tested with PRs 41540, 41808, 41710, 41838, 41840) kubeadm: update token to use '.' in discovery pkg **What this PR does / why we need it**: While working on getting https://github.com/kubernetes/community/pull/381 implemented, I noticed the kubeadm discovery pkg was printing out tokens incorrectly. Corrected and fixed up corresponding test. **Special notes for your reviewer**: /cc @luxas @jbeda **Release note**: ```release-note NONE ```
This commit is contained in:
commit
52d81606b6
@ -46,7 +46,7 @@ func (d *discoveryValue) String() string {
|
||||
case d.v.File != nil:
|
||||
return "file://" + d.v.File.Path
|
||||
case d.v.Token != nil:
|
||||
return fmt.Sprintf("token://%s:%s@%s", d.v.Token.ID, d.v.Token.Secret, strings.Join(d.v.Token.Addresses, ","))
|
||||
return fmt.Sprintf("token://%s.%s@%s", d.v.Token.ID, d.v.Token.Secret, strings.Join(d.v.Token.Addresses, ","))
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ func TestNewDiscoveryValue(t *testing.T) {
|
||||
Addresses: []string{"foobar"},
|
||||
},
|
||||
},
|
||||
}, expect: "token://foo:bar@foobar",
|
||||
}, expect: "token://foo.bar@foobar",
|
||||
},
|
||||
}
|
||||
for _, rt := range tests {
|
||||
|
Loading…
Reference in New Issue
Block a user