kubecli

package
v1.125.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	client.Client
	DiscoveryClient discovery.DiscoveryInterface
}

func NewClient

func NewClient(ctx context.Context, options ClusterOptions) (*Client, error)

func (*Client) GetObject

func (c *Client) GetObject(ctx context.Context, options ObjectOptions) (*unstructured.Unstructured, error)

type ClusterOptions

type ClusterOptions struct {
	// Path to the kubeconfig file to use for CLI requests.
	Kubeconfig string

	// Impersonate is the configuration that RESTClient will use for impersonation.
	Impersonate *rest.ImpersonationConfig

	// ImpersonateUser is the user name to impersonate
	ImpersonateUser string

	// Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
	ImpersonateGroups []string
}

func (*ClusterOptions) AddFlags

func (o *ClusterOptions) AddFlags(cmd *cobra.Command)

func (*ClusterOptions) PopulateDefaults

func (o *ClusterOptions) PopulateDefaults()

type ObjectOptions

type ObjectOptions struct {
	// Kind specifies the kind we want to change.  It will be matched against kind, resource-name, aliases etc.
	Kind string
	// Name is the name of the object we want to change
	Name string
	// Namespace is the namespace of the object we want to change
	Namespace string
}

func (*ObjectOptions) AddFlags

func (o *ObjectOptions) AddFlags(cmd *cobra.Command)

func (*ObjectOptions) PopulateDefaults

func (o *ObjectOptions) PopulateDefaults()

Jump to

Keyboard shortcuts

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