cli: add config kubernetes-versions subcommand (#1224)

Allows users to learn which k8s versions are supported by the
current CLI.
Extend respective docs section.
This commit is contained in:
Otto Bittner 2023-02-22 09:52:47 +01:00 committed by GitHub
parent ce09b9dae5
commit d78d22f95a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 10 deletions

View file

@ -49,16 +49,12 @@ func NewValidK8sVersion(k8sVersion string) (ValidK8sVersion, error) {
// IsSupportedK8sVersion checks if a given Kubernetes version is supported by Constellation.
func IsSupportedK8sVersion(version string) bool {
switch version {
case string(V1_24):
return true
case string(V1_25):
return true
case string(V1_26):
return true
default:
return false
for _, valid := range SupportedK8sVersions() {
if valid == version {
return true
}
}
return false
}
// IsPreviewK8sVersion checks if a given Kubernetes version is still in preview and not fully supported.