mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-22 23:10:36 -04:00
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:
parent
ce09b9dae5
commit
d78d22f95a
5 changed files with 49 additions and 10 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue