workflow

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

Documentation

Index

Constants

View Source
const AssignRoleActivityName = "pke-azure-assign-role"

AssignRoleActivityName is the default registration name of the activity

View Source
const CollectUpdateClusterProvidersActivityName = "pke-azure-collect-update-cluster-providers"
View Source
const (
	CreateClusterWorkflowName = "pke-azure-create-cluster"
)
View Source
const CreateInfraWorkflowName = "pke-azure-create-infra"
View Source
const CreateLoadBalancerActivityName = "pke-azure-create-load-balancer"

CreateLoadBalancerActivityName is the default registration name of the activity

View Source
const CreateNSGActivityName = "pke-azure-create-nsg"

CreateNSGActivityName is the default registration name of the activity

View Source
const CreatePublicIPActivityName = "pke-azure-create-public-ip"

AssignRoleActivityName is the default registration name of the activity

View Source
const CreateRouteTableActivityName = "pke-azure-create-route-table"

CreateRouteTableActivityName is the default registration name of the activity

View Source
const CreateSubnetActivityName = "pke-azure-create-subnet"

CreateSubnetActivityName is the default registration name of the activity

View Source
const CreateVMSSActivityName = "pke-azure-create-vmss"

CreateVMSSActivityName is the default registration name of the activity

View Source
const CreateVnetActivityName = "pke-azure-create-vnet"

CreateVnetActivityName is the default registration name of the activity

View Source
const DeleteClusterFromStoreActivityName = "pke-azure-delete-cluster-from-store"
View Source
const DeleteClusterWorkflowName = "pke-azure-delete-cluster"
View Source
const DeleteInfraWorkflowName = "pke-azure-delete-infra"
View Source
const DeleteLoadBalancerActivityName = "pke-azure-delete-load-balancer"

DeleteLoadBalancerActivityName is the default registration name of the activity

View Source
const DeleteNSGActivityName = "pke-azure-delete-nsg"

DeleteNSGActivityName is the default registration name of the activity

View Source
const DeleteNodePoolFromStoreActivityName = "pke-azure-delete-node-pool-from-store"
View Source
const DeletePublicIPActivityName = "pke-azure-delete-public-ip"

DeletePublicIPActivityName is the default registration name of the activity

View Source
const DeleteRouteTableActivityName = "pke-azure-delete-route-table"

DeleteRouteTableActivityName is the default registration name of the activity

View Source
const DeleteSubnetActivityName = "pke-azure-delete-subnet"

DeleteSubnetActivityName is the default registration name of the activity

View Source
const DeleteVMSSActivityName = "pke-azure-delete-vmss"

DeleteVMSSActivityName is the default registration name of the activity

View Source
const DeleteVNetActivityName = "pke-azure-delete-vnet"

DeleteVNetActivityName is the default registration name of the activity

View Source
const SetClusterStatusActivityName = "pke-azure-set-cluster-status"
View Source
const UpdateClusterAccessPointsActivityName = "pke-azure-upd-cluster-accesspoints"
View Source
const UpdateClusterWorkflowName = "pke-azure-update-cluster"
View Source
const UpdateVMSSActivityName = "pke-azure-update-vmss"

UpdateVMSSActivityName 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 HasOwnedTag

func HasOwnedTag(clusterName string, tags map[string]string) bool

func HasSharedTag

func HasSharedTag(clusterName string, tags map[string]string) bool

func RemoveSharedTag

func RemoveSharedTag(tags map[string]string, clusterName string) map[string]string

func UpdateClusterWorkflow

func UpdateClusterWorkflow(ctx workflow.Context, input UpdateClusterWorkflowInput) error

Types

type AssignRoleActivity

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

AssignRoleActivity represents an activity for creating an Azure network security group

func MakeAssignRoleActivity

func MakeAssignRoleActivity(azureClientFactory *AzureClientFactory) AssignRoleActivity

MakeAssignRoleActivity returns a new CreateNSGActivity

func (AssignRoleActivity) Execute

type AssignRoleActivityInput

type AssignRoleActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	RoleAssignment    RoleAssignment
}

type AzureClientFactory

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

func NewAzureClientFactory

func NewAzureClientFactory(secretStore pkeworkflow.SecretStore) *AzureClientFactory

func (*AzureClientFactory) New

func (f *AzureClientFactory) New(organizationID uint, secretID string) (*pkgAzure.CloudConnection, error)

type BackendAddressPool

type BackendAddressPool struct {
	Name string
}

type CollectUpdateClusterProvidersActivity

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

func MakeCollectUpdateClusterProvidersActivity

func MakeCollectUpdateClusterProvidersActivity(azureClientFactory *AzureClientFactory) CollectUpdateClusterProvidersActivity

type CollectUpdateClusterProvidersActivityInput

type CollectUpdateClusterProvidersActivityInput struct {
	OrganizationID uint
	SecretID       string

	ClusterName         string
	ResourceGroupName   string
	PublicIPAddressName string
	RouteTableName      string
	VirtualNetworkName  string
}

type CollectUpdateClusterProvidersActivityOutput

type CollectUpdateClusterProvidersActivityOutput struct {
	BackendAddressPoolIDProviders []MapResourceIDByNameProvider
	InboundNATPoolIDProviders     []MapResourceIDByNameProvider
	RouteTableIDProvider          MapResourceIDByNameProvider
	SecurityGroupIDProvider       MapResourceIDByNameProvider
	SubnetIDProvider              MapResourceIDByNameProvider
}

type ConstantIPAddressProvider

type ConstantIPAddressProvider string

ConstantIPAddressProvider implements an IPAddressProvider with a constant value

func (ConstantIPAddressProvider) Get

Get returns the constant IP address stored in the provider

type ConstantResourceIDProvider

type ConstantResourceIDProvider string

ConstantResourceIDProvider implements a ResourceIDProvider with a constant value

func (ConstantResourceIDProvider) Get

Get returns the constant resource ID stored in the provider

type CreateAzureInfrastructureWorkflowInput

type CreateAzureInfrastructureWorkflowInput struct {
	OrganizationID    uint
	ClusterID         uint
	ClusterName       string
	SecretID          string
	ResourceGroupName string

	LoadBalancers         []LoadBalancerTemplate
	PublicIPAddress       PublicIPAddress
	RoleAssignments       []RoleAssignmentTemplate
	RouteTable            RouteTable
	ScaleSets             []VirtualMachineScaleSetTemplate
	SecurityGroups        []SecurityGroup
	VirtualNetwork        VirtualNetworkTemplate
	HTTPProxy             intPKE.HTTPProxy
	AccessPoints          pke.AccessPoints
	APIServerAccessPoints pke.APIServerAccessPoints
}

type CreateClusterWorkflow

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

func NewCreateClusterWorkflow

func NewCreateClusterWorkflow() CreateClusterWorkflow

func (CreateClusterWorkflow) Execute

type CreateClusterWorkflowInput

type CreateClusterWorkflowInput struct {
	ClusterID                       uint
	ClusterName                     string
	ClusterUID                      string
	OrganizationID                  uint
	OrganizationName                string
	ResourceGroupName               string
	SecretID                        string
	Distribution                    string
	OIDCEnabled                     bool
	VirtualNetworkTemplate          VirtualNetworkTemplate
	LoadBalancerTemplates           []LoadBalancerTemplate
	PublicIPAddress                 PublicIPAddress
	RoleAssignmentTemplates         []RoleAssignmentTemplate
	RouteTable                      RouteTable
	SecurityGroups                  []SecurityGroup
	VirtualMachineScaleSetTemplates []VirtualMachineScaleSetTemplate
	NodePoolLabels                  map[string]map[string]string
	HTTPProxy                       intPKE.HTTPProxy
	AccessPoints                    pke.AccessPoints
	APIServerAccessPoints           pke.APIServerAccessPoints
}

CreateClusterWorkflowInput

type CreateLoadBalancerActivity

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

CreateLoadBalancerActivity represents an activity for creating an Azure load balancer

func MakeCreateLoadBalancerActivity

func MakeCreateLoadBalancerActivity(azureClientFactory *AzureClientFactory) CreateLoadBalancerActivity

MakeCreateLoadBalancerActivity returns a new CreateLoadBalancerActivity

func (CreateLoadBalancerActivity) Execute

Execute performs the activity

type CreateLoadBalancerActivityInput

type CreateLoadBalancerActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	LoadBalancer      LoadBalancer
}

CreateLoadBalancerActivityInput represents the input needed for executing a CreateLoadBalancerActivity

type CreateLoadBalancerActivityOutput

type CreateLoadBalancerActivityOutput struct {
	BackendAddressPoolIDs   map[string]string
	InboundNATPoolIDs       map[string]string
	ApiServerPrivateAddress string
}

type CreateNSGActivity

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

CreateNSGActivity represents an activity for creating an Azure network security group

func MakeCreateNSGActivity

func MakeCreateNSGActivity(azureClientFactory *AzureClientFactory) CreateNSGActivity

MakeCreateNSGActivity returns a new CreateNSGActivity

func (CreateNSGActivity) Execute

Execute performs the activity

type CreateNSGActivityInput

type CreateNSGActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	SecurityGroup     SecurityGroup
}

CreateNSGActivityInput represents the input needed for executing a CreateNSGActivity

type CreateNSGActivityOutput

type CreateNSGActivityOutput struct {
	NetworkSecurityGroupID string
}

CreateNSGActivityOutput represents the output of executing a CreateNSGActivity

type CreatePublicIPActivity

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

AssignRoleActivity represents an activity for creating an Azure network security group

func MakeCreatePublicIPActivity

func MakeCreatePublicIPActivity(azureClientFactory *AzureClientFactory) CreatePublicIPActivity

MakeAssignRoleActivity returns a new CreateNSGActivity

func (CreatePublicIPActivity) Execute

type CreatePublicIPActivityInput

type CreatePublicIPActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	PublicIPAddress   PublicIPAddress
}

type CreatePublicIPActivityOutput

type CreatePublicIPActivityOutput struct {
	PublicIPAddressID string
	PublicIPAddress   string
	Name              string
}

type CreateRouteTableActivity

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

CreateRouteTableActivity represents an activity for creating an Azure route table

func MakeCreateRouteTableActivity

func MakeCreateRouteTableActivity(azureClientFactory *AzureClientFactory) CreateRouteTableActivity

MakeCreateRouteTableActivity returns a new CreateRouteTableActivity

func (CreateRouteTableActivity) Execute

Execute performs the activity

type CreateRouteTableActivityInput

type CreateRouteTableActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	RouteTable        RouteTable
}

CreateRouteTableActivityInput represents the input needed for executing a CreateRouteTableActivity

type CreateRouteTableActivityOutput

type CreateRouteTableActivityOutput struct {
	RouteTableID   string
	RouteTableName string
}

CreateRouteTableActivityOutput represents the output of executing a CreateRouteTableActivity

type CreateSubnetActivity

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

CreateSubnetActivity represents an activity for creating an Azure subnet

func MakeCreateSubnetActivity

func MakeCreateSubnetActivity(azureClientFactory *AzureClientFactory) CreateSubnetActivity

MakeCreateSubnetActivity returns a new CreateSubnetActivity

func (CreateSubnetActivity) Execute

Execute performs the activity

type CreateSubnetActivityInput

type CreateSubnetActivityInput struct {
	OrganizationID     uint
	SecretID           string
	ClusterName        string
	ResourceGroupName  string
	VirtualNetworkName string
	Subnet             Subnet
}

CreateSubnetActivityInput represents the input needed for executing a CreateSubnetActivity

type CreateSubnetActivityOutput

type CreateSubnetActivityOutput struct {
	SubnetID string
}

type CreateVMSSActivity

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

CreateVMSSActivity represents an activity for creating an Azure virtual machine scale set

func MakeCreateVMSSActivity

func MakeCreateVMSSActivity(azureClientFactory *AzureClientFactory, tokenGenerator pkeworkflowadapter.TokenGenerator) CreateVMSSActivity

MakeCreateVMSSActivity returns a new CreateVMSSActivity

func (CreateVMSSActivity) Execute

Execute performs the activity

type CreateVMSSActivityInput

type CreateVMSSActivityInput struct {
	OrganizationID    uint
	ClusterID         uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	ScaleSet          VirtualMachineScaleSet
	HTTPProxy         intPKEWorkflow.HTTPProxy
}

CreateVMSSActivityInput represents the input needed for executing a CreateVMSSActivity

type CreateVMSSActivityOutput

type CreateVMSSActivityOutput struct {
	PrincipalID string
}

type CreateVnetActivity

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

CreateVnetActivity represents an activity for creating an Azure virtual network

func MakeCreateVnetActivity

func MakeCreateVnetActivity(azureClientFactory *AzureClientFactory) CreateVnetActivity

MakeCreateVnetActivity returns a new CreateVnetActivity

func (CreateVnetActivity) Execute

Execute performs the activity

type CreateVnetActivityInput

type CreateVnetActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	VirtualNetwork    VirtualNetwork
}

CreateVnetActivityInput represents the input needed for executing a CreateVnetActivity

type CreateVnetActivityOutput

type CreateVnetActivityOutput struct {
	VirtualNetworkID string
	SubnetIDs        map[string]string
}

type DeleteAzureInfrastructureWorkflowInput

type DeleteAzureInfrastructureWorkflowInput struct {
	OrganizationID    uint
	ClusterName       string
	SecretID          string
	ResourceGroupName string

	LoadBalancerNames    []string
	PublicIPAddressNames []string
	RouteTableName       string
	ScaleSetNames        []string
	SecurityGroupNames   []string
	VirtualNetworkName   string
}

type DeleteClusterFromStoreActivity

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

func MakeDeleteClusterFromStoreActivity

func MakeDeleteClusterFromStoreActivity(store pke.ClusterStore) DeleteClusterFromStoreActivity

func (DeleteClusterFromStoreActivity) Execute

type DeleteClusterFromStoreActivityInput

type DeleteClusterFromStoreActivityInput struct {
	ClusterID uint
}

type DeleteClusterWorkflowInput

type DeleteClusterWorkflowInput struct {
	OrganizationID       uint
	SecretID             string
	ClusterID            uint
	ClusterName          string
	ClusterUID           string
	K8sSecretID          string
	ResourceGroupName    string
	LoadBalancerNames    []string
	PublicIPAddressNames []string
	RouteTableName       string
	ScaleSetNames        []string
	SecurityGroupNames   []string
	VirtualNetworkName   string

	Forced bool
}

type DeleteLoadBalancerActivity

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

DeleteLoadBalancerActivity represents an activity for deleting an Azure load balancer

func MakeDeleteLoadBalancerActivity

func MakeDeleteLoadBalancerActivity(azureClientFactory *AzureClientFactory) DeleteLoadBalancerActivity

MakeDeleteLoadBalancerActivity returns a new CreateLoadBalancerActivity

func (DeleteLoadBalancerActivity) Execute

type DeleteLoadBalancerActivityInput

type DeleteLoadBalancerActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	LoadBalancerName  string
}

DeleteLoadBalancerActivityInput represents the input needed for executing a DeleteLoadBalancerActivity

type DeleteNSGActivity

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

DeleteNSGActivity represents an activity for deleting a network security group

func MakeDeleteNSGActivity

func MakeDeleteNSGActivity(azureClientFactory *AzureClientFactory) DeleteNSGActivity

MakeDeleteNSGActivity returns a new DeleteNSGActivity

func (DeleteNSGActivity) Execute

func (a DeleteNSGActivity) Execute(ctx context.Context, input DeleteNSGActivityInput) (err error)

type DeleteNSGActivityInput

type DeleteNSGActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	NSGName           string
}

DeleteNSGActivityInput represents the input needed for executing a DeleteNSGActivity

type DeleteNodePoolFromStoreActivity

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

func MakeDeleteNodePoolFromStoreActivity

func MakeDeleteNodePoolFromStoreActivity(store pke.ClusterStore) DeleteNodePoolFromStoreActivity

func (DeleteNodePoolFromStoreActivity) Execute

type DeleteNodePoolFromStoreActivityInput

type DeleteNodePoolFromStoreActivityInput struct {
	ClusterID     uint
	NodePoolNames []string
}

type DeletePublicIPActivity

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

DeletePublicIPActivity represents an activity for deleting a public IP

func MakeDeletePublicIPActivity

func MakeDeletePublicIPActivity(azureClientFactory *AzureClientFactory) DeletePublicIPActivity

MakeDeletePublicIPActivity returns a new DeletePublicIPActivity

func (DeletePublicIPActivity) Execute

type DeletePublicIPActivityInput

type DeletePublicIPActivityInput struct {
	OrganizationID      uint
	SecretID            string
	ClusterName         string
	ResourceGroupName   string
	PublicIPAddressName string
}

DeleteVNetActivityInput represents the input needed for executing a DeletePublicIPActivity

type DeleteRouteTableActivity

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

DeleteRouteTableActivity represents an activity for deleting a route table

func MakeDeleteRouteTableActivity

func MakeDeleteRouteTableActivity(azureClientFactory *AzureClientFactory) DeleteRouteTableActivity

MakeDeleteRouteTableActivity returns a new MakeDeleteRouteTableActivity

func (DeleteRouteTableActivity) Execute

type DeleteRouteTableActivityInput

type DeleteRouteTableActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	RouteTableName    string
}

DeleteRouteTableActivityInput represents the input needed for executing a DeleteRouteTableActivity

type DeleteSubnetActivity

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

DeleteSubnetActivity represents an activity for deleting a subnet

func MakeDeleteSubnetActivity

func MakeDeleteSubnetActivity(azureClientFactory *AzureClientFactory) DeleteSubnetActivity

MakeDeleteSubnetActivity returns a new DeleteSubnetActivity

func (DeleteSubnetActivity) Execute

type DeleteSubnetActivityInput

type DeleteSubnetActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	VNetName          string
	SubnetName        string
}

DeleteSubnetActivityInput represents the input needed for executing a DeleteSubnetActivity

type DeleteVMSSActivity

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

DeleteVMSSActivity represents an activity for deleting a VMSS

func MakeDeleteVMSSActivity

func MakeDeleteVMSSActivity(azureClientFactory *AzureClientFactory) DeleteVMSSActivity

MakeDeleteVMSSActivity returns a new DeleteVMSSActivity

func (DeleteVMSSActivity) Execute

func (a DeleteVMSSActivity) Execute(ctx context.Context, input DeleteVMSSActivityInput) (err error)

type DeleteVMSSActivityInput

type DeleteVMSSActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	VMSSName          string
}

DeleteVMSSActivityInput represents the input needed for executing a DeleteVMSSActivity

type DeleteVNetActivity

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

DeleteVNetActivity represents an activity for deleting a VNet

func MakeDeleteVNetActivity

func MakeDeleteVNetActivity(azureClientFactory *AzureClientFactory) DeleteVNetActivity

MakeDeleteVNetActivity returns a new DeleteVNetActivity

func (DeleteVNetActivity) Execute

func (a DeleteVNetActivity) Execute(ctx context.Context, input DeleteVNetActivityInput) (err error)

type DeleteVNetActivityInput

type DeleteVNetActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	VNetName          string
}

DeleteVNetActivityInput represents the input needed for executing a DeleteVNetActivity

type FrontendIPConfiguration

type FrontendIPConfiguration struct {
	Name              string
	PublicIPAddressID string
	SubnetID          string
	Zones             []string
}

type IPAddressProvider

type IPAddressProvider interface {
	Get() string
}

IPAddressProvider describes the interface of the provider of a single IP address

type Image

type Image struct {
	Offer     string
	Publisher string
	SKU       string
	Version   string
}

type InboundNATPool

type InboundNATPool struct {
	Name                   string
	BackendPort            int32
	FrontendIPConfig       *FrontendIPConfiguration
	FrontendPortRangeEnd   int32
	FrontendPortRangeStart int32
	Protocol               string
}

type LoadBalancer

type LoadBalancer struct {
	Name                     string
	Location                 string
	SKU                      string
	BackendAddressPools      []BackendAddressPool
	FrontendIPConfigurations []FrontendIPConfiguration
	InboundNATPools          []InboundNATPool
	LoadBalancingRules       []LoadBalancingRule
	OutboundRules            []OutboundRule
	Probes                   []Probe
}

type LoadBalancerTemplate

type LoadBalancerTemplate struct {
	Name                           string
	Location                       string
	SKU                            string
	BackendAddressPoolName         string
	OutboundBackendAddressPoolName string
	InboundNATPoolName             string
	SubnetName                     string
	PublicIPAddressName            string
}

func (LoadBalancerTemplate) Render

func (t LoadBalancerTemplate) Render(publicIPAddressIDProvider ResourceIDByNameProvider, subnetIDProvider ResourceIDByNameProvider) LoadBalancer

type LoadBalancingRule

type LoadBalancingRule struct {
	Name                string
	BackendAddressPool  *BackendAddressPool
	BackendPort         int32
	DisableOutboundSNAT bool
	FrontendIPConfig    *FrontendIPConfiguration
	FrontendPort        int32
	Probe               *Probe
	Protocol            string
}

type MapResourceIDByNameProvider

type MapResourceIDByNameProvider map[string]string

MapResourceIDByNameProvider implements a ResourceIDByNameProvider with a map of string to string

func (MapResourceIDByNameProvider) Get

Get returns the resource ID associated with the specified name in the mapping of the provider

func (MapResourceIDByNameProvider) Put

func (p MapResourceIDByNameProvider) Put(name string, resourceID string)

Put associates the specified name and resource ID pair in the mapping of the provider

type NodePoolAndVMSS

type NodePoolAndVMSS struct {
	NodePoolName string
	VMSSName     string
}

type OptionalUint

type OptionalUint struct {
	IsSet bool
	Value uint
}

func NewUint

func NewUint(v uint) OptionalUint

type OutboundRule

type OutboundRule struct {
	Name               string
	BackendAddressPool *BackendAddressPool
	FrontendIPConfigs  []*FrontendIPConfiguration
}

type Probe

type Probe struct {
	Name     string
	Port     int32
	Protocol string
}

type PublicIPAddress

type PublicIPAddress struct {
	Location string
	Name     string
	SKU      string
}

type ResourceIDByNameProvider

type ResourceIDByNameProvider interface {
	Get(name string) string
}

ResourceIDByNameProvider describes the interface of the by-name provider of a resource ID

type ResourceIDProvider

type ResourceIDProvider interface {
	Get() string
}

ResourceIDProvider describes the interface of the provider of a single resource ID

type RoleAssignment

type RoleAssignment struct {
	Name        string
	PrincipalID string
	RoleName    string
}

type RoleAssignmentTemplate

type RoleAssignmentTemplate struct {
	Name     string
	VMSSName string
	RoleName string
}

func (RoleAssignmentTemplate) Render

func (t RoleAssignmentTemplate) Render(vmssPrincipalIDProvider ResourceIDByNameProvider) RoleAssignment

type RouteTable

type RouteTable struct {
	ID       string
	Name     string
	Location string
}

RouteTable represents an Azure route table

type SecurityGroup

type SecurityGroup struct {
	Name     string
	Location string
	Rules    []SecurityRule
}

SecurityGroup represents a network security group

type SecurityRule

type SecurityRule struct {
	Name                 string
	Access               string
	Description          string
	Destination          string
	DestinationPortRange string
	Direction            string
	Priority             int32
	Protocol             string
	Source               string
	SourcePortRange      string
}

SecurityRule represents a network security rule

type SetClusterStatusActivity

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

func MakeSetClusterStatusActivity

func MakeSetClusterStatusActivity(store pke.ClusterStore) SetClusterStatusActivity

func (SetClusterStatusActivity) Execute

type SetClusterStatusActivityInput

type SetClusterStatusActivityInput struct {
	ClusterID     uint
	Status        string
	StatusMessage string
}

type Subnet

type Subnet struct {
	Name                   string
	CIDR                   string
	NetworkSecurityGroupID string
	RouteTableID           string
}

type SubnetTemplate

type SubnetTemplate struct {
	Name                     string
	CIDR                     string
	NetworkSecurityGroupName string
	RouteTableName           string
}

func (SubnetTemplate) Render

func (t SubnetTemplate) Render(routeTableIDProvider ResourceIDByNameProvider, securityGroupIDProvider ResourceIDByNameProvider) Subnet

type Tag

type Tag struct {
	Key   string
	Value string
}

func (Tag) Map

func (t Tag) Map() map[string]string

type UpdateClusterAccessPointsActivity

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

func MakeUpdateClusterAccessPointsActivity

func MakeUpdateClusterAccessPointsActivity(store pke.ClusterStore) UpdateClusterAccessPointsActivity

func (UpdateClusterAccessPointsActivity) Execute

type UpdateClusterAccessPointsActivityInput

type UpdateClusterAccessPointsActivityInput struct {
	ClusterID    uint
	AccessPoints pke.AccessPoints
}

type UpdateClusterWorkflowInput

type UpdateClusterWorkflowInput struct {
	OrganizationID      uint
	SecretID            string
	ClusterID           uint
	ClusterName         string
	ConfigSecretID      string
	ResourceGroupName   string
	PublicIPAddressName string
	RouteTableName      string
	VirtualNetworkName  string

	RoleAssignments []RoleAssignmentTemplate
	SubnetsToCreate []SubnetTemplate
	SubnetsToDelete []string
	VMSSToCreate    []VirtualMachineScaleSetTemplate
	VMSSToDelete    []NodePoolAndVMSS
	VMSSToUpdate    []VirtualMachineScaleSetChanges

	Labels map[string]map[string]string

	AccessPoints          pke.AccessPoints
	APIServerAccessPoints pke.APIServerAccessPoints
}

UpdateClusterWorkflowInput

type UpdateVMSSActivity

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

UpdateVMSSActivity represents an activity for deleting a VMSS

func MakeUpdateVMSSActivity

func MakeUpdateVMSSActivity(azureClientFactory *AzureClientFactory) UpdateVMSSActivity

MakeUpdateVMSSActivity returns a new UpdateVMSSActivity

func (UpdateVMSSActivity) Execute

func (a UpdateVMSSActivity) Execute(ctx context.Context, input UpdateVMSSActivityInput) (err error)

type UpdateVMSSActivityInput

type UpdateVMSSActivityInput struct {
	OrganizationID    uint
	SecretID          string
	ClusterName       string
	ResourceGroupName string
	Changes           VirtualMachineScaleSetChanges
}

UpdateVMSSActivityInput represents the input needed for executing a UpdateVMSSActivity

type VirtualMachineScaleSet

type VirtualMachineScaleSet struct {
	AdminUsername           string
	Image                   Image
	InstanceCount           int64
	InstanceType            string
	LBBackendAddressPoolIDs []string
	LBInboundNATPoolIDs     []string
	Location                string
	Name                    string
	NetworkSecurityGroupID  string
	SSHPublicKey            string
	SubnetID                string
	UserDataScriptParams    map[string]string
	UserDataScriptTemplate  string
	Zones                   []string
}

VirtualMachineScaleSet represents an Azure virtual machine scale set

type VirtualMachineScaleSetChanges

type VirtualMachineScaleSetChanges struct {
	Name          string
	InstanceCount OptionalUint
}

type VirtualMachineScaleSetTemplate

type VirtualMachineScaleSetTemplate struct {
	AdminUsername                string
	Image                        Image
	InstanceCount                uint
	InstanceType                 string
	BackendAddressPoolName       string
	OutputBackendAddressPoolName string
	InboundNATPoolName           string
	Location                     string
	Name                         string
	NetworkSecurityGroupName     string
	NodePoolName                 string
	SSHPublicKey                 string
	SubnetName                   string
	UserDataScriptParams         map[string]string
	UserDataScriptTemplate       string
	Zones                        []string
	Role                         pkgPke.Role
}

func (VirtualMachineScaleSetTemplate) Render

func (t VirtualMachineScaleSetTemplate) Render(
	backendAddressPoolIDProviders []ResourceIDByNameProvider,
	inboundNATPoolIDProviders []ResourceIDByNameProvider,
	apiServerAddressProvider IPAddressProvider,
	apiServerCertSansProvider ConstantResourceIDProvider,
	securityGroupIDProvider ResourceIDByNameProvider,
	subnetIDProvider ResourceIDByNameProvider,
) VirtualMachineScaleSet

type VirtualNetwork

type VirtualNetwork struct {
	Name     string
	CIDRs    []string
	Location string
	Subnets  []Subnet
}

type VirtualNetworkTemplate

type VirtualNetworkTemplate struct {
	Name     string
	CIDRs    []string
	Location string
	Subnets  []SubnetTemplate
}

func (VirtualNetworkTemplate) Render

func (t VirtualNetworkTemplate) Render(routeTableIDProvider ResourceIDByNameProvider, securityGroupIDProvider ResourceIDByNameProvider) VirtualNetwork

Jump to

Keyboard shortcuts

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