Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultResourceLists ¶
func DefaultResourceLists() ([]*metav1.APIResourceList, error)
DefaultResourceLists returns APIResourceLists which can be used in a fake discovery client.
func GenerateMappings ¶
GenerateMappings connects to a Kubernetes cluster and discovers the available api-resources, printing out that information as a YAML list of APIMappings. The cluster connected to follows the usual conventions, eg it can be set with the KUBECONFIG environment variable. This function is meant to be used inside of a cobra-style CLI.
func ResourceLists ¶
func ResourceLists(mappings []APIMapping) []*metav1.APIResourceList
ResourceLists takes a list of APIMappings and uses them to populate APIResourceLists which can be used in a fake discovery client.
Types ¶
type APIMapping ¶
type APIMapping struct { Group string Version string Kind string Singular string Plural string Scope Scope }
APIMapping stores information required for mapping between GroupVersionKinds and GroupVersionResources, as well as whether the API is namespaced.
func (APIMapping) String ¶
func (a APIMapping) String() string