capi

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: UPL-1.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright (c) 2022, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

Copyright (c) 2022, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

Copyright (c) 2022, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

Copyright (c) 2022, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

Copyright (c) 2022, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

Index

Constants

View Source
const (
	KindClusterType = "kind"
	OCNEClusterType = "ocne"
	NoClusterType   = "noCluster"

	BootstrapImageEnvVar = "VZ_BOOTSTRAP_IMAGE"
)

Variables

This section is empty.

Functions

func ResetCAPIInitFunc

func ResetCAPIInitFunc()

ResetCAPIInitFunc For unit testing, reset the CAPI init function to its default

func ResetKindBootstrapProvider

func ResetKindBootstrapProvider()

ResetKindBootstrapProvider for unit testing, reset the KIND provider

func SetCAPIInitFunc

func SetCAPIInitFunc(f CAPIInitFuncType)

SetCAPIInitFunc For unit testing, override the CAPI init function

func SetKindBootstrapProvider

func SetKindBootstrapProvider(p KindBootstrapProvider)

SetKindBootstrapProvider for unit testing, override the KIND provider

Types

type CAPIInitFuncType

type CAPIInitFuncType = func(path string, options ...clusterapi.Option) (clusterapi.Client, error)

type ClusterConfig

type ClusterConfig struct {
	ClusterName    string
	Type           string
	ContainerImage string
	CAPIProviders  []string
}

func NewClusterConfig

func NewClusterConfig() ClusterConfig

NewClusterConfig Creates a new ClusterConfig with defaults

type ClusterLifeCycleManager

type ClusterLifeCycleManager interface {
	GetConfig() ClusterConfig
	GetKubeConfig() (string, error)
	Create() error
	Init() error
	Destroy() error
}

ClusterLifeCycleManager defines the lifecycle operations of a cluster

func NewBoostrapCluster

func NewBoostrapCluster(clusterConfig ClusterConfig) (ClusterLifeCycleManager, error)

NewBoostrapCluster Creates a new cluster manager for a local bootstrap cluster with the given config, applying defaults where needed

type KindBootstrapProvider

type KindBootstrapProvider interface {
	CreateCluster(config ClusterConfig) error
	DestroyCluster(config ClusterConfig) error
	GetKubeconfig(config ClusterConfig) (string, error)
}

KindBootstrapProvider is an abstraction around the KIND provider, mainly for unit test purposes

Jump to

Keyboard shortcuts

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