Skip to content

Commit

Permalink
Merge pull request #231 from networkservicemesh/allow-to-use-labels-o…
Browse files Browse the repository at this point in the history
…n-request

allow to use labels on requesting vl3 endpoints
  • Loading branch information
glazychev-art authored Sep 25, 2023
2 parents 89a482d + 643453f commit 2e0ecd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ type Config struct {
RegistryClientPolicies []string `default:"etc/nsm/opa/common/.*.rego,etc/nsm/opa/registry/.*.rego,etc/nsm/opa/client/.*.rego" desc:"paths to files and directories that contain registry client policies" split_words:"true"`
ServiceNames []string `default:"vL3" desc:"Name of providing service" split_words:"true"`
Labels map[string]string `default:"" desc:"Endpoint labels"`
RequestLabels map[string]string `default:"" desc:"Adds labels to request on requesting vl3 nse"`
IdleTimeout time.Duration `default:"0" desc:"timeout for automatic shutdown when there were no requests for specified time. Set 0 to disable auto-shutdown." split_words:"true"`
RegisterService bool `default:"true" desc:"if true then registers network service on startup" split_words:"true"`
OpenTelemetryEndpoint string `default:"otel-collector.observability.svc.cluster.local:4317" desc:"OpenTelemetry Collector Endpoint"`
Expand Down Expand Up @@ -427,6 +428,7 @@ func main() {
NetworkServiceEndpointName: config.Name,
NetworkService: config.ServiceNames[0],
Payload: payload.IP,
Labels: config.RequestLabels,
},
})

Expand Down Expand Up @@ -459,6 +461,7 @@ func main() {
NetworkServiceEndpointName: nse.Name,
NetworkService: config.ServiceNames[0],
Payload: payload.IP,
Labels: config.RequestLabels,
},
}

Expand Down

0 comments on commit 2e0ecd1

Please sign in to comment.