var semanticIgnoreResourceVersion … // GetPodServiceMemberships returns a set of Service keys for Services that have // a selector matching the given pod. func GetPodServiceMemberships(serviceLister v1listers.ServiceLister, pod *v1.Pod) (sets.String, error) { … } type PortMapKey … // NewPortMapKey generates a PortMapKey from endpoint ports. func NewPortMapKey(endpointPorts []discovery.EndpointPort) PortMapKey { … } // deepHashObjectToString creates a unique hash string from a go object. func deepHashObjectToString(objectToWrite interface{ … } // ShouldPodBeInEndpoints returns true if a specified pod should be in an // Endpoints or EndpointSlice resource. Terminating pods are only included if // includeTerminating is true. func ShouldPodBeInEndpoints(pod *v1.Pod, includeTerminating bool) bool { … } // ShouldSetHostname returns true if the Hostname attribute should be set on an // Endpoints Address or EndpointSlice Endpoint. func ShouldSetHostname(pod *v1.Pod, svc *v1.Service) bool { … } // podEndpointsChanged returns two boolean values. The first is true if the pod has // changed in a way that may change existing endpoints. The second value is true if the // pod has changed in a way that may affect which Services it matches. func podEndpointsChanged(oldPod, newPod *v1.Pod) (bool, bool) { … } // GetServicesToUpdateOnPodChange returns a set of Service keys for Services // that have potentially been affected by a change to this pod. func GetServicesToUpdateOnPodChange(serviceLister v1listers.ServiceLister, old, cur interface{ … } // GetPodFromDeleteAction returns a pointer to a pod if one can be derived from // obj (could be a *v1.Pod, or a DeletionFinalStateUnknown marker item). func GetPodFromDeleteAction(obj interface{ … } func hostNameAndDomainAreEqual(pod1, pod2 *v1.Pod) bool { … } func determineNeededServiceUpdates(oldServices, services sets.String, podChanged bool) sets.String { … } type portsInOrder … func (sl portsInOrder) Len() int { … } func (sl portsInOrder) Swap(i, j int) { … } func (sl portsInOrder) Less(i, j int) bool { … } // EndpointsEqualBeyondHash returns true if endpoints have equal attributes // but excludes equality checks that would have already been covered with // endpoint hashing (see hashEndpoint func for more info) and ignores difference // in ResourceVersion of TargetRef. func EndpointsEqualBeyondHash(ep1, ep2 *discovery.Endpoint) bool { … } // boolPtrChanged returns true if a set of bool pointers have different values. func boolPtrChanged(ptr1, ptr2 *bool) bool { … } // stringPtrChanged returns true if a set of string pointers have different values. func stringPtrChanged(ptr1, ptr2 *string) bool { … } // DeepHashObject writes specified object to hash using the spew library // which follows pointers and prints actual values of the nested objects // ensuring the hash does not change when a pointer changes. // copied from k8s.io/kubernetes/pkg/util/hash func deepHashObject(hasher hash.Hash, objectToWrite interface{ … } // IsPodReady returns true if Pods Ready condition is true // copied from k8s.io/kubernetes/pkg/api/v1/pod func IsPodReady(pod *v1.Pod) bool { … } // IsPodTerminal returns true if a pod is terminal, all containers are stopped and cannot ever regress. // copied from k8s.io/kubernetes/pkg/api/v1/pod func isPodTerminal(pod *v1.Pod) bool { … } // IsPodPhaseTerminal returns true if the pod's phase is terminal. // copied from k8s.io/kubernetes/pkg/api/v1/pod func isPodPhaseTerminal(phase v1.PodPhase) bool { … } // IsPodReadyConditionTrue returns true if a pod is ready; false otherwise. // copied from k8s.io/kubernetes/pkg/api/v1/pod func isPodReadyConditionTrue(status v1.PodStatus) bool { … } // getPodReadyCondition extracts the pod ready condition from the given status and returns that. // Returns nil if the condition is not present. // copied from k8s.io/kubernetes/pkg/api/v1/pod func getPodReadyCondition(status *v1.PodStatus) *v1.PodCondition { … }