mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #44141 from k82cn/ss_typo
Automatic merge from submit-queue (batch tested with PRs 43373, 41780, 44141, 43914, 44180) Updated comments according to the logic. Updated comments according to the logic: it'll return empty string instead of nil if failed to match the regex.
This commit is contained in:
commit
97c38377f3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user