diff --git a/server/codegen/assets/templates/gocode/envoy/store_encode.go.tpl b/server/codegen/assets/templates/gocode/envoy/store_encode.go.tpl index 3abc0b5d9..625e554e4 100644 --- a/server/codegen/assets/templates/gocode/envoy/store_encode.go.tpl +++ b/server/codegen/assets/templates/gocode/envoy/store_encode.go.tpl @@ -352,7 +352,7 @@ func (e StoreEncoder) matchup{{.expIdent}}s(ctx context.Context, s store.Storer, var aux *types.{{.expIdent}} var ok bool for i, n := range nn { - {{ if eq .componentIdent "compose" }} + {{ if eq .component "compose" }} scope := scopes[i] if scope == nil { continue diff --git a/server/compose/envoy/store_encode.gen.go b/server/compose/envoy/store_encode.gen.go index e236c2201..bc4c902a4 100644 --- a/server/compose/envoy/store_encode.gen.go +++ b/server/compose/envoy/store_encode.gen.go @@ -295,6 +295,11 @@ func (e StoreEncoder) matchupCharts(ctx context.Context, s store.Storer, uu map[ var ok bool for i, n := range nn { + scope := scopes[i] + if scope == nil { + continue + } + for _, idf := range n.Identifiers.Slice { if id, err := strconv.ParseUint(idf, 10, 64); err == nil { aux, ok = idMap[id] @@ -525,6 +530,11 @@ func (e StoreEncoder) matchupModules(ctx context.Context, s store.Storer, uu map var ok bool for i, n := range nn { + scope := scopes[i] + if scope == nil { + continue + } + for _, idf := range n.Identifiers.Slice { if id, err := strconv.ParseUint(idf, 10, 64); err == nil { aux, ok = idMap[id] @@ -742,6 +752,11 @@ func (e StoreEncoder) matchupModuleFields(ctx context.Context, s store.Storer, u var ok bool for i, n := range nn { + scope := scopes[i] + if scope == nil { + continue + } + for _, idf := range n.Identifiers.Slice { if id, err := strconv.ParseUint(idf, 10, 64); err == nil { aux, ok = idMap[id] @@ -973,6 +988,11 @@ func (e StoreEncoder) matchupNamespaces(ctx context.Context, s store.Storer, uu var ok bool for i, n := range nn { + scope := scopes[i] + if scope == nil { + continue + } + for _, idf := range n.Identifiers.Slice { if id, err := strconv.ParseUint(idf, 10, 64); err == nil { aux, ok = idMap[id] @@ -1186,6 +1206,11 @@ func (e StoreEncoder) matchupPages(ctx context.Context, s store.Storer, uu map[i var ok bool for i, n := range nn { + scope := scopes[i] + if scope == nil { + continue + } + for _, idf := range n.Identifiers.Slice { if id, err := strconv.ParseUint(idf, 10, 64); err == nil { aux, ok = idMap[id]