Skip to content

Commit

Permalink
feat: add multidoc check to the Talos quirks module
Browse files Browse the repository at this point in the history
Make it report true for Talos >= 1.5.0.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
  • Loading branch information
Unix4ever committed May 29, 2024
1 parent 0b4a977 commit 4feb94c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/machinery/imager/quirks/quirks.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,15 @@ func (q Quirks) UseZSTDCompression() bool {

return q.v.GTE(minVersionZstd)
}

var minVersionMultidoc = semver.MustParse("1.5.0")

// SupportsMultidoc returns true if the Talos version supports multidoc machine configs.
func (q Quirks) SupportsMultidoc() bool {
// if the version doesn't parse, we assume it's latest Talos
if q.v == nil {
return true
}

return q.v.GTE(minVersionMultidoc)
}

0 comments on commit 4feb94c

Please sign in to comment.