Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to use labels on requesting vl3 endpoints #231

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading