GoogleContainerTools/skaffold · error
no tagger available for component %+v
Error message
no tagger available for component %+v
What it means
A field found in the custom template has no registered tagger component. `EvaluateComponents` handles known fields (DATE, GIT, SHA, INPUT_DIGEST, LABEL, DIGEST etc.) with a switch; an unknown field falls into `default` and this error names it. Tagging stops because the template cannot be evaluated.
Source
Thrown at pkg/skaffold/tag/custom_template.go:93
if _, ok := v.(*customTemplateTagger); ok {
return nil, fmt.Errorf("invalid component specified in custom template: %v", v)
}
taggers[field] = v
continue
}
switch field {
case "GIT":
gitTagger, _ := NewGitCommit("", "", false)
taggers[field] = gitTagger
case "DATE":
taggers[field] = NewDateTimeTagger("", "")
case "SHA":
taggers[field] = &ChecksumTagger{}
case "INPUT_DIGEST":
inputDigestTagger, _ := NewInputDigestTagger(t.RunCtx, graph.ToArtifactGraph(t.RunCtx.Artifacts()))
taggers[field] = inputDigestTagger
default:
return nil, fmt.Errorf("no tagger available for component %+v", field)
}
}
customMap := map[string]string{}
for k, v := range taggers {
tag, err := v.GenerateTag(ctx, image)
if err != nil {
return nil, fmt.Errorf("evaluating custom template component: %w", err)
}
customMap[k] = tag
}
return customMap, nil
}
// ParseCustomTemplate is a simple wrapper to parse an custom template.
func ParseCustomTemplate(t string) (*template.Template, error) {
return template.New("customTemplate").Parse(t)
}View on GitHub (pinned to a1189de023)
Solutions
- Use a supported component (e.g. {{.SHA}}, {{.GIT}}, {{.DATE}}) or fix the typo
- Register the missing field in the components map if using the API directly
- Inspect GetTemplateFields output to see exactly which field is unrecognized
- Consult Skaffold docs for the list of valid custom template components
Example fix
// before
customTemplate: "{{.SH}}-{{.DATE}}"
// after
customTemplate: "{{.SHA}}-{{.DATE}}" Defensive patterns
Strategy: validation
Validate before calling
// check every template field is a known component before tagging
known := map[string]bool{"DATE": true, "SHA": true, "GIT": true, "LABEL": true, "DIGEST": true, "INPUT_DIGEST": true}
for _, f := range tag.GetTemplateFields(tmpl) {
if !known[f] {
if _, ok := components[f]; !ok {
return fmt.Errorf("unknown template component %q", f)
}
}
} Try / catch
taggers, err := tag.EvaluateComponents(ctx, t, image)
if err != nil {
if strings.Contains(err.Error(), "no tagger available for component") {
return fmt.Errorf("fix component name in customTemplate: %w", err)
}
return err
} Prevention
- Copy component names from official docs verbatim
- Validate customTemplate fields against the supported list in CI
- Beware typos: SHA vs SH, DIGEST vs DIGESTS
- Register custom components explicitly when using the API
When it happens
Trigger: The template string contains a field like `{{.FOO}}` where FOO is neither in `t.Components` nor a recognized built-in component; `GetTemplateFields` extracts it and the switch has no case for it.
Common situations: Typo in a component name in skaffold.yaml (e.g. `{{.SH}}` instead of `{{.SHA}}`); template placeholders like `{{.IMAGE}}` that aren't supported components; forgetting to supply a component in the components map when calling the API programmatically.
Related errors
- parsing template: %w
- executing template: %w
- invalid component specified in custom template: %v
- evaluating custom template component: %w
- bad timezone provided: %q, error: %s
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/71344e7737c37248.
Report an issue: GitHub.