Do not set automatically set env version if user has already specified it.
This commit is contained in:
@@ -57,20 +57,22 @@ func envCreate(c *cli.Context) error {
|
|||||||
envExternalNetwork := c.Bool("externalnetwork")
|
envExternalNetwork := c.Bool("externalnetwork")
|
||||||
|
|
||||||
if len(envBuilderImg) > 0 {
|
if len(envBuilderImg) > 0 {
|
||||||
envVersion = 2
|
if !c.IsSet("version") {
|
||||||
|
envVersion = 2
|
||||||
|
}
|
||||||
if len(envBuildCmd) == 0 {
|
if len(envBuildCmd) == 0 {
|
||||||
envBuildCmd = "build"
|
envBuildCmd = "build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceReq := getResourceReq(c)
|
|
||||||
|
|
||||||
// Environment API interface version is not specified and
|
// Environment API interface version is not specified and
|
||||||
// builder image is empty, set default interface version
|
// builder image is empty, set default interface version
|
||||||
if envVersion == 0 {
|
if envVersion == 0 {
|
||||||
envVersion = 1
|
envVersion = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resourceReq := getResourceReq(c)
|
||||||
|
|
||||||
env := &crd.Environment{
|
env := &crd.Environment{
|
||||||
Metadata: metav1.ObjectMeta{
|
Metadata: metav1.ObjectMeta{
|
||||||
Name: envName,
|
Name: envName,
|
||||||
|
|||||||
Reference in New Issue
Block a user