The function is updated without an "envNamespace" argument, so we need to remove that logic (#3010)
Signed-off-by: waitstory <waitstory@163.com>
This commit is contained in:
@@ -67,7 +67,6 @@ func (opts *UpdateSubCommand) complete(input cli.Input) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
envName := input.String(flagkey.FnEnvironmentName)
|
envName := input.String(flagkey.FnEnvironmentName)
|
||||||
envNamespace := input.String(flagkey.NamespaceEnvironment)
|
|
||||||
// if the new env specified is the same as the old one, no need to update package
|
// if the new env specified is the same as the old one, no need to update package
|
||||||
// same is true for all update parameters, but, for now, we don't check all of them - because, its ok to
|
// same is true for all update parameters, but, for now, we don't check all of them - because, its ok to
|
||||||
// re-write the object with same old values, we just end up getting a new resource version for the object.
|
// re-write the object with same old values, we just end up getting a new resource version for the object.
|
||||||
@@ -75,10 +74,6 @@ func (opts *UpdateSubCommand) complete(input cli.Input) error {
|
|||||||
envName = ""
|
envName = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if envNamespace == function.Spec.Environment.Namespace {
|
|
||||||
envNamespace = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
pkgName := input.String(flagkey.FnPackageName)
|
pkgName := input.String(flagkey.FnPackageName)
|
||||||
entrypoint := input.String(flagkey.FnEntrypoint)
|
entrypoint := input.String(flagkey.FnEntrypoint)
|
||||||
|
|
||||||
@@ -133,10 +128,6 @@ func (opts *UpdateSubCommand) complete(input cli.Input) error {
|
|||||||
function.Spec.Environment.Name = envName
|
function.Spec.Environment.Name = envName
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(envNamespace) > 0 {
|
|
||||||
function.Spec.Environment.Namespace = envNamespace
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entrypoint) > 0 {
|
if len(entrypoint) > 0 {
|
||||||
function.Spec.Package.FunctionName = entrypoint
|
function.Spec.Package.FunctionName = entrypoint
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user