kubeadm

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeSystemNamespace = "kube-system"

	KubeProxyName                   = constants.KubeProxy
	KubeProxyClusterRoleBindingName = constants.KubeProxyClusterRoleBindingName
	KubeProxyServiceAccountName     = proxy.KubeProxyServiceAccountName
	KubeProxyConfigMapRoleName      = proxy.KubeProxyConfigMapRoleName
	KubeProxyConfigMap              = constants.KubeProxyConfigMap

	CoreDNSName                   = constants.CoreDNSDeploymentName
	CoreDNSServiceName            = "kube-dns"
	CoreDNSClusterRoleName        = "system:coredns"
	CoreDNSClusterRoleBindingName = "system:coredns"
)

Variables

This section is empty.

Functions

func AddCoreDNS added in v0.1.0

func AddCoreDNS(client kubernetes.Interface, config *Configuration) ([]byte, error)

func AddKubeProxy added in v0.1.0

func AddKubeProxy(client kubernetes.Interface, config *Configuration) ([]byte, error)

func BootstrapToken

func BootstrapToken(client kubernetes.Interface, config *Configuration) error

func CreateKubeconfig

func CreateKubeconfig(kubeconfigName string, ca CertificatePrivateKeyPair, config *Configuration) ([]byte, error)

func GetKubeadmInitConfigurationMap

func GetKubeadmInitConfigurationMap(config Configuration) (map[string]string, error)

func IsKubeconfigValid

func IsKubeconfigValid(bytes []byte) bool

func UploadKubeadmConfig

func UploadKubeadmConfig(client kubernetes.Interface, config *Configuration) ([]byte, error)

func UploadKubeletConfig

func UploadKubeletConfig(client kubernetes.Interface, config *Configuration) ([]byte, error)

Types

type AddonOptions added in v0.1.0

type AddonOptions struct {
	Repository string
	Tag        string
}

type CertificatePrivateKeyPair

type CertificatePrivateKeyPair struct {
	Name        string
	Certificate []byte
	PrivateKey  []byte
}

func GenerateCACertificatePrivateKeyPair

func GenerateCACertificatePrivateKeyPair(baseName string, config *Configuration) (*CertificatePrivateKeyPair, error)

func GenerateCertificatePrivateKeyPair

func GenerateCertificatePrivateKeyPair(baseName string, config *Configuration, ca CertificatePrivateKeyPair) (*CertificatePrivateKeyPair, error)

type Configuration

type Configuration struct {
	InitConfiguration kubeadmapi.InitConfiguration
	Kubeconfig        clientcmdapiv1.Config
	Parameters        Parameters
}

func CreateKubeadmInitConfiguration

func CreateKubeadmInitConfiguration(params Parameters) (*Configuration, error)

func GetKubeadmInitConfigurationFromMap

func GetKubeadmInitConfigurationFromMap(conf map[string]string) (*Configuration, error)

func (*Configuration) Checksum added in v0.1.0

func (c *Configuration) Checksum() string

type KubeletConfiguration

type KubeletConfiguration struct {
	TenantControlPlaneDomain        string
	TenantControlPlaneDNSServiceIPs []string
	TenantControlPlaneCgroupDriver  string
}

type Parameters

type Parameters struct {
	TenantControlPlaneName         string
	TenantControlPlaneNamespace    string
	TenantControlPlaneEndpoint     string
	TenantControlPlaneAddress      string
	TenantControlPlaneCertSANs     []string
	TenantControlPlanePort         int32
	TenantControlPlanePodCIDR      string
	TenantControlPlaneServiceCIDR  string
	TenantDNSServiceIPs            []string
	TenantControlPlaneVersion      string
	TenantControlPlaneCGroupDriver string
	ETCDs                          []string
	CertificatesDir                string
	KubeconfigDir                  string
	KubeProxyOptions               *AddonOptions
	CoreDNSOptions                 *AddonOptions
}

type PublicKeyPrivateKeyPair

type PublicKeyPrivateKeyPair struct {
	Name       string
	PublicKey  []byte
	PrivateKey []byte
}

func GeneratePublicKeyPrivateKeyPair

func GeneratePublicKeyPrivateKeyPair(baseName string, config *Configuration) (*PublicKeyPrivateKeyPair, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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