mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-04 23:35:11 -04:00
CLI: use global image version field
- Restructure config by removing CSP-specific image references - Add global image field - Download image lookup table on create - Download QEMU image on QEMU create
This commit is contained in:
parent
9222468d3b
commit
575b6e93f6
21 changed files with 1068 additions and 380 deletions
|
@ -17,6 +17,19 @@ import (
|
|||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func validateImage(fl validator.FieldLevel) bool {
|
||||
image := fl.Field().String()
|
||||
switch {
|
||||
case image == "":
|
||||
return false
|
||||
case image == "..":
|
||||
return false
|
||||
case strings.Contains(image, "/"):
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func validateK8sVersion(fl validator.FieldLevel) bool {
|
||||
return versions.IsSupportedK8sVersion(fl.Field().String())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue