Skip to content

Commit

Permalink
Merge pull request #293 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 6930243 + 89abf31 commit 864c308
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# cmd-exclude-prefixes-k8s
Prefix service is designed to collect the local IP address ranges. Additionally, user defined address ranges could be configured to be treated as local.

# Usage

## Environment config

* `NSM_EXCLUDED_PREFIXES` - List of excluded prefixes
* `NSM_CONFIG_MAP_NAMESPACE` - Namespace of user config map (default: "default")
* `NSM_CONFIG_MAP_NAME` - Name of user config map (default: "excluded-prefixes-config")
* `NSM_CONFIG_MAP_KEY` - key in the input configmap by which we retrieve data('filename' in data section in configmap specification yaml file) (default: "excluded_prefixes_input.yaml")
* `NSM_OUTPUT_CONFIG_MAP_NAME` - Name of nsm config map (default: "nsm-config")
* `NSM_OUTPUT_CONFIG_MAP_KEY` - key in the output configmap by which we retrieve data('filename' in data section in configmap specification yaml file) (default: "excluded_prefixes_output.yaml")
* `NSM_OUTPUT_FILE_PATH` - Path of output prefixes file (default: "/var/lib/networkservicemesh/config/excluded_prefixes.yaml")
* `NSM_PREFIXES_OUTPUT_TYPE` - Where to write excluded prefixes (default: "file")
* `NSM_LOG_LEVEL` - Log level (default: "INFO")
* `NSM_OPEN_TELEMETRY_ENDPOINT` - OpenTelemetry Collector Endpoint (default: "otel-collector.observability.svc.cluster.local:4317")
* `NSM_METRICS_EXPORT_INTERVAL` - interval between mertics exports (default: "10s")
4 changes: 3 additions & 1 deletion internal/prefixcollector/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
//
// Copyright (c) 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 @@ -43,7 +45,7 @@ type Config struct {
OutputFilePath string `default:"/var/lib/networkservicemesh/config/excluded_prefixes.yaml" desc:"Path of output prefixes file" split_words:"true"`
PrefixesOutputType string `default:"file" desc:"Where to write excluded prefixes" split_words:"true"`
LogLevel string `default:"INFO" desc:"Log level" split_words:"true"`
OpenTelemetryEndpoint string `default:"otel-collector.observability.svc.cluster.local:4317" desc:"OpenTelemetry Collector Endpoint"`
OpenTelemetryEndpoint string `default:"otel-collector.observability.svc.cluster.local:4317" desc:"OpenTelemetry Collector Endpoint" split_words:"true"`
MetricsExportInterval time.Duration `default:"10s" desc:"interval between mertics exports" split_words:"true"`
}

Expand Down

0 comments on commit 864c308

Please sign in to comment.