#56157·rancher

[EPIC] Migrate to future-proof YAML libraries

Author: moioCreated Jul 21, 2026Updated Sep 30, 2026
LabelsEpic

The widely used gopkg.in/yaml.v3 YAML library for Go (https://github.com/go-yaml/yaml) has been archived and is now unmaintained.

A new security-maintained fork by the YAML organization go.yaml.in/yaml/v3 (https://github.com/yaml/go-yaml) now exists - this issue is to update our codebase to use it.

Guideline

  • Focus on direct dependencies first. If it is possible to update indirect ones, that's also welcome, but not strictly required
  • Focus on main first. If it is trivial to backport, that's also welcome, but not strictly required
  • Several maintained versions of the new library exist: go.yaml.in/yaml/v2 and v3 (identical interfaces, security maintained) or go.yaml.in/yaml/v4 (with new features). Use v4 for new code and transition to it where that brings advantages, otherwise v3
  • If other dependencies indirectly require the old package, replacement is also a possibility
  • Migrate away from the github.com/ghodss/yaml library, that wraps v2 and has not seen updates since 2017. Replace with sigs.k8s.io/yaml which is a maintained direct replacement and uses go.yaml.in/yaml internally

Identified uses of the outdated modules by Team

Tool I used to compute this list. Team assignment was done manually according to my current understanding of responsibilities, apologies in advance if I misclassified any.

Any Team:

Elemental:

Release:

ORBS:

Provisioning:

Frameworks:

Security:

QA:

k3k:

  • rancher/k3k#1062

@bcraft:

Networking:

Collie:

  • rancher/rancher#56162

RKE2/k3s: