Use configured token in the Nomad client
This commit is contained in:
parent
9ccc8cfb25
commit
6e535f8cef
2 changed files with 3 additions and 81 deletions
|
@ -158,33 +158,6 @@ providers:
|
|||
# ...
|
||||
```
|
||||
|
||||
#### `datacenter`
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
Defines the datacenter to use.
|
||||
If not provided in Traefik, Nomad uses the agent datacenter.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
nomad:
|
||||
endpoint:
|
||||
datacenter: dc1
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.nomad]
|
||||
[providers.nomad.endpoint]
|
||||
datacenter = "dc1"
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.nomad.endpoint.datacenter=dc1
|
||||
# ...
|
||||
```
|
||||
|
||||
#### `token`
|
||||
|
||||
_Optional, Default=""_
|
||||
|
@ -238,58 +211,6 @@ providers:
|
|||
# ...
|
||||
```
|
||||
|
||||
#### `httpAuth`
|
||||
|
||||
_Optional_
|
||||
|
||||
Used to authenticate the HTTP client using HTTP Basic Authentication.
|
||||
|
||||
##### `username`
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
Username to use for HTTP Basic Authentication.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
nomad:
|
||||
endpoint:
|
||||
httpAuth:
|
||||
username: admin
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.nomad.endpoint.httpAuth]
|
||||
username = "admin"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.nomad.endpoint.httpauth.username=admin
|
||||
```
|
||||
|
||||
##### `password`
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
Password to use for HTTP Basic Authentication.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
nomad:
|
||||
endpoint:
|
||||
httpAuth:
|
||||
password: passw0rd
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.nomad.endpoint.httpAuth]
|
||||
password = "passw0rd"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.nomad.endpoint.httpauth.password=passw0rd
|
||||
```
|
||||
|
||||
#### `tls`
|
||||
|
||||
_Optional_
|
||||
|
|
|
@ -164,9 +164,10 @@ func (p *Provider) loadConfiguration(ctx context.Context, configurationC chan<-
|
|||
func createClient(namespace string, endpoint *EndpointConfig) (*api.Client, error) {
|
||||
config := api.Config{
|
||||
Address: endpoint.Address,
|
||||
Region: endpoint.Region,
|
||||
WaitTime: time.Duration(endpoint.EndpointWaitTime),
|
||||
Namespace: namespace,
|
||||
Region: endpoint.Region,
|
||||
SecretID: endpoint.Token,
|
||||
WaitTime: time.Duration(endpoint.EndpointWaitTime),
|
||||
}
|
||||
|
||||
if endpoint.TLS != nil {
|
||||
|
|
Loading…
Reference in a new issue