Fixed: Print pod log error when response status is 404 returned by te… (#3021)
* Fixed: Print pod log error when response status is 404 returned by test function * Update util.go --------- Signed-off-by: waitstory <waitstory@163.com>
This commit is contained in:
@@ -63,10 +63,17 @@ func GetFunctionPodLogs(ctx context.Context, client cmd.Client, logFilter LogFil
|
||||
podNs = logFilter.PodNamespace
|
||||
}
|
||||
// Get function Pods first
|
||||
selector := map[string]string{
|
||||
fv1.FUNCTION_UID: string(f.ObjectMeta.UID),
|
||||
fv1.ENVIRONMENT_NAME: f.Spec.Environment.Name,
|
||||
fv1.ENVIRONMENT_NAMESPACE: f.Spec.Environment.Namespace,
|
||||
var selector map[string]string
|
||||
if f.Spec.InvokeStrategy.ExecutionStrategy.ExecutorType != fv1.ExecutorTypeContainer {
|
||||
selector = map[string]string{
|
||||
fv1.FUNCTION_UID: string(f.ObjectMeta.UID),
|
||||
fv1.ENVIRONMENT_NAME: f.Spec.Environment.Name,
|
||||
fv1.ENVIRONMENT_NAMESPACE: f.Spec.Environment.Namespace,
|
||||
}
|
||||
} else {
|
||||
selector = map[string]string{
|
||||
fv1.FUNCTION_UID: string(f.ObjectMeta.UID),
|
||||
}
|
||||
}
|
||||
|
||||
podNs = util.ResolveFunctionNS(podNs)
|
||||
|
||||
Reference in New Issue
Block a user