package
0.0.0-20211217162629-92040c8d5731
Repository: https://github.com/kubernetes-client/go.git
Documentation: pkg.go.dev
# README
Kubernetes Config type Definition and Deepcopy Utility
This directory contains type definition and deepcopy utility copied from k8s.io/client-go that are used for parsing and persist kube config yaml file.
types.go
The Config type definition is copied from k8s.io/client-go/tools/clientcmd/api/v1/types.go for parsing the kube config yaml. The "k8s.io/apimachinery/pkg/runtime" dependency has been removed. An example of using this type definition to parse a kube config yaml is:
// Init an empty api.Config as unmarshal layout template
c := api.Config{}
err = yaml.Unmarshal(kubeConfig, &c)
if err != nil {
return nil, err
}
zz_generated.deepcopy.go
The Config type deepcopy util file is copied from k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go for deepcopy the kube config. The "k8s.io/apimachinery/pkg/runtime" dependency has been removed.
# Structs
AuthInfo contains information that describes identity information.
AuthProviderConfig holds the configuration for a specified auth provider.
Cluster contains information about how to communicate with a kubernetes cluster.
Config holds the information needed to build connect to remote kubernetes clusters as a given user +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object.
Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with).
ExecConfig specifies a command to provide client credentials.
ExecEnvVar is used for setting environment variables when executing an exec-based credential plugin.
NamedAuthInfo relates nicknames to auth information.
NamedCluster relates nicknames to cluster information.
NamedContext relates nicknames to context information.
NamedExtension relates nicknames to extension information.
Preferences holds general information to be use for cli interactions.