@@ -266,16 +266,17 @@ func metricsSettings(desired *flowslatest.FlowCollectorSpec, vol *volumes.Builde
266266 return metricsSettings
267267}
268268
269- func getStaticJSONConfig (desired * flowslatest.FlowCollectorSpec , vol * volumes.Builder , promTLS * flowslatest.CertificateReference , pipeline * PipelineBuilder , dynCMName string ) (string , error ) {
269+ func getJSONConfigs (desired * flowslatest.FlowCollectorSpec , vol * volumes.Builder , promTLS * flowslatest.CertificateReference , pipeline * PipelineBuilder , dynCMName string ) (string , string , error ) {
270270 metricsSettings := metricsSettings (desired , vol , promTLS )
271271 advancedConfig := helper .GetAdvancedProcessorConfig (desired )
272+ static , dynamic := pipeline .GetSplitStageParams ()
272273 config := map [string ]interface {}{
273274 "log-level" : desired .Processor .LogLevel ,
274275 "health" : map [string ]interface {}{
275276 "port" : * advancedConfig .HealthPort ,
276277 },
277278 "pipeline" : pipeline .GetStages (),
278- "parameters" : pipeline . GetStaticStageParams () ,
279+ "parameters" : static ,
279280 "metricsSettings" : metricsSettings ,
280281 "dynamicParameters" : config.DynamicParameters {
281282 Namespace : desired .Namespace ,
@@ -288,22 +289,19 @@ func getStaticJSONConfig(desired *flowslatest.FlowCollectorSpec, vol *volumes.Bu
288289 "port" : * advancedConfig .ProfilePort ,
289290 }
290291 }
291- bs , err := json .Marshal (config )
292+ jsonStatic , err := json .Marshal (config )
292293 if err != nil {
293- return "" , err
294+ return "" , "" , err
294295 }
295- return string (bs ), nil
296- }
297296
298- func getDynamicJSONConfig (pipeline * PipelineBuilder ) (string , error ) {
299- config := map [string ]interface {}{
300- "parameters" : pipeline .GetDynamicStageParams (),
297+ config = map [string ]interface {}{
298+ "parameters" : dynamic ,
301299 }
302- bs , err := json .Marshal (config )
300+ jsonDynamic , err := json .Marshal (config )
303301 if err != nil {
304- return "" , err
302+ return "" , "" , err
305303 }
306- return string (bs ), nil
304+ return string (jsonStatic ), string ( jsonDynamic ), nil
307305}
308306
309307func promService (desired * flowslatest.FlowCollectorSpec , svcName , namespace , appLabel string ) * corev1.Service {
0 commit comments