From 38025a0c6820078e0397064baad706bfafb57920 Mon Sep 17 00:00:00 2001 From: Arpad Kiss Date: Mon, 22 Apr 2024 16:10:46 +0200 Subject: [PATCH 1/2] Align env vars Signed-off-by: Arpad Kiss --- README.md | 18 +++++++++++++++++- main.go | 4 ++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 80fa61b..cf8767c 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. \ No newline at end of file +through to the point of running cmd, you will not be able to attach a debugger on port 50000 to the cmd. diff --git a/main.go b/main.go index 0678a31..1ec9fef 100644 --- a/main.go +++ b/main.go @@ -89,8 +89,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"` } From 7620648c4f365219f7c485ae5d7b51f2a1ce2d9c Mon Sep 17 00:00:00 2001 From: Arpad Kiss Date: Wed, 24 Apr 2024 16:30:30 +0200 Subject: [PATCH 2/2] Update license Signed-off-by: Arpad Kiss --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 1ec9fef..b52e47a 100644 --- a/main.go +++ b/main.go @@ -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");