certs

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Admin ConfigTarget = iota
	ControllerManager
	AdminInCluster
	DefaultNamespace = "default"
	AdminCN          = "kubernetes-admin"
	Organization     = "system:masters"
	ContrCMCN        = "system:kube-controller-manager"
	CMConfSecret     = "cm-kubeconfig"
)
View Source
const (
	CertsSecretName = "k8s-certs"
)

Variables

This section is empty.

Functions

func GenerateAuthInfoAdminName

func GenerateAuthInfoAdminName(cpName string) string

func GenerateClusterName

func GenerateClusterName(cpName string) string

func GenerateContextName

func GenerateContextName(cpName string) string

func GenerateKubeConfigSecret

func GenerateKubeConfigSecret(ctx context.Context, certs *Certs, conf *ConfigGen) (*v1.Secret, error)

func GenerateKubeconfigBytes added in v0.2.4

func GenerateKubeconfigBytes(conf *ConfigGen) ([]byte, error)

Types

type Certs

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

func New

func New(ctx context.Context, extraDNSNames []string) (*Certs, error)

func (*Certs) GenerateCertsSecret

func (c *Certs) GenerateCertsSecret(ctx context.Context, namespace string) *v1.Secret

type ConfigGen

type ConfigGen struct {
	CpName      string
	CpNamespace string
	CpHost      string
	CpDomain    string
	CpPort      int
	CpExtraDNS  string
	Target      ConfigTarget
	// contains filtered or unexported fields
}

type ConfigTarget

type ConfigTarget int

Jump to

Keyboard shortcuts

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