Skip to content

Commit

Permalink
Remove checking sh prefix in bash healthchecks filter
Browse files Browse the repository at this point in the history
Signed-off-by: Aliaksei Sofin <sofin.moffin@gmail.com>
  • Loading branch information
alexeysofin committed Apr 10, 2024
1 parent 2edde90 commit f6f5277
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/filters/health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package filters
import (
"context"
"path"
"strings"

"github.com/cilium/tetragon/api/v1/tetragon"
v1 "github.com/cilium/tetragon/pkg/oldhubble/api/v1"
Expand All @@ -31,7 +30,7 @@ func MaybeExecProbe(binary string, args string, execProbe []string) bool {
// "arguments": "/health/ping_liveness_local.sh 5"
// concatenated together will be ["/health/ping_liveness_local.sh", "/health/ping_liveness_local.sh", "5"],
// but execProbe will have only ["/health/ping_liveness_local.sh", "5"].
if binary == execProbe[0] && strings.HasSuffix(binary, ".sh") && len(argList) > 0 && binary == argList[0] {
if execProbe[0] == binary && len(argList) > 0 && argList[0] == binary {
argList = argList[1:]
}

Expand Down

0 comments on commit f6f5277

Please sign in to comment.