{"record":{"id":"95b555b7f6106a67","repo":"kubernetes/kops","slug":"legacy-addons-are-deprecated-and-unmaintained-use","errorCode":null,"errorMessage":"legacy addons are deprecated and unmaintained, use managed addons instead of %s","messagePattern":"legacy addons are deprecated and unmaintained, use managed addons instead of (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"channels/pkg/cmd/apply_channel.go","lineNumber":341,"sourceCode":"\t\tfor name, version := range addons {\n\t\t\tchannelVersions[ns.Name+\":\"+name] = version\n\t\t}\n\t}\n\treturn channelVersions, nil\n}\n\nfunc buildMenu(vfsContext *vfs.VFSContext, kubernetesVersion semver.Version, channelLocation string) (*channels.AddonMenu, error) {\n\tmenu := channels.NewAddonMenu()\n\n\tlocation, err := url.Parse(channelLocation)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to parse argument %q as url\", channelLocation)\n\t}\n\tif !location.IsAbs() {\n\t\texpanded := \"https://raw.githubusercontent.com/kubernetes/kops/master/addons/\" + channelLocation + \"/addon.yaml\"\n\t\t// Disallow the use of legacy addons from the \"well-known\" location starting Kubernetes 1.23:\n\t\t// https://raw.githubusercontent.com/kubernetes/kops/master/addons/<name>/addon.yaml\n\t\treturn nil, fmt.Errorf(\"legacy addons are deprecated and unmaintained, use managed addons instead of %s\", expanded)\n\t}\n\to, err := channels.LoadAddons(vfsContext, channelLocation, location)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error loading channel %q: %v\", location, err)\n\t}\n\n\tcurrent, err := o.GetCurrent(kubernetesVersion)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error processing latest versions in %q: %v\", location, err)\n\t}\n\tmenu.MergeAddons(current)\n\treturn menu, nil\n}\n","sourceCodeStart":323,"sourceCodeEnd":355,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/channels/pkg/cmd/apply_channel.go#L323-L355","documentation":"buildMenu rejects relative (non-absolute) channel locations because they resolve to the legacy well-known addons location (raw.githubusercontent.com/kubernetes/kops/master/addons/<name>/addon.yaml). Legacy addons are deprecated and unmaintained since Kubernetes 1.23, so the tool refuses and names the expanded legacy URL.","triggerScenarios":"Running `kops apply channel <name>` with a bare/relative addon name (e.g. networking.flannel) — anything that parses as a URL but is not absolute.","commonSituations":"Following pre-1.23 kOps docs or tutorials listing legacy addons, migrating old automation scripts, habitually typing short addon names.","solutions":["Replace the legacy addon with a kOps managed addon (spec.addons in the cluster spec)","Use an absolute https:// URL to a maintained addon manifest instead of the bare name","Consult kOps >= 1.23 docs for the managed-addon equivalent","Do not bypass the check; legacy manifests are unmaintained"],"exampleFix":"// before\nkops apply channel networking.flannel\n// after\nkops edit cluster  # spec.addons:\n# - manifest: https://example.com/addons/networking.addons.k8s.io/addon.yaml\nkops update cluster --yes","handlingStrategy":"validation","validationCode":"u, err := url.Parse(channelLocation)\nif err == nil && !u.IsAbs() {\n\treturn fmt.Errorf(\"%q is a legacy addon name; use managed addons or an absolute manifest URL\", channelLocation)\n}","typeGuard":"func isAbsoluteURL(s string) bool {\n\tu, err := url.Parse(s)\n\treturn err == nil && u.IsAbs()\n}","tryCatchPattern":"if err := RunApplyChannel(ctx, f, out, args, options); err != nil && strings.Contains(err.Error(), \"legacy addons are deprecated\") {\n\treturn fmt.Errorf(\"migrate %v to spec.addons managed addons instead\", args)\n}","preventionTips":["Stop using bare addon names; always use full manifest URLs","Move legacy addons into spec.addons in the cluster spec","Update automation written against pre-1.23 kOps docs"],"tags":["deprecation","addons","legacy","url-validation"],"backgroundTag":"legacy-addon-deprecated","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}