Documentation ¶
Overview ¶
Package resources contains various utilities for dealing with Kubernetes resources.
Package resources contains various utilities for dealing with Kubernetes resources.
Index ¶
- func CopyMap(a map[string]string) map[string]string
- func FetchReadyAddressCount(lister corev1listers.EndpointsLister, ns, name string) (int, error)
- func FilterMap(in map[string]string, filter func(string) bool) map[string]string
- func ParentResourceFromService(name string) string
- func ReadyAddressCount(endpoints *corev1.Endpoints) int
- func UnionMaps(a, b map[string]string) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchReadyAddressCount ¶
func FetchReadyAddressCount(lister corev1listers.EndpointsLister, ns, name string) (int, error)
FetchReadyAddressCount fetches endpoints and returns the total number of addresses ready for them.
func FilterMap ¶
FilterMap creates a copy of the provided map, filtering out the elements that match `filter`. nil `filter` is accepted.
func ParentResourceFromService ¶
ParentResourceFromService returns the parent resource name from endpoints or k8s service resource. The function is based upon knowledge that all knative built services have `parent-resource-<svc-unique-suffix` format.
func ReadyAddressCount ¶
ReadyAddressCount returns the total number of addresses ready for the given endpoint.
Types ¶
This section is empty.