From 74248d6ec8aa141619cece24a0f586812b70191e Mon Sep 17 00:00:00 2001 From: Jason Collins <47123298+jcollins-axway@users.noreply.github.com> Date: Fri, 6 Sep 2024 09:09:25 -0700 Subject: [PATCH] APIGOV-28713 - add dataplane type in root init (#162) --- pkg/discovery/cmd/cmd.go | 4 ++++ pkg/traceability/cmd/cmd.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/pkg/discovery/cmd/cmd.go b/pkg/discovery/cmd/cmd.go index ea13655..2baec00 100644 --- a/pkg/discovery/cmd/cmd.go +++ b/pkg/discovery/cmd/cmd.go @@ -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" @@ -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) diff --git a/pkg/traceability/cmd/cmd.go b/pkg/traceability/cmd/cmd.go index 0765528..97ef502 100644 --- a/pkg/traceability/cmd/cmd.go +++ b/pkg/traceability/cmd/cmd.go @@ -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" @@ -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) }