provisioner

package
v2.0.0-beta.5+incompat... Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

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

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 EtcdTokenGetter

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

func NewEtcdTokenGetter

func NewEtcdTokenGetter() *EtcdTokenGetter

func (*EtcdTokenGetter) GetToken

func (e *EtcdTokenGetter) GetToken(ctx context.Context, num int) (string, error)

type Handler

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

func NewHandler

func NewHandler(kubeService KubeGetter, cloudAccountService *account.Service, tokenGetter TokenGetter, 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 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) ProvisionCluster

func (tp *TaskProvisioner) ProvisionCluster(ctx context.Context,
	profile *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(ctx context.Context, nodeProfiles []profile.NodeProfile, kube *model.Kube, config *steps.Config) ([]string, error)

type TokenGetter

type TokenGetter interface {
	GetToken(context.Context, int) (string, error)
}

Jump to

Keyboard shortcuts

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