kubeconfig

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectedConnectionSecretContext added in v0.25.0

func ExpectedConnectionSecretContext(account, ctpName string) string

func ExtractControlPlaneContext added in v0.25.0

func ExtractControlPlaneContext(cfg *api.Config, preferredContextName, newKey string) (*api.Config, error)

ExtractControlPlaneContext prunes the given kubeconfig by extracting the one and only or the preferred context if there are multiple. It renames context, cluster and authInfo to the given key.

Types

type Cmd

type Cmd struct {
	Get getCmd `cmd:"" help:"Get a kubeconfig for a control plane and, if not specified otherwise, merge into kubeconfig and select context."`
}

Cmd contains commands for managing control plane kubeconfig data.

func (*Cmd) BeforeReset added in v0.25.0

func (c *Cmd) BeforeReset(p *kong.Path, maturity feature.Maturity) error

BeforeReset is the first hook to run.

type ConnectionSecretCmd added in v0.25.0

type ConnectionSecretCmd struct {
	Name  string `arg:"" required:"" help:"Name of control plane." predictor:"ctps"`
	Token string `help:"API token used to authenticate. Required for Upbound Cloud; ignored otherwise."`
	Group string `` /* 144-byte string literal not displayed */
}

ConnectionSecretCmd is the base for command getting connection secret for a control plane.

func (*ConnectionSecretCmd) AfterApply added in v0.25.0

func (c *ConnectionSecretCmd) AfterApply(kongCtx *kong.Context, upCtx *upbound.Context) error

AfterApply sets default values in command after assignment and validation.

type ConnectionSecretGetter added in v0.25.0

type ConnectionSecretGetter interface {
	GetKubeConfig(ctx context.Context, ctp types.NamespacedName) (*clientcmdapi.Config, error)
}

Jump to

Keyboard shortcuts

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