stefanprodan / timoni

Timoni is a package manager for Kubernetes, powered by CUE and inspired by Helm.
https://timoni.sh
Apache License 2.0
1.51k stars 67 forks source link

Add semver validation to Timoni's CUE schemas #266

Closed stefanprodan closed 9 months ago

stefanprodan commented 9 months ago

Add semver helper to Timoni's CUE schemas for enforcing a minimum Kubernetes minor version, e.g.:

clusterVersion: timoniv1.#SemVer{#Version: kubeVersion, #Minimum: "1.20.0"}

The above will fail on Kubernetes 1.18.0 with clusterVersion.minor: invalid value 18 (out of bound >=20).

On Kubernetes 1.28.4 the clusterVersion will output:

major:    1
minor:    28