Documentation ¶
Index ¶
- Constants
- func GetOrCreateSSHKeyPair(cluster pke.PKEOnVsphereCluster, secrets secretStore, store pke.ClusterStore) (ssh.KeyPair, error)
- type ClusterConfig
- type ClusterCreatorSecretStore
- type ClusterDeleter
- func (cd ClusterDeleter) Delete(ctx context.Context, cluster pke.PKEOnVsphereCluster, forced bool) error
- func (cd ClusterDeleter) DeleteByID(ctx context.Context, clusterID uint, forced bool) error
- func (cd ClusterDeleter) DeleteCluster(ctx context.Context, clusterID uint, options cluster.DeleteClusterOptions) error
- type ClusterDeleterEvents
- type ClusterUpdateParamsPreparer
- type ClusterUpdater
- type ClusterUpdaterSecretStore
- type KubeProxyCache
- type Logger
- type NodePool
- type NodePoolPreparer
- type NodePoolsPreparer
- type OrganizationStore
- type SecretStore
- type Subnet
- type VspherePKEClusterCreationParams
- type VspherePKEClusterCreationParamsPreparer
- type VspherePKEClusterCreator
- type VspherePKEClusterUpdateParams
Constants ¶
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 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 (ClusterDeleter) DeleteCluster ¶
func (cd ClusterDeleter) DeleteCluster(ctx context.Context, clusterID uint, options cluster.DeleteClusterOptions) error
type ClusterDeleterEvents ¶
type ClusterUpdateParamsPreparer ¶
type ClusterUpdateParamsPreparer struct {
// contains filtered or unexported fields
}
func (ClusterUpdateParamsPreparer) Prepare ¶
func (p ClusterUpdateParamsPreparer) Prepare(ctx context.Context, params *VspherePKEClusterUpdateParams) error
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 ¶
func (cu ClusterUpdater) Update(ctx context.Context, params VspherePKEClusterUpdateParams) error
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 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 ¶
type NodePoolPreparer ¶
type NodePoolPreparer struct {
// contains filtered or unexported fields
}
NodePoolPreparer implements NodePool preparation
type NodePoolsPreparer ¶
type NodePoolsPreparer struct {
// contains filtered or unexported fields
}
NodePoolsPreparer implements []NodePool preparation
type OrganizationStore ¶
type SecretStore ¶
type SecretStore interface {
Get(orgnaizationID uint, secretID string) (*secret.SecretItemResponse, error)
}
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 ¶
func (p VspherePKEClusterCreationParamsPreparer) Prepare(ctx context.Context, params *VspherePKEClusterCreationParams) error
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 ¶
func (cc VspherePKEClusterCreator) Create(ctx context.Context, params VspherePKEClusterCreationParams) (cl pke.PKEOnVsphereCluster, err error)
Create