Skip to content

Commit

Permalink
ignore Pods not owned by Replicaset
Browse files Browse the repository at this point in the history
  • Loading branch information
sanposhiho committed Mar 1, 2024
1 parent b145894 commit 4303c85
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ func (s *Service) GetDeploymentForPod(pod *v1.Pod) (string, error) {
return "", nil
}

if ownerRefrence.Kind != "ReplicaSet" {
// Tortoise only supports Deployment for now, and ReplicaSet is the only controller that can own a pod in this case.
return "", nil
}

k := &controllerfetcher.ControllerKeyWithAPIVersion{
ControllerKey: controllerfetcher.ControllerKey{
Namespace: pod.Namespace,
Expand Down

0 comments on commit 4303c85

Please sign in to comment.