Skip to content

Commit

Permalink
APIGOV-28713 - add dataplane type in root init (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollins-axway authored Sep 6, 2024
1 parent ba74c90 commit 74248d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit 74248d6

Please sign in to comment.