{"record":{"id":"85bf4780157ca1b4","repo":"kubernetes/kops","slug":"building-kops-channels-pod-w","errorCode":null,"errorMessage":"building kops-channels pod: %w","messagePattern":"building kops-channels pod: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/components/channels/model.go","lineNumber":70,"sourceCode":"// the state store. Nodeup copies the manifest onto each control-plane node, mirroring how\n// etcd-manager manifests are delivered.\ntype ChannelsBuilder struct {\n\t*model.KopsModelContext\n\tLifecycle    fi.Lifecycle\n\tAssetBuilder *assets.AssetBuilder\n}\n\nvar _ fi.CloudupModelBuilder = &ChannelsBuilder{}\n\nfunc (b *ChannelsBuilder) Build(c *fi.CloudupModelBuilderContext) error {\n\tchannels, err := b.channelList()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tpod, err := b.buildPod(channels)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"building kops-channels pod: %w\", err)\n\t}\n\tmanifest, err := k8scodecs.ToVersionedYaml(pod)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"marshaling kops-channels pod: %w\", err)\n\t}\n\n\tc.AddTask(&fitasks.ManagedFile{\n\t\tContents:  fi.NewBytesResource(manifest),\n\t\tLifecycle: b.Lifecycle,\n\t\tLocation:  new(channelsManifestPath),\n\t\tName:      new(\"manifests-channels-kops-channels\"),\n\t})\n\treturn nil\n}\n\n// channelList returns the bootstrap channel plus cluster.Spec.Addons. The bootstrap URL is\n// built via vfs path joining so toolbox_enroll's identity comparison stays byte-identical.\nfunc (b *ChannelsBuilder) channelList() ([]string, error) {","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/components/channels/model.go#L52-L88","documentation":"The kops-channels addon builder constructs a static pod for the channels controller via b.buildPod(channels). Any failure inside buildPod (typically image resolution via the asset builder, or invalid channel task fields) is wrapped with this message so callers know which manifest failed.","triggerScenarios":"Rendering the channels addon during model build when buildPod fails — e.g. the kops-channels image cannot be resolved/remeapped by the AssetBuilder (bad registry, unreachable mirror, malformed image string).","commonSituations":"Air-gapped/ corporately mirrored registries where the asset builder rewrites registry.k8s.io images and fails; corrupted KOPS_STATE_STORE addons; custom image placeholders unresolved.","solutions":["Inspect the wrapped inner error (%w) to find the actual buildPod failure","Verify image assets resolve: check the channel image string and your asset/registry mirror configuration","Re-run with --v=2 or higher logging to see which asset failed to build","If the state store addons are corrupt, re-sync the bootstrap-channel.yaml addon file"],"exampleFix":"# before: unreachable image mirror\nekops update cluster --name cluster --target terraform\n# error: building kops-channels pod: ...\n# after: point assets at a reachable mirror\nexport KOPS_ASSET_URL=https://internal-mirror.example.com\nkops toolbox bundle-file --assets-output assets\nkops update cluster --name cluster --target terraform","handlingStrategy":"try-catch","validationCode":"img, err := assetBuilder.RemapImage(channelPodImage)\nif err != nil { return fmt.Errorf(\"channels image %q cannot be resolved: %w\", channelPodImage, err) }","typeGuard":null,"tryCatchPattern":"if err := b.Build(ctx, obj); err != nil {\n\tvar inner error\n\tif errors.Unwrap(err) != nil { inner = errors.Unwrap(err) }\n\tlog.Errorf(\"channels pod build failed: %v (cause: %v)\", err, inner)\n\treturn err\n}","preventionTips":["Verify image mirror/asset URLs are reachable before running model builds","Use errors.Unwrap/%+v logging to surface the root cause from wrapped errors","Keep the kops binary and KOPS_STATE_STORE addons in sync"],"tags":["channels","manifest","image-assets"],"backgroundTag":"pod-manifest-build-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}