kubeconfig

package
v0.1.0-alpha.cameissner2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateForCertAndKey

func GenerateForCertAndKey(certPEM []byte, privateKey *ecdsa.PrivateKey, cfg *GenerationConfig) (*clientcmdapi.Config, error)

GenerateForCertAndKey generates a valid kubeconfig with the specified cert, key, and configuration. The cert and key will have their PEM-encodings written out to respective cert and key files to be referenced within the generated kubeconfig.

Types

type GenerationConfig

type GenerationConfig struct {
	APIServerFQDN     string
	ClusterCAFilePath string
	CertFilePath      string
	KeyFilePath       string
}

GenerationConfig is used to specify various configurations for generation a kubeconfig.

type Validator

type Validator interface {
	Validate(kubeConfigPath string, ensureAuthorization bool) error
}

type ValidatorImpl

type ValidatorImpl struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator() *ValidatorImpl

func (*ValidatorImpl) Validate

func (v *ValidatorImpl) Validate(kubeconfigPath string, ensureAuthorization bool) error

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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