kubeconfig

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MPL-2.0 Imports: 11 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
	IssuingCA() *x509.PEMEncodedCertificateAndKey
	AcceptedCAs() []*x509.PEMEncodedCertificate
	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

	IssuingCA           *x509.PEMEncodedCertificateAndKey
	AcceptedCAs         []*x509.PEMEncodedCertificate
	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