kubeconfig

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package kubeconfig provides Kubernetes config file generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(in *GenerateInput, out io.Writer) error

Generate a kubeconfig for the cluster from the given Input.

func GenerateAdmin

func GenerateAdmin(config GenerateAdminInput, out io.Writer) error

GenerateAdmin generates admin kubeconfig for the cluster.

Types

type GenerateAdminInput

type GenerateAdminInput interface {
	Name() string
	Endpoint() *url.URL
	CA() *x509.PEMEncodedCertificateAndKey
	AdminKubeconfig() config.AdminKubeconfig
}

GenerateAdminInput is the interface for the GenerateAdmin function.

This interface is implemented by config.Cluster().

type GenerateInput

type GenerateInput struct {
	ClusterName string

	CA                  *x509.PEMEncodedCertificateAndKey
	CertificateLifetime time.Duration

	CommonName   string
	Organization string

	Endpoint    string
	Username    string
	ContextName string
}

GenerateInput are input parameters for Generate.

Jump to

Keyboard shortcuts

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