Skip to content

Commit

Permalink
Merge pull request #224 from Nordix/arpest_update_envs
Browse files Browse the repository at this point in the history
Align env vars
  • Loading branch information
denis-tingaikin authored May 14, 2024
2 parents 81699d9 + 7620648 commit 7d10234
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ You can build the docker container by running:
docker build .
```

# Usage

## Environment config

* `NSM_NAME` - Name of docker client
* `NSM_REQUEST_TIMEOUT` - timeout to request NSE
* `NSM_CONNECT_TO` - url to connect to
* `NSM_DIAL_TIMEOUT` - timeout to dial
* `NSM_MAX_TOKEN_LIFETIME` - maximum lifetime of tokens
* `NSM_TUNNEL_IP` - IP to use for tunnels
* `NSM_LABELS` - A list of client labels with format key1=val1,key2=val2, will be used a primary list for network services
* `NSM_NETWORK_SERVICES` - A list of Network Service Requests
* `NSM_FEDERATES_WITH` - Name of the federated domain
* `NSM_TRUST_DOMAIN` - Name of the trust domain
* `NSM_LOG_LEVEL` - Log level

# Testing

## Testing Docker container
Expand Down Expand Up @@ -72,4 +88,4 @@ docker run --privileged -e DLV_LISTEN_FORWARDER=:50000 -p 40000:40000 -p 50000:5
```

Please note, the tests **start** the cmd, so until you connect to port 40000 with your debugger and walk the tests
through to the point of running cmd, you will not be able to attach a debugger on port 50000 to the cmd.
through to the point of running cmd, you will not be able to attach a debugger on port 50000 to the cmd.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Copyright (c) 2022-2023 Cisco and/or its affiliates.
//
// Copyright (c) 2024 OpenInfra Foundation Europe. All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -89,8 +91,8 @@ type Config struct {
Labels []string `default:"" desc:"A list of client labels with format key1=val1,key2=val2, will be used a primary list for network services" split_words:"true"`
NetworkServices []url.URL `default:"" desc:"A list of Network Service Requests" split_words:"true"`

FederatesWith string `default:"k8s.nsm" desc:"Name of the federated domain"`
TrustDomain string `default:"docker.nsm" desc:"Name of the trust domain"`
FederatesWith string `default:"k8s.nsm" desc:"Name of the federated domain" split_words:"true"`
TrustDomain string `default:"docker.nsm" desc:"Name of the trust domain" split_words:"true"`
LogLevel string `default:"INFO" desc:"Log level" split_words:"true"`
}

Expand Down

0 comments on commit 7d10234

Please sign in to comment.