apiclient

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrEmptyConfig is the error message to be displayed if the configuration info is missing or incomplete
	ErrEmptyConfig = clientcmd.NewEmptyConfigError(
		`Missing or incomplete configuration info.  Please point to an existing, complete config file:
  1. Via the command-line flag --kubeconfig
  2. Via the KUBECONFIG environment variable
  3. In your home directory as ~/.kube/config
`)
)

Functions

func Exists

func Exists(path string) bool

Exists determine if path exists

func KubeConfigPath

func KubeConfigPath(kubeconfigPath string) string

KubeConfigPath is to return kubeconfig file path in the following order: 1. Via the command-line flag --kubeconfig 2. Via the KUBECONFIG environment variable 3. In your home directory as ~/.kube/config

func NewAPIRegistrationClient

func NewAPIRegistrationClient(c *rest.Config) (*aggregator.Clientset, error)

NewAPIRegistrationClient is to create an apiregistration ClientSet

func NewCRDsClient

func NewCRDsClient(c *rest.Config) (*clientset.Clientset, error)

NewCRDsClient is to create a clientset ClientSet

func NewClientSet

func NewClientSet(c *rest.Config) (*kubernetes.Clientset, error)

NewClientSet is to create a kubernetes ClientSet

func RestConfig

func RestConfig(context, kubeconfigPath string) (*rest.Config, error)

RestConfig is to create a rest config from the context and kubeconfig passed as arguments.

Types

This section is empty.

Jump to

Keyboard shortcuts

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