From c8e6c2eecd2c58e4d727b6d9b1f3239aa3022def Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Thu, 6 Apr 2017 16:32:42 +0800 Subject: [PATCH] Updated comments according to the logic. --- pkg/controller/statefulset/stateful_set_utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/statefulset/stateful_set_utils.go b/pkg/controller/statefulset/stateful_set_utils.go index efe795da54e..4d4ed0bfc75 100644 --- a/pkg/controller/statefulset/stateful_set_utils.go +++ b/pkg/controller/statefulset/stateful_set_utils.go @@ -56,8 +56,8 @@ func (o overlappingStatefulSets) Less(i, j int) bool { var statefulPodRegex = regexp.MustCompile("(.*)-([0-9]+)$") // getParentNameAndOrdinal gets the name of pod's parent StatefulSet and pod's ordinal as extracted from its Name. If -// the Pod was not created by a StatefulSet, its parent is considered to be nil, and its ordinal is considered to be -// -1. +// the Pod was not created by a StatefulSet, its parent is considered to be empty string, and its ordinal is considered +// to be -1. func getParentNameAndOrdinal(pod *v1.Pod) (string, int) { parent := "" ordinal := -1