From be3fa5e1e19f60ebaa2f86e0c1dfb7137b776a8e Mon Sep 17 00:00:00 2001 From: Shubham Chaudhary Date: Tue, 14 Jan 2020 13:21:39 +0530 Subject: [PATCH] (feat): Add auxiliaryAppInfo in go-executor (#31) Signed-off-by: shubhamchaudhary --- pkg/utils/experimentHelpers.go | 1 + pkg/utils/getOSenv.go | 1 + pkg/utils/types.go | 15 ++++++++------- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkg/utils/experimentHelpers.go b/pkg/utils/experimentHelpers.go index 6ae89cb1..1b1f47ca 100644 --- a/pkg/utils/experimentHelpers.go +++ b/pkg/utils/experimentHelpers.go @@ -28,6 +28,7 @@ func (expDetails *ExperimentDetails) SetENV(engineDetails EngineDetails, clients expDetails.Env["APP_LABEL"] = engineDetails.AppLabel expDetails.Env["APP_NAMESPACE"] = engineDetails.AppNamespace expDetails.Env["APP_KIND"] = engineDetails.AppKind + expDetails.Env["AUXILIARY_APPINFO"] = engineDetails.AuxiliaryAppInfo } //SetValueFromChaosEngine sets value in experimentDetails struct from chaosEngine diff --git a/pkg/utils/getOSenv.go b/pkg/utils/getOSenv.go index 138c3ae8..ae37f33f 100644 --- a/pkg/utils/getOSenv.go +++ b/pkg/utils/getOSenv.go @@ -15,4 +15,5 @@ func GetOsEnv(engineDetails *EngineDetails) { engineDetails.SvcAccount = os.Getenv("CHAOS_SVC_ACC") engineDetails.ClientUUID = os.Getenv("CLIENT_UUID") engineDetails.Experiments = strings.Split(experimentList, ",") + engineDetails.AuxiliaryAppInfo = os.Getenv("AUXILIARY_APPINFO") } diff --git a/pkg/utils/types.go b/pkg/utils/types.go index b13b4e79..7d0af8b8 100644 --- a/pkg/utils/types.go +++ b/pkg/utils/types.go @@ -14,13 +14,14 @@ import ( // EngineDetails struct is for collecting all the engine-related details type EngineDetails struct { - Name string - Experiments []string - AppLabel string - SvcAccount string - AppKind string - AppNamespace string - ClientUUID string + Name string + Experiments []string + AppLabel string + SvcAccount string + AppKind string + AppNamespace string + ClientUUID string + AuxiliaryAppInfo string } // ExperimentDetails is for collecting all the experiment-related details