Back to godoc.org

Package driver

v0.0.0-...-083858d
Latest Go to latest

The highest tagged major version is .

Published: today | License: Apache-2.0 | Module: github.com/banzaicloud/pipeline

Index

Constants

const DefaultVirtualNetworkCIDR = "10.0.0.0/16"
const (
	MasterNodeTaint = pkgPKE.TaintKeyMaster + ":" + string(corev1.TaintEffectNoSchedule)
)

func GetOrCreateSSHKeyPair

func GetOrCreateSSHKeyPair(cluster pke.Cluster, secrets secretStore, store pke.ClusterStore) (ssh.KeyPair, error)

GetOrCreateSSHKeyPair creates and saves a new SSH key pair for the cluster or gets the cluster's SSH key pair if it already exists

type ClusterCreationParams

type ClusterCreationParams struct {
	CreatedBy             uint
	Kubernetes            intPKE.Kubernetes
	Name                  string
	Network               VirtualNetwork
	NodePools             []NodePool
	OrganizationID        uint
	ResourceGroup         string
	ScaleOptions          pkgCluster.ScaleOptions
	SecretID              string
	SSHSecretID           string
	HTTPProxy             intPKE.HTTPProxy
	AccessPoints          pke.AccessPoints
	APIServerAccessPoints pke.APIServerAccessPoints
}

ClusterCreationParams defines parameters for PKE-on-Azure cluster creation

type ClusterCreationParamsPreparer

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

ClusterCreationParamsPreparer implements ClusterCreationParams preparation

func MakeClusterCreationParamsPreparer

func MakeClusterCreationParamsPreparer(connection *pkgAzure.CloudConnection, logger logrus.FieldLogger) ClusterCreationParamsPreparer

MakeClusterCreationParamsPreparer returns an instance of ClusterCreationParamsPreparer

func (ClusterCreationParamsPreparer) Prepare

func (p ClusterCreationParamsPreparer) Prepare(ctx context.Context, params *ClusterCreationParams) error

Prepare validates and provides defaults for ClusterCreationParams fields

type ClusterCreator

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

ClusterCreator creates new PKE-on-Azure clusters

func MakeClusterCreator

func MakeClusterCreator(
	config ClusterCreatorConfig,
	logger logrus.FieldLogger,
	organizations OrganizationStore,
	secrets ClusterCreatorSecretStore,
	store pke.ClusterStore,
	workflowClient client.Client,
) ClusterCreator

func (ClusterCreator) Create

func (cc ClusterCreator) Create(ctx context.Context, params ClusterCreationParams) (cl pke.Cluster, err error)

Create

type ClusterCreatorConfig

type ClusterCreatorConfig struct {
	OIDCIssuerURL               string
	PipelineExternalURL         string
	PipelineExternalURLInsecure bool
}

type ClusterCreatorSecretStore

type ClusterCreatorSecretStore interface {
	GetByName(organizationID uint, secretName string) (*secret.SecretItemResponse, error)
	// contains filtered or unexported methods
}

type ClusterDeleter

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

func MakeClusterDeleter

func MakeClusterDeleter(
	events ClusterDeleterEvents,
	kubeProxyCache KubeProxyCache,
	logger logrus.FieldLogger,
	secrets SecretStore,
	statusChangeDurationMetric metrics.ClusterStatusChangeDurationMetric,
	store pke.ClusterStore,
	workflowClient client.Client,
) ClusterDeleter

func (ClusterDeleter) Delete

func (cd ClusterDeleter) Delete(ctx context.Context, cluster pke.Cluster, forced bool) error

func (ClusterDeleter) DeleteCluster

func (cd ClusterDeleter) DeleteCluster(ctx context.Context, clusterID uint, options cluster.DeleteClusterOptions) error

type ClusterDeleterEvents

type ClusterDeleterEvents interface {
	ClusterDeleted(organizationID uint, clusterName string)
}

type ClusterUpdateParams

type ClusterUpdateParams struct {
	ClusterID uint
	NodePools []NodePool
}

type ClusterUpdateParamsPreparer

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

func (ClusterUpdateParamsPreparer) Prepare

func (p ClusterUpdateParamsPreparer) Prepare(ctx context.Context, params *ClusterUpdateParams) error

type ClusterUpdater

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

func MakeClusterUpdater

func MakeClusterUpdater(
	logger logrus.FieldLogger,
	pipelineExternalURL string,
	pipelineExternalURLInsecure bool,
	secrets clusterUpdaterSecretStore,
	store pke.ClusterStore,
	workflowClient client.Client,
) ClusterUpdater

func (ClusterUpdater) Update

func (cu ClusterUpdater) Update(ctx context.Context, params ClusterUpdateParams) error

type KubeProxyCache

type KubeProxyCache interface {
	Delete(clusterUID string)
}

type NodePool

type NodePool struct {
	CreatedBy    uint
	Name         string
	InstanceType string
	Subnet       Subnet
	Zones        []string
	Roles        []string
	Labels       map[string]string
	Autoscaling  bool
	Count        int
	Min          int
	Max          int
}

type NodePoolPreparer

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

NodePoolPreparer implements NodePool preparation

func (NodePoolPreparer) Prepare

func (p NodePoolPreparer) Prepare(ctx context.Context, nodePool *NodePool) error

Prepare validates and provides defaults for NodePool fields

type NodePoolsPreparer

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

NodePoolsPreparer implements []NodePool preparation

func (NodePoolsPreparer) Prepare

func (p NodePoolsPreparer) Prepare(ctx context.Context, nodePools []NodePool) error

Prepare validates and provides defaults for a set of NodePools

type OrganizationStore

type OrganizationStore interface {
	Get(ctx context.Context, id uint) (auth.Organization, error)
}

type SecretStore

type SecretStore interface {
	Get(orgnaizationID uint, secretID string) (*secret.SecretItemResponse, error)
}

type Subnet

type Subnet struct {
	Name string
	CIDR string
}

type VirtualNetwork

type VirtualNetwork struct {
	Name     string
	CIDR     string
	Location string
}

type VirtualNetworkPreparer

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

VirtualNetworkPreparer implements VirtualNetwork preparation

func (VirtualNetworkPreparer) Prepare

func (p VirtualNetworkPreparer) Prepare(ctx context.Context, vnet *VirtualNetwork) error

Prepare validates and provides defaults for VirtualNetwork fields

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier