Skip to content

Commit

Permalink
Remove unused flag and continue on error
Browse files Browse the repository at this point in the history
Signed-off-by: AbdelrahmanElawady <[email protected]>
  • Loading branch information
AbdelrahmanElawady committed May 20, 2024
1 parent 4873aff commit 8eb8ead
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion pkg/KubeArmorOperator/cmd/snitch-cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ func applyCRIOHook(socket string) error {
"/usr/share/kubearmor/hook",
"--runtime-socket",
socket,
"--k8s",
},
},
When: hooks.When{Always: &always},
Expand Down
4 changes: 3 additions & 1 deletion pkg/KubeArmorOperator/hook/crio.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package main
import (
"context"
"encoding/json"
"log"

"github.com/kubearmor/KubeArmor/KubeArmor/types"
"github.com/opencontainers/runtime-spec/specs-go"
Expand Down Expand Up @@ -53,7 +54,8 @@ func (h *crioHandler) listContainers(ctx context.Context) ([]types.Container, er
for _, container := range containersList.GetContainers() {
c, err := h.getContainer(ctx, container.GetId())
if err != nil {
return nil, err
log.Printf("failed to get container %q: %s", container.GetId(), err.Error())
continue
}
containers = append(containers, c)
}
Expand Down
2 changes: 0 additions & 2 deletions pkg/KubeArmorOperator/hook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ import (
var (
kubeArmorSocket string
runtimeSocket string
k8s bool
detached bool
)

func main() {
flag.StringVar(&kubeArmorSocket, "kubearmor-socket", "/var/run/kubearmor/ka.sock", "KubeArmor socket")
flag.StringVar(&runtimeSocket, "runtime-socket", "", "container runtime socket")
flag.BoolVar(&k8s, "k8s", false, "kubernetes environment")
flag.BoolVar(&detached, "detached", false, "run detached")
flag.Parse()

Expand Down

0 comments on commit 8eb8ead

Please sign in to comment.