Documentation
¶
Index ¶
- func CreateBootstrapKubeconfig(clusterName, endpoint string, caCert []byte, token string) ([]byte, error)
- func CreateBootstrapResources(ctx context.Context, kubeconfigPath, token string, caCert []byte, ...) error
- func ParseCertificatePEM(data []byte) (*x509.Certificate, error)
- type BootstrapData
- type ExternalAPIServerResult
- type Manager
- func (m *Manager) Create(ctx context.Context, cfg *config.Cluster, retain bool) (err error)
- func (m *Manager) Delete(ctx context.Context, name string) error
- func (m *Manager) EnsureExternalAPIServer(ctx context.Context, cfg *config.Cluster, zone, network, subnet string) (*ExternalAPIServerResult, error)
- func (m *Manager) ExportLogs(ctx context.Context, clusterName, outDir string) error
- func (m *Manager) GetKubeconfig(ctx context.Context, clusterName string) (string, error)
- func (m *Manager) ListClusters(ctx context.Context) ([]string, error)
- func (m *Manager) ListNodes(ctx context.Context, clusterName string) ([]gce.Instance, error)
- func (m *Manager) Preflight(ctx context.Context) error
- func (m *Manager) SignLocalCertificate(pubKey any, caKey *rsa.PrivateKey, caCert *x509.Certificate, cn string, ...) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBootstrapKubeconfig ¶
func CreateBootstrapKubeconfig(clusterName, endpoint string, caCert []byte, token string) ([]byte, error)
CreateBootstrapKubeconfig creates a kubeconfig used for TLS bootstrapping (token-based).
func CreateBootstrapResources ¶
func CreateBootstrapResources(ctx context.Context, kubeconfigPath, token string, caCert []byte, endpoint string) error
CreateBootstrapResources creates the Bootstrap Token Secret and cluster-info ConfigMap.
func ParseCertificatePEM ¶
func ParseCertificatePEM(data []byte) (*x509.Certificate, error)
ParseCertificatePEM parses a PEM-encoded certificate.
Types ¶
type BootstrapData ¶
type BootstrapData struct {
TokenID string
TokenSecret string
Kubeconfig string
JWSSignature string
}
BootstrapData holds values for the bootstrap resources template
type ExternalAPIServerResult ¶
type ExternalAPIServerResult struct {
Endpoint string
CACert []byte
// Signing info for KCM (Node CA)
SigningKey []byte
SigningCert []byte
// Service Account Keys/Pub
SAKey []byte
SAPub []byte
// Front Proxy CA
FrontProxyCACert []byte
// Kubeconfigs (generated during CA lifecycle)
AdminKubeconfig string
SchedulerKubeconfig string
ControllerManagerKubeconfig string
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) EnsureExternalAPIServer ¶
func (*Manager) ExportLogs ¶
func (*Manager) GetKubeconfig ¶
func (*Manager) ListClusters ¶
func (*Manager) SignLocalCertificate ¶
func (m *Manager) SignLocalCertificate(pubKey any, caKey *rsa.PrivateKey, caCert *x509.Certificate, cn string, orgs []string, ipSANS []net.IP, dnsSANS []string, isServer bool) ([]byte, error)
SignLocalCertificate signs a leaf certificate using a local CA key/cert.
Click to show internal directories.
Click to hide internal directories.