Skip to content

emitYAML leaves = and other YAML 1.1 special scalars unquoted #5074

Closed

Description

@lex00

Found with chant 0.124.95 while reading a clone of kubernetes/k8s.io at commit 2b3d9153 offline, for #5067.

emitYAML writes the string = without quotes. In YAML 1.1 a bare = is the value indicator, so 1.1 parsers refuse the file.

Source (kubernetes/gke-utility/monitoring/alerts.yaml, an AlertmanagerConfig):

matchType: "="

Built output:

matchType: =

PyYAML on the built file: could not determine a constructor for the tag 'tag:yaml.org,2002:value'. YAML 1.2 parsers read it as a string. Kubernetes tooling is mixed, so the built file may or may not apply depending on what reads it.

Wanted: quote = and the other YAML 1.1 special scalars (<<, ~, y, n, yes, no, on, off in their case variants, and sexagesimal-looking numbers) when emitting a string.

Activity

  1. added
    bug
    area:core
    epic:estate-read
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corebugepic:estate-read

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions