Skip to content

Commit

Permalink
match apps/* statefulset
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater authored Jul 3, 2020
1 parent 83dc420 commit 9440a11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ func (c *Controller) handleUpdatePod(key string) error {

func isStatefulSetPod(pod *v1.Pod) (bool, string) {
for _, owner := range pod.OwnerReferences {
if owner.Kind == "StatefulSet" && owner.APIVersion == "apps" {
if owner.Kind == "StatefulSet" && strings.HasPrefix(owner.APIVersion, "apps/") {
return true, owner.Name
}
}
Expand Down

0 comments on commit 9440a11

Please sign in to comment.