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

APIGOV-28713 - add dataplane type in root init #162

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions pkg/discovery/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package discovery
import (
"time"

"github.com/Axway/agent-sdk/pkg/apic"
corecmd "github.com/Axway/agent-sdk/pkg/cmd"
corecfg "github.com/Axway/agent-sdk/pkg/config"
"github.com/Axway/agent-sdk/pkg/util/log"
Expand All @@ -25,6 +26,9 @@ func init() {
corecfg.DiscoveryAgent,
)

// set the dataplane type that will be added to the agent spec
corecfg.AgentDataPlaneType = apic.Kong.String()

// Get the root command properties and bind the config property in YAML definition
rootProps := DiscoveryCmd.GetProperties()
config.AddKongProperties(rootProps)
Expand Down
4 changes: 4 additions & 0 deletions pkg/traceability/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
libcmd "github.com/elastic/beats/v7/libbeat/cmd"
"github.com/elastic/beats/v7/libbeat/cmd/instance"

"github.com/Axway/agent-sdk/pkg/apic"
corecmd "github.com/Axway/agent-sdk/pkg/cmd"
corecfg "github.com/Axway/agent-sdk/pkg/config"

Expand Down Expand Up @@ -35,6 +36,9 @@ func init() {
corecfg.TraceabilityAgent,
)

// set the dataplane type that will be added to the agent spec
corecfg.AgentDataPlaneType = apic.Kong.String()

rootProps := TraceCmd.GetProperties()
config.AddKongProperties(rootProps)
}
Expand Down