{"record":{"id":"988fafb1b67caa1a","repo":"cilium/cilium","slug":"filter-has-no-name-s","errorCode":null,"errorMessage":"filter has no name: %s","messagePattern":"filter has no name: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/ciliumenvoyconfig/cec_resource_parser.go","lineNumber":912,"sourceCode":"\treturn updated\n}\n\n// injectCiliumUpstreamL7Filter injects the Cilium HTTP filter just before the Upstream Codec filter\nfunc injectCiliumUpstreamL7Filter(accessLogPath string, opts *envoy_config_upstream.HttpProtocolOptions, supportsALPN bool) (bool, error) {\n\tfilters := opts.GetHttpFilters()\n\tif filters == nil {\n\t\tfilters = make([]*envoy_config_http.HttpFilter, 0, 2)\n\t}\n\n\tfoundCiliumL7Filter := false\n\tcodecFilterIndex := -1\n\tfor j, filter := range filters {\n\t\t// no filters allowed after upstream codec filter\n\t\tif codecFilterIndex >= 0 {\n\t\t\treturn false, fmt.Errorf(\"filter after codec filter: %s\", filter.String())\n\t\t}\n\t\tif len(filter.Name) == 0 {\n\t\t\treturn false, fmt.Errorf(\"filter has no name: %s\", filter.String())\n\t\t}\n\t\ttc := filter.GetTypedConfig()\n\t\tif tc == nil {\n\t\t\treturn false, fmt.Errorf(\"filter has no type: %s\", filter.String())\n\t\t}\n\t\tswitch tc.GetTypeUrl() {\n\t\tcase ciliumL7FilterTypeURL:\n\t\t\tfoundCiliumL7Filter = true\n\t\tcase upstreamCodecFilterTypeURL:\n\t\t\tcodecFilterIndex = j\n\t\t}\n\t}\n\tchanged := false\n\tif !foundCiliumL7Filter {\n\t\tj := codecFilterIndex\n\t\tif j >= 0 {\n\t\t\tfilters = append(filters[:j+1], filters[j:]...)\n\t\t\tfilters[j] = envoy.GetCiliumHttpFilter(accessLogPath)","sourceCodeStart":894,"sourceCodeEnd":930,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/pkg/ciliumenvoyconfig/cec_resource_parser.go#L894-L930","documentation":"injectCiliumUpstreamL7Filter requires every filter in the upstream filter chain to have a name so it can identify and reorder them around the Cilium L7 filter. An unnamed filter makes the chain unprocessable, so parsing fails.","triggerScenarios":"injectCiliumUpstreamL7Filter encounters filters[j] with len(filter.Name)==0 while iterating the cluster's filter chain (via ParseResources or TestUpstreamInject).","commonSituations":"CEC YAML where a filter entry omits the name field (only config present); templating/tooling dropping the name; hand-edited CEC removing a name accidentally.","solutions":["Add the required 'name' field to the filter entry shown in the error dump","Remove placeholder/empty filter entries from the chain","Fix the generator or template producing nameless filters"],"exampleFix":"// before\nfilters:\n- typed_config:\n    \"@type\": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy\n// after\nfilters:\n- name: envoy.filters.network.tcp_proxy\n  typed_config:\n    \"@type\": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy","handlingStrategy":"validation","validationCode":"func allFiltersNamed(filters []*envoy_config_listener.Filter) error {\n    for i, f := range filters {\n        if f.GetName() == \"\" {\n            return fmt.Errorf(\"filter[%d] missing name\", i)\n        }\n    }\n    return nil\n}","typeGuard":"func hasName(f *envoy_config_listener.Filter) bool {\n    return f != nil && f.GetName() != \"\"\n}","tryCatchPattern":null,"preventionTips":["Require 'name' on every filter entry in CEC YAML schema/lint","Check YAML indentation so fields don't fall out of the filter entry","Run `cilium-dbg bpf` / dry-run parse of CECs before rollout"],"tags":["envoy","cilium","filter-chain","config-validation"],"backgroundTag":"envoy-filter-name-missing","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}