Documentation ¶
Index ¶
- Constants
- func DeleteClusterWorkflow(ctx workflow.Context, input DeleteClusterWorkflowInput) error
- func DeleteNodePoolWorkflow(ctx workflow.Context, input DeleteNodePoolWorkflowInput) error
- func UpdateClusterWorkflow(ctx workflow.Context, input UpdateClusterWorkflowInput) error
- type CreateClusterWorkflow
- type CreateClusterWorkflowInput
- type CreateNodeActivity
- type CreateNodeActivityInput
- type DeleteClusterFromStoreActivity
- type DeleteClusterFromStoreActivityInput
- type DeleteClusterWorkflowInput
- type DeleteK8sNodeActivity
- type DeleteK8sNodeActivityInput
- type DeleteNodeActivity
- type DeleteNodeActivityInput
- type DeleteNodePoolFromStoreActivity
- type DeleteNodePoolFromStoreActivityInput
- type DeleteNodePoolWorkflowInput
- type GetPublicAddressActivity
- type GetPublicAddressActivityInput
- type K8sConfigGetter
- type Node
- type NodePool
- type SetClusterStatusActivity
- type SetClusterStatusActivityInput
- type UpdateClusterWorkflowInput
- type VMOMIClientFactory
- type WaitForIPActivity
- type WaitForIPActivityInput
Constants ¶
const (
CreateClusterWorkflowName = "pke-vsphere-create-cluster"
)
const CreateNodeActivityName = "pke-vsphere-create-node"
CreateNodeActivityName is the default registration name of the activity
const DeleteClusterFromStoreActivityName = "pke-vsphere-delete-cluster-from-store"
const DeleteClusterWorkflowName = "pke-vsphere-delete-cluster"
const DeleteK8sNodeActivityName = "delete-k8s-node"
const DeleteNodeActivityName = "pke-vsphere-delete-node"
DeleteNodeActivityName is the default registration name of the activity
const DeleteNodePoolFromStoreActivityName = "pke-vsphere-delete-node-pool-from-store"
const DeleteNodePoolWorkflowName = "pke-vsphere-delete-nodepool"
const GetPublicAddressActivityName = "pke-vsphere-get-public-address"
GetPublicAddressActivityName is the default registration name of the activity
const SetClusterStatusActivityName = "pke-vsphere-set-cluster-status"
const UpdateClusterWorkflowName = "pke-vsphere-update-cluster"
const WaitForIPActivityName = "pke-vsphere-wait-for-ip"
WaitForIPActivityName is the default registration name of the activity
Variables ¶
This section is empty.
Functions ¶
func DeleteClusterWorkflow ¶
func DeleteClusterWorkflow(ctx workflow.Context, input DeleteClusterWorkflowInput) error
func DeleteNodePoolWorkflow ¶
func DeleteNodePoolWorkflow(ctx workflow.Context, input DeleteNodePoolWorkflowInput) error
func UpdateClusterWorkflow ¶
func UpdateClusterWorkflow(ctx workflow.Context, input UpdateClusterWorkflowInput) error
Types ¶
type CreateClusterWorkflow ¶
type CreateClusterWorkflow struct {
// contains filtered or unexported fields
}
func NewCreateClusterWorkflow ¶
func NewCreateClusterWorkflow() CreateClusterWorkflow
func (CreateClusterWorkflow) Execute ¶
func (w CreateClusterWorkflow) Execute(ctx workflow.Context, input CreateClusterWorkflowInput) (err error)
type CreateClusterWorkflowInput ¶
type CreateClusterWorkflowInput struct { ClusterID uint ClusterName string ClusterUID string OrganizationID uint OrganizationName string ResourcePoolName string FolderName string DatastoreName string SecretID string StorageSecretID string OIDCEnabled bool PostHooks pkgCluster.PostHooks Nodes []Node HTTPProxy intPKE.HTTPProxy NodePoolLabels map[string]map[string]string }
CreateClusterWorkflowInput
type CreateNodeActivity ¶
type CreateNodeActivity struct {
// contains filtered or unexported fields
}
CreateNodeActivity represents an activity for creating a vSphere virtual machine
func MakeCreateNodeActivity ¶
func MakeCreateNodeActivity(vmomiClientFactory *VMOMIClientFactory, tokenGenerator pkeworkflowadapter.TokenGenerator, secretStore pkeworkflow.SecretStore) CreateNodeActivity
MakeCreateNodeActivity returns a new CreateNodeActivity
func (CreateNodeActivity) Execute ¶
func (a CreateNodeActivity) Execute(ctx context.Context, input CreateNodeActivityInput) (types.ManagedObjectReference, error)
Execute performs the activity
type CreateNodeActivityInput ¶
type CreateNodeActivityInput struct { OrganizationID uint ClusterID uint SecretID string StorageSecretID string ClusterName string ResourcePoolName string FolderName string DatastoreName string Node }
CreateNodeActivityInput represents the input needed for executing a CreateNodeActivity
type DeleteClusterFromStoreActivity ¶
type DeleteClusterFromStoreActivity struct {
// contains filtered or unexported fields
}
func MakeDeleteClusterFromStoreActivity ¶
func MakeDeleteClusterFromStoreActivity(store pke.ClusterStore) DeleteClusterFromStoreActivity
func (DeleteClusterFromStoreActivity) Execute ¶
func (a DeleteClusterFromStoreActivity) Execute(ctx context.Context, input DeleteClusterFromStoreActivityInput) error
type DeleteClusterFromStoreActivityInput ¶
type DeleteClusterFromStoreActivityInput struct {
ClusterID uint
}
type DeleteClusterWorkflowInput ¶
type DeleteClusterWorkflowInput struct { ClusterID uint ClusterName string ClusterUID string K8sSecretID string OrganizationID uint OrganizationName string ResourcePoolName string FolderName string DatastoreName string SecretID string MasterNodes []Node Nodes []Node Forced bool }
DeleteClusterWorkflowInput
type DeleteK8sNodeActivity ¶
type DeleteK8sNodeActivity struct {
// contains filtered or unexported fields
}
func MakeDeleteK8sNodeActivity ¶
func MakeDeleteK8sNodeActivity(k8sConfigGetter K8sConfigGetter) DeleteK8sNodeActivity
func (DeleteK8sNodeActivity) Execute ¶
func (a DeleteK8sNodeActivity) Execute(ctx context.Context, input DeleteK8sNodeActivityInput) error
type DeleteNodeActivity ¶
type DeleteNodeActivity struct {
// contains filtered or unexported fields
}
DeleteNodeActivity represents an activity for creating a vSphere virtual machine
func MakeDeleteNodeActivity ¶
func MakeDeleteNodeActivity(vmomiClientFactory *VMOMIClientFactory) DeleteNodeActivity
MakeDeleteNodeActivity returns a new DeleteNodeActivity
func (DeleteNodeActivity) Execute ¶
func (a DeleteNodeActivity) Execute(ctx context.Context, input DeleteNodeActivityInput) (existed bool, err error)
Execute performs the activity In case of success, it returns whether the given node existed or not.
type DeleteNodeActivityInput ¶
type DeleteNodeActivityInput struct { OrganizationID uint ClusterID uint SecretID string ClusterName string Node }
DeleteNodeActivityInput represents the input needed for executing a DeleteNodeActivity
type DeleteNodePoolFromStoreActivity ¶
type DeleteNodePoolFromStoreActivity struct {
// contains filtered or unexported fields
}
func MakeDeleteNodePoolFromStoreActivity ¶
func MakeDeleteNodePoolFromStoreActivity(store pke.ClusterStore) DeleteNodePoolFromStoreActivity
func (DeleteNodePoolFromStoreActivity) Execute ¶
func (a DeleteNodePoolFromStoreActivity) Execute(ctx context.Context, input DeleteNodePoolFromStoreActivityInput) error
type DeleteNodePoolWorkflowInput ¶
type DeleteNodePoolWorkflowInput struct { ClusterID uint ClusterName string OrganizationID uint SecretID string K8sSecretID string NodePool NodePool }
DeleteNodePoolWorkflowInput
type GetPublicAddressActivity ¶
type GetPublicAddressActivity struct {
// contains filtered or unexported fields
}
GetPublicAddressActivity represents an activity to retrieve cluster public address
func MakeGetPublicAddressActivity ¶
func MakeGetPublicAddressActivity(vmomiClientFactory *VMOMIClientFactory) GetPublicAddressActivity
MakeGetPublicAddressActivity returns a new GetPublicAddressActivity
func (GetPublicAddressActivity) Execute ¶
func (a GetPublicAddressActivity) Execute(ctx context.Context, input GetPublicAddressActivityInput) (ipAddress string, err error)
Execute performs the activity In case of success, it returns whether the given node existed or not.
type GetPublicAddressActivityInput ¶
GetPublicAddressActivityInput represents the input needed for executing a GetPublicAddressActivity
type K8sConfigGetter ¶
type Node ¶
type Node struct { AdminUsername string VCPU int RAM int // MiB Name string SSHPublicKey string UserDataScriptParams map[string]string UserDataScriptTemplate string TemplateName string NodePoolName string Master bool }
Node represents a vSphere virtual machine
type SetClusterStatusActivity ¶
type SetClusterStatusActivity struct {
// contains filtered or unexported fields
}
func MakeSetClusterStatusActivity ¶
func MakeSetClusterStatusActivity(store pke.ClusterStore) SetClusterStatusActivity
func (SetClusterStatusActivity) Execute ¶
func (a SetClusterStatusActivity) Execute(ctx context.Context, input SetClusterStatusActivityInput) error
type UpdateClusterWorkflowInput ¶
type UpdateClusterWorkflowInput struct { ClusterID uint ClusterName string ClusterUID string OrganizationID uint OrganizationName string ResourcePoolName string FolderName string DatastoreName string SecretID string StorageSecretID string K8sSecretID string OIDCEnabled bool MasterNodeNames []string NodesToCreate []Node NodesToDelete []Node NodePoolsToDelete []NodePool HTTPProxy intPKE.HTTPProxy NodePoolLabels map[string]map[string]string }
UpdateClusterWorkflowInput
type VMOMIClientFactory ¶
type VMOMIClientFactory struct {
// contains filtered or unexported fields
}
func NewVMOMIClientFactory ¶
func NewVMOMIClientFactory(secretStore pkeworkflow.SecretStore) *VMOMIClientFactory
type WaitForIPActivity ¶
type WaitForIPActivity struct {
// contains filtered or unexported fields
}
WaitForIPActivity represents an activity for creating a vSphere virtual machine
func MakeWaitForIPActivity ¶
func MakeWaitForIPActivity(vmomiClientFactory *VMOMIClientFactory) WaitForIPActivity
MakeWaitForIPActivity returns a new WaitForIPActivity
func (WaitForIPActivity) Execute ¶
func (a WaitForIPActivity) Execute(ctx context.Context, input WaitForIPActivityInput) (string, error)
Execute performs the activity
type WaitForIPActivityInput ¶
type WaitForIPActivityInput struct { Ref types.ManagedObjectReference OrganizationID uint SecretID string ClusterName string }
WaitForIPActivityInput represents the input needed for executing a WaitForIPActivity
Source Files ¶
- create_cluster.go
- create_node_activity.go
- delete_cluster.go
- delete_cluster_from_store_activity.go
- delete_k8s_node_activity.go
- delete_node_activity.go
- delete_node_pool.go
- delete_node_pool_from_store_activity.go
- get_public_address_activity.go
- set_cluster_status_activity.go
- update_cluster.go
- vsphere.go
- wait_for_ip.go
- wait_for_result.go