driver

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

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

Types

type ClusterCreationParams

type ClusterCreationParams struct {
	CreatedBy             uint
	Kubernetes            intPKE.Kubernetes
	Name                  string
	Network               VirtualNetwork
	NodePools             []NodePool
	OrganizationID        uint
	ResourceGroup         string
	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

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 {
	Enabled                     bool
	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

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

Prepare validates and provides defaults for VirtualNetwork fields

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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