Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient = k8sClient{}
View Source
var ErrNoReadableKubeConfig = errors.New("unable to open kubeconfig file")
ErrNoReadableKubeConfig represents any error that prevents the client from opening a kubeconfig file.
Functions ¶
func IsRunningInCluster ¶
IsRunningInCluster returns true if kubeaudit is running inside a cluster
Types ¶
type ClientOptions ¶
type KubeClient ¶
type KubeClient interface { // GetAllResources gets all supported resources from the cluster GetAllResources(options ClientOptions) ([]k8s.Resource, error) // GetKubernetesVersion returns the kubernetes client version GetKubernetesVersion() (*version.Info, error) // ServerPreferredResources returns the supported resources with the version preferred by the server. ServerPreferredResources() ([]*metav1.APIResourceList, error) }
func NewKubeClient ¶
func NewKubeClient(dynamic dynamic.Interface, discovery discovery.DiscoveryInterface) KubeClient
func NewKubeClientCluster ¶
func NewKubeClientCluster(client Client) (KubeClient, error)
NewKubeClientCluster creates a new kube client for cluster mode
func NewKubeClientLocal ¶
func NewKubeClientLocal(configPath string, context string) (KubeClient, error)
NewKubeClientLocal creates a new kube client for local mode
Click to show internal directories.
Click to hide internal directories.