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: 28 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func GetOrCreateSSHKeyPair

func GetOrCreateSSHKeyPair(cluster pke.PKEOnVsphereCluster, 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 ClusterConfig

type ClusterConfig 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 Logger, secrets SecretStore, statusChangeDurationMetric metrics.ClusterStatusChangeDurationMetric, store pke.ClusterStore, workflowClient client.Client) ClusterDeleter

func (ClusterDeleter) Delete

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

func (ClusterDeleter) DeleteByID

func (cd ClusterDeleter) DeleteByID(ctx context.Context, clusterID uint, 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 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 Logger,
	config ClusterConfig,
	organizations OrganizationStore,
	secrets ClusterUpdaterSecretStore,
	store pke.ClusterStore,
	workflowClient client.Client,
) ClusterUpdater

func (ClusterUpdater) Update

type ClusterUpdaterSecretStore

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

type KubeProxyCache

type KubeProxyCache interface {
	Delete(clusterUID string)
}

type Logger

type Logger = common.Logger

type NodePool

type NodePool struct {
	CreatedBy     uint
	Name          string
	Roles         []string
	Labels        map[string]string
	Size          int
	AdminUsername string
	VCPU          int
	RAM           int // MiB
	TemplateName  string
}

func (NodePool) InstanceType

func (np NodePool) InstanceType() string

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 VspherePKEClusterCreationParams

type VspherePKEClusterCreationParams struct {
	CreatedBy           uint
	Name                string
	NodePools           []NodePool
	OrganizationID      uint
	SecretID            string
	StorageSecretID     string
	SSHSecretID         string
	HTTPProxy           intPKE.HTTPProxy
	ResourcePoolName    string
	FolderName          string
	DatastoreName       string
	Kubernetes          intPKE.Kubernetes
	ActiveWorkflowID    string
	LoadBalancerIPRange string
}

VspherePKEClusterCreationParams defines parameters for PKE-on-Vsphere cluster creation

type VspherePKEClusterCreationParamsPreparer

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

VspherePKEClusterCreationParamsPreparer implements VspherePKEClusterCreationParams preparation

func MakeVspherePKEClusterCreationParamsPreparer

func MakeVspherePKEClusterCreationParamsPreparer(logger Logger, k8sPreparer intPKE.KubernetesPreparer, secrets ClusterCreatorSecretStore) VspherePKEClusterCreationParamsPreparer

MakeVspherePKEClusterCreationParamsPreparer returns an instance of VspherePKEClusterCreationParamsPreparer

func (VspherePKEClusterCreationParamsPreparer) Prepare

Prepare validates and provides defaults for VspherePKEClusterCreationParams fields

type VspherePKEClusterCreator

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

VspherePKEClusterCreator creates new PKE-on-Vsphere clusters

func MakeVspherePKEClusterCreator

func MakeVspherePKEClusterCreator(
	logger Logger,
	config ClusterConfig,
	k8sPreparer intPKE.KubernetesPreparer,
	organizations OrganizationStore,
	secrets ClusterCreatorSecretStore,
	store pke.ClusterStore,
	workflowClient client.Client,
) VspherePKEClusterCreator

func (VspherePKEClusterCreator) Create

Create

type VspherePKEClusterUpdateParams

type VspherePKEClusterUpdateParams struct {
	ClusterID uint
	NodePools []NodePool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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