From 5cdecefc4998028c8b901e215832c2440bfad42e Mon Sep 17 00:00:00 2001 From: waitstory Date: Wed, 11 Sep 2024 16:07:09 +0800 Subject: [PATCH] The function is updated without an "envNamespace" argument, so we need to remove that logic (#3010) Signed-off-by: waitstory --- pkg/fission-cli/cmd/function/update.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkg/fission-cli/cmd/function/update.go b/pkg/fission-cli/cmd/function/update.go index d3759f5a..594f8cb6 100644 --- a/pkg/fission-cli/cmd/function/update.go +++ b/pkg/fission-cli/cmd/function/update.go @@ -67,7 +67,6 @@ func (opts *UpdateSubCommand) complete(input cli.Input) error { } 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 // 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. @@ -75,10 +74,6 @@ func (opts *UpdateSubCommand) complete(input cli.Input) error { envName = "" } - if envNamespace == function.Spec.Environment.Namespace { - envNamespace = "" - } - pkgName := input.String(flagkey.FnPackageName) entrypoint := input.String(flagkey.FnEntrypoint) @@ -133,10 +128,6 @@ func (opts *UpdateSubCommand) complete(input cli.Input) error { function.Spec.Environment.Name = envName } - if len(envNamespace) > 0 { - function.Spec.Environment.Namespace = envNamespace - } - if len(entrypoint) > 0 { function.Spec.Package.FunctionName = entrypoint }