mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-16 23:03:51 +00:00
Fix problems that golang inspection reported (#1158)
This commit is contained in:
@@ -28,7 +28,7 @@ func UpdateTapTargets(tls *TlsTapper, pods *[]v1.Pod, procfs string) error {
|
||||
tls.ClearPids()
|
||||
|
||||
for pid, pod := range containerPids {
|
||||
if err := tls.AddSsllibPid(procfs, pid, pod.Namespace); err != nil {
|
||||
if err := tls.AddSSLLibPid(procfs, pid, pod.Namespace); err != nil {
|
||||
LogError(err)
|
||||
}
|
||||
|
||||
@@ -90,14 +90,14 @@ func buildContainerIdsMap(pods *[]v1.Pod) map[string]v1.Pod {
|
||||
|
||||
for _, pod := range *pods {
|
||||
for _, container := range pod.Status.ContainerStatuses {
|
||||
url, err := url.Parse(container.ContainerID)
|
||||
parsedUrl, err := url.Parse(container.ContainerID)
|
||||
|
||||
if err != nil {
|
||||
logger.Log.Warningf("Expecting URL like container ID %v", container.ContainerID)
|
||||
continue
|
||||
}
|
||||
|
||||
result[url.Host] = pod
|
||||
result[parsedUrl.Host] = pod
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user