provisioner

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultK8SServicesCIDR = "10.3.0.0/16"
)

Variables

This section is empty.

Functions

func FillNodeCloudSpecificData

func FillNodeCloudSpecificData(provider clouds.Name, nodeProfile profile.NodeProfile, config *steps.Config) error

Fill cloud account specific data gets data from the map and puts to particular cloud provider config

func MergeConfig

func MergeConfig(source *steps.Config, destination *steps.Config) error

Types

type AccountGetter

type AccountGetter interface {
	Get(context.Context, string) (*model.CloudAccount, error)
}

type ClusterProvisioner

type ClusterProvisioner interface {
	ProvisionCluster(context.Context, *profile.Profile, *steps.Config) (map[string][]*workflows.Task, error)
}

type Handler

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

func NewHandler

func NewHandler(kubeService KubeGetter,
	cloudAccountService *account.Service,
	profileSvc ProfileCreater,
	provisioner ClusterProvisioner) *Handler

func (*Handler) Provision

func (h *Handler) Provision(w http.ResponseWriter, r *http.Request)

TODO(stgleb): Move this to KubeHandler create kube

func (*Handler) Register

func (h *Handler) Register(m *mux.Router)

type KubeGetter

type KubeGetter interface {
	Get(ctx context.Context, name string) (*model.Kube, error)
}

type KubeService

type KubeService interface {
	Create(ctx context.Context, k *model.Kube) error
	Get(ctx context.Context, name string) (*model.Kube, error)
}

type ProfileCreater

type ProfileCreater interface {
	Create(context.Context, *profile.Profile) error
}

type ProvisionRequest

type ProvisionRequest struct {
	ClusterName      string          `json:"clusterName" valid:"matches(^[A-Za-z0-9-]+$)"`
	Profile          profile.Profile `json:"profile" valid:"-"`
	CloudAccountName string          `json:"cloudAccountName" valid:"-"`
}

type ProvisionResponse

type ProvisionResponse struct {
	ClusterID string              `json:"clusterId"`
	Tasks     map[string][]string `json:"tasks"`
}

type RateLimiter

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

func NewRateLimiter

func NewRateLimiter(interval time.Duration) *RateLimiter

func (*RateLimiter) Take

func (r *RateLimiter) Take()

Take either returns giving calling code ability to execute or blocks until bucket is full again

type TaskProvisioner

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

func NewProvisioner

func NewProvisioner(repository storage.Interface, kubeService KubeService,
	spawnInterval time.Duration) *TaskProvisioner

func (*TaskProvisioner) Cancel

func (tp *TaskProvisioner) Cancel(clusterID string) error

func (*TaskProvisioner) ProvisionCluster

func (tp *TaskProvisioner) ProvisionCluster(parentContext context.Context,
	clusterProfile *profile.Profile, config *steps.Config) (map[string][]*workflows.Task, error)

ProvisionCluster runs provisionCluster process among nodes that have been provided for provisionCluster

func (*TaskProvisioner) ProvisionNodes

func (tp *TaskProvisioner) ProvisionNodes(parentContext context.Context, nodeProfiles []profile.NodeProfile, kube *model.Kube, config *steps.Config) ([]string, error)

func (*TaskProvisioner) RestartClusterProvisioning

func (tp *TaskProvisioner) RestartClusterProvisioning(parentCtx context.Context,
	clusterProfile *profile.Profile,
	config *steps.Config, taskIdMap map[string][]string) error

Jump to

Keyboard shortcuts

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