Skip to content

Commit

Permalink
Merge pull request #436 from kubescape/feature/support-old-k8s
Browse files Browse the repository at this point in the history
Adding support for old k8s versions by not throwing an error when con…
  • Loading branch information
amitschendel authored Dec 16, 2024
2 parents 60b59b6 + 5a40f2a commit 53f9c40
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,10 @@ func DetectContainerRuntimeViaK8sAPI(ctx context.Context, k8sClient *k8sinterfac
// override the socket path
realSocketPath, err := getContainerRuntimeSocketPath(k8sClient, nodeName)
if err != nil {
return nil, fmt.Errorf("failed to get container runtime socket path from Kubelet configz: %v", err)
logger.L().Warning("failed to get container runtime socket path from Kubelet configz", helpers.String("error", err.Error()))
} else {
runtimeConfig.SocketPath = realSocketPath
}
runtimeConfig.SocketPath = realSocketPath
// unset the runtime protocol
runtimeConfig.RuntimeProtocol = ""
return runtimeConfig, nil
Expand Down

0 comments on commit 53f9c40

Please sign in to comment.