mirror of https://github.com/k3s-io/k3s
StatefulSet: Update Lister documentation for ControllerRef.
The StatefulSet Listers still use selectors, because this is the behavior expected by callers. This clarifies the meaning of the returned list. Some callers may need to switch to using GetControllerOf() instead, but that is a separate, case-by-case issue.pull/6/head
parent
ea85a201c7
commit
25d90cdaec
|
@ -35,7 +35,9 @@ type StatefulSetListerExpansion interface {
|
|||
// StatefulSetNamespaeLister.
|
||||
type StatefulSetNamespaceListerExpansion interface{}
|
||||
|
||||
// GetPodStatefulSets returns a list of StatefulSets managing a pod. Returns an error only if no matching StatefulSets are found.
|
||||
// GetPodStatefulSets returns a list of StatefulSets that potentially match a pod.
|
||||
// Only the one specified in the Pod's ControllerRef will actually manage it.
|
||||
// Returns an error only if no matching StatefulSets are found.
|
||||
func (s *statefulSetLister) GetPodStatefulSets(pod *api.Pod) ([]*apps.StatefulSet, error) {
|
||||
var selector labels.Selector
|
||||
var ps *apps.StatefulSet
|
||||
|
|
|
@ -35,7 +35,9 @@ type StatefulSetListerExpansion interface {
|
|||
// StatefulSetNamespaeLister.
|
||||
type StatefulSetNamespaceListerExpansion interface{}
|
||||
|
||||
// GetPodStatefulSets returns a list of StatefulSets managing a pod. Returns an error only if no matching StatefulSets are found.
|
||||
// GetPodStatefulSets returns a list of StatefulSets that potentially match a pod.
|
||||
// Only the one specified in the Pod's ControllerRef will actually manage it.
|
||||
// Returns an error only if no matching StatefulSets are found.
|
||||
func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error) {
|
||||
var selector labels.Selector
|
||||
var ps *apps.StatefulSet
|
||||
|
|
|
@ -35,7 +35,9 @@ type StatefulSetListerExpansion interface {
|
|||
// StatefulSetNamespaeLister.
|
||||
type StatefulSetNamespaceListerExpansion interface{}
|
||||
|
||||
// GetPodStatefulSets returns a list of StatefulSets managing a pod. Returns an error only if no matching StatefulSets are found.
|
||||
// GetPodStatefulSets returns a list of StatefulSets that potentially match a pod.
|
||||
// Only the one specified in the Pod's ControllerRef will actually manage it.
|
||||
// Returns an error only if no matching StatefulSets are found.
|
||||
func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error) {
|
||||
var selector labels.Selector
|
||||
var ps *apps.StatefulSet
|
||||
|
|
Loading…
Reference in New Issue