clienthelpers

package
v0.0.0-...-1711f34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PodIdxFunc client.IndexerFunc = func(o client.Object) []string {
	pod := o.(*corev1.Pod)
	return []string{pod.Spec.NodeName}
}

PodIdxFunc is used for listing pods by node

Functions

func GetConfig

func GetConfig() *rest.Config

GetConfig attempts to create an in-cluster configuration and falls back to using KUBECONFIG from the environment if in-cluster config is not available.

func NewCache

func NewCache(config *rest.Config, options cache.Options) (cache.Cache, error)

NewCache sets up a client cache with a custom field indexer for pods

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL