Skip to content

Commit

Permalink
Merge pull request #395 from partik03/probe_panic
Browse files Browse the repository at this point in the history
Fixed the probe panic issue
  • Loading branch information
daemon1024 authored Mar 15, 2024
2 parents ed13737 + 678a97b commit 4da2792
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion probe/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,11 @@ func getAnnotatedPods(c *k8s.Client, o Options, postureData map[string]string) (
if err != nil {
return nil, [][]string{}, err
}
data = append(data, []string{armoredPod.Namespace, mp[armoredPod.Namespace].NsPostureString, mp[armoredPod.Namespace].NsVisibilityString, armoredPod.Name, ""})
if _, exists := mp[armoredPod.Namespace]; !exists {
data = append(data, []string{armoredPod.Namespace, "", "", armoredPod.Name, ""})
} else {
data = append(data, []string{armoredPod.Namespace, mp[armoredPod.Namespace].NsPostureString, mp[armoredPod.Namespace].NsVisibilityString, armoredPod.Name, ""})
}
labels := getAnnotatedPodLabels(armoredPod.Labels)

for policyKey, policyValue := range policyMap {
Expand Down

0 comments on commit 4da2792

Please sign in to comment.