user

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeCertPEM

func EncodeCertPEM(cert *x509.Certificate) []byte

EncodeCertPEM returns PEM-endcoded certificate data

func GenerateKubeconfig

func GenerateKubeconfig(conf Config) error

func NewCertAndKey

func NewCertAndKey(caCert *x509.Certificate, caKey crypto.Signer, user string, groups []string, DNSNames []string, IPAddresses []net.IP) (*x509.Certificate, crypto.Signer, error)

func TryLoadKeyFromDisk

func TryLoadKeyFromDisk(pkiPath string) (crypto.Signer, error)

TryLoadKeyFromDisk tries to load the key from the disk and validates that it is valid

Types

type Config

type Config struct {
	CACrtFile   string // ca file, default is /etc/kubernetes/pki/ca.crt
	CAKeyFile   string // ca key file, default is /etc/kubernetes/pki/ca.key
	OutPut      string // kubconfig output file name default is ./kube/config
	User        string
	Groups      []string
	ClusterName string // default is kubernetes
	Apiserver   string // default is https://apiserver.cluster.local:6443
	DNSNames    []string
	IPAddresses []net.IP
}

Jump to

Keyboard shortcuts

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