Deprecate the Original Bootstrap Token Code (#17792)

This commit is contained in:
Lance Haig
2023-08-22 09:06:15 +02:00
committed by GitHub
parent 14a38bee7b
commit 0b9cf4e7b7
2 changed files with 3 additions and 2 deletions

View File

@@ -77,8 +77,9 @@ func (c *Client) ACLTokens() *ACLTokens {
return &ACLTokens{client: c}
}
// DEPRECATED: will be removed in Nomad 1.5.0
// Bootstrap is used to get the initial bootstrap token
//
// See BootstrapOpts to set ACL bootstrapping options.
func (a *ACLTokens) Bootstrap(q *WriteOptions) (*ACLToken, *WriteMeta, error) {
var resp ACLToken
wm, err := a.client.put("/v1/acl/bootstrap", nil, &resp, q)

View File

@@ -29,7 +29,7 @@ func makeACLClient(t *testing.T, cb1 configCallback,
})
// Get the root token
root, _, err := client.ACLTokens().Bootstrap(nil)
root, _, err := client.ACLTokens().BootstrapOpts("", nil)
if err != nil {
t.Fatalf("failed to bootstrap ACLs: %v", err)
}