GoogleContainerTools/skaffold · error
could not fetch config connector resources: %w
Error message
could not fetch config connector resources: %w
What it means
getConfigConnectorResources wraps any error from selecting Config Connector resources out of the rendered manifest list with this message. This is a manifest-selection error, not a cluster API error — the failure happens in SelectResources before any client call.
Source
Thrown at pkg/skaffold/kubernetes/status/status_check.go:308
if err != nil {
return nil, fmt.Errorf("could not fetch standalone pods: %w", err)
}
if len(pods) == 0 {
return result, nil
}
pd := diag.New([]string{ns}).
WithLabel(label.RunIDLabel, l.Labels()[label.RunIDLabel]).
WithValidators([]validator.Validator{validator.NewPodValidator(client, selector)})
result = append(result, resource.NewResource(string(resource.ResourceTypes.StandalonePods), resource.ResourceTypes.StandalonePods, ns, deadlineDuration, tolerateFailures).WithValidator(pd))
return result, nil
}
func getConfigConnectorResources(client kubernetes.Interface, dynClient dynamic.Interface, m manifest.ManifestList, ns string, l *label.DefaultLabeller, deadlineDuration time.Duration, tolerateFailures bool) ([]*resource.Resource, error) {
var result []*resource.Resource
uRes, err := m.SelectResources(manifest.ConfigConnectorResourceSelector...)
if err != nil {
return nil, fmt.Errorf("could not fetch config connector resources: %w", err)
}
for _, r := range uRes {
resName := r.GroupVersionKind().String()
if r.GetName() != "" {
resName = fmt.Sprintf("%s, Name=%s", resName, r.GetName())
}
pd := diag.New([]string{ns}).
WithLabel(label.RunIDLabel, l.Labels()[label.RunIDLabel]).
WithValidators([]validator.Validator{validator.NewConfigConnectorValidator(client, dynClient, r.GroupVersionKind())})
result = append(result, resource.NewResource(resName, resource.ResourceTypes.ConfigConnector, ns, deadlineDuration, tolerateFailures).WithValidator(pd))
}
return result, nil
}
func getCustomResources(client kubernetes.Interface, dynClient dynamic.Interface, m manifest.ManifestList, ns string, deadlineDuration time.Duration, tolerateFailures bool, selector manifest.GroupKindSelector) ([]*resource.Resource, error) {
var result []*resource.Resource
uRes, err := m.SelectResources(selector)View on GitHub (pinned to a1189de023)
Solutions
- Render and lint manifests: 'skaffold render' then yamllint / 'kubectl apply --dry-run=client -f -'
- Fix parse errors in the offending YAML (indentation, duplicate keys, bad types)
- Confirm Config Connector resource GVKs match manifest.ConfigConnectorResourceSelector for your CNRM version
- Bisect the manifest list to isolate the failing document
- Upgrade/downgrade skaffold to align selector GVKs with your manifests
Example fix
// before: duplicate key breaks YAML parsing // metadata: // name: a // name: a2 // after: // metadata: // name: a
Defensive patterns
Strategy: validation
Validate before calling
const docs = YAML.parseAllDocuments(renderedManifests, { uniqueKeys: true });
for (const d of docs) {
if (d.errors.length) throw new Error('YAML errors will fail config-connector selection: ' + d.errors);
} Try / catch
try {
await statusCheck();
} catch (err) {
if (err.message.includes('could not fetch config connector resources')) {
// parse/selection failure in manifests — re-render and lint
}
throw err;
} Prevention
- Lint rendered manifests (yamllint with unique-keys) in CI
- Pin skaffold + Config Connector versions compatible with your CRD GVKs
- Catch duplicate keys at render time
- Test the full render->deploy->status loop on a scratch namespace
When it happens
Trigger: manifest.ManifestList.SelectResources(manifest.ConfigConnectorResourceSelector...) returns an error: manifests fail to unmarshal/parse, or the GVK-based predicate rejects/mis-parses a resource during filtering.
Common situations: Rendered manifests with duplicate YAML keys or invalid types; CRD-like CNRM resources with unexpected fields; annotation injection duplicating entries; upgrading skaffold while manifests use deprecated fields.
Related errors
- STATUSCHECK_CONFIG_CONNECTOR_RESOURCES_FETCH_ERR
- error converting %s to map[string]interface{}
- could not fetch custom resources: %w
- invalid local-registry-hosting ConfigMap
- loading post-renderer result: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/053799b3a4a7da25.
Report an issue: GitHub.