@@ -56,6 +56,10 @@ type Input struct {
5656 SourcePort int
5757}
5858
59+ type outputInfo struct {
60+ ref types.NamespacedName
61+ }
62+
5963type clusterOutputInfo struct {
6064 ref types.NamespacedName
6165 protected bool
@@ -99,7 +103,11 @@ func configRenderer(in Input) (render.Renderer, error) {
99103 }
100104 destinationDefs = append (destinationDefs , renderClusterOutput (co , in .SecretLoaderFactory ))
101105 }
106+ outputRefs := make (map [string ]outputInfo , len (in .Outputs ))
102107 for _ , o := range in .Outputs {
108+ outputRefs [o .Name ] = outputInfo {
109+ ref : types.NamespacedName {Namespace : o .Namespace , Name : o .Name },
110+ }
103111 destinationDefs = append (destinationDefs , renderOutput (o , in .SecretLoaderFactory ))
104112 }
105113
@@ -114,6 +122,9 @@ func configRenderer(in Input) (render.Renderer, error) {
114122 if err := validateClusterOutputs (clusterOutputRefs , client .ObjectKeyFromObject (& f ).String (), f .Spec .GlobalOutputRefs , f .Kind ); err != nil {
115123 errs = errors .Append (errs , err )
116124 }
125+ if err := validateOutputs (outputRefs , client .ObjectKeyFromObject (& f ).String (), f .Spec .LocalOutputRefs ); err != nil {
126+ errs = errors .Append (errs , err )
127+ }
117128 logDefs = append (logDefs , renderFlow (in .Name , clusterOutputRefs , sourceName , keyDelim (in .SyslogNGSpec .JSONKeyDelimiter ), f , in .SecretLoaderFactory ))
118129 }
119130
0 commit comments