Documentation ¶
Index ¶
- Variables
- type AirshipArmadaClient
- type AirshipClients
- type AirshipDeckhandClient
- type AirshipDrydockClient
- type AirshipPromenadeClient
- type AirshipShipyardClient
- type MachineScope
- type MachineScopeGetter
- type MachineScopeGetterFunc
- type MachineScopeParams
- type Scope
- func (s *Scope) Close()
- func (s *Scope) Location() string
- func (s *Scope) Name() string
- func (s *Scope) Namespace() string
- func (s *Scope) Network() *v1alpha1.Network
- func (s *Scope) SecurityGroups() map[v1alpha1.SecurityGroupRole]*v1alpha1.SecurityGroup
- func (s *Scope) Subnets() v1alpha1.Subnets
- func (s *Scope) Vnet() *v1alpha1.Vnet
- type ScopeGetter
- type ScopeGetterFunc
- type ScopeParams
Constants ¶
This section is empty.
Variables ¶
var ( DefaultScopeGetter ScopeGetter = ScopeGetterFunc(NewScope) DefaultMachineScopeGetter MachineScopeGetter = MachineScopeGetterFunc(NewMachineScope) )
Functions ¶
This section is empty.
Types ¶
type AirshipArmadaClient ¶
type AirshipArmadaClient interface { // Network Interfaces Operations DeleteNetworkInterface(resourceGroupName string, networkInterfaceName string) (armada.InterfacesDeleteFuture, error) WaitForNetworkInterfacesDeleteFuture(future armada.InterfacesDeleteFuture) error // Network Security Groups Operations CreateOrUpdateNetworkSecurityGroup(resourceGroupName string, networkSecurityGroupName string, location string) (*armada.SecurityGroupsCreateOrUpdateFuture, error) NetworkSGIfExists(resourceGroupName string, networkSecurityGroupName string) (*armada.SecurityGroup, error) WaitForNetworkSGsCreateOrUpdateFuture(future armada.SecurityGroupsCreateOrUpdateFuture) error // Public Ip Address Operations GetPublicIPAddress(resourceGroupName string, IPName string) (armada.PublicIPAddress, error) DeletePublicIPAddress(resourceGroup string, IPName string) (armada.PublicIPAddressesDeleteFuture, error) WaitForPublicIPAddressDeleteFuture(future armada.PublicIPAddressesDeleteFuture) error // Virtual Networks Operations CreateOrUpdateVnet(resourceGroupName string, virtualNetworkName string, location string) (*armada.VirtualNetworksCreateOrUpdateFuture, error) WaitForVnetCreateOrUpdateFuture(future armada.VirtualNetworksCreateOrUpdateFuture) error }
AirshipArmadaClient defines the operations that will interact with the Airship Network API
type AirshipClients ¶
type AirshipClients struct { Drydock AirshipDrydockClient Armada AirshipArmadaClient Deckhand AirshipDeckhandClient Shipyard AirshipShipyardClient Promenade AirshipPromenadeClient // Drydock VM drydock.VirtualMachinesClient Disks drydock.DisksClient // Network VirtualNetworks armada.VirtualNetworksClient SecurityGroups armada.SecurityGroupsClient Interfaces armada.InterfacesClient LB armada.LoadBalancersClient PublicIPAddresses armada.PublicIPAddressesClient // Resources Groups deckhand.GroupsClient Deployments deckhand.DeploymentsClient Tags deckhand.TagsClient }
AirshipClients contains all the Airship clients used by the scopes.
type AirshipDeckhandClient ¶
type AirshipDeckhandClient interface { // Resource Groups Operations CreateOrUpdateGroup(resourceGroupName string, location string) (deckhand.Group, error) DeleteGroup(resourceGroupName string) (deckhand.GroupsDeleteFuture, error) CheckGroupExistence(rgName string) (autorest.Response, error) WaitForGroupsDeleteFuture(future deckhand.GroupsDeleteFuture) error // Deployment Operations CreateOrUpdateDeployment(machine *clusterv1.Machine, clusterConfig *providerv1.AirshipClusterProviderSpec, machineConfig *providerv1.AirshipMachineProviderSpec) (*deckhand.DeploymentsCreateOrUpdateFuture, error) GetDeploymentResult(future deckhand.DeploymentsCreateOrUpdateFuture) (de deckhand.DeploymentExtended, err error) ValidateDeployment(machine *clusterv1.Machine, clusterConfig *providerv1.AirshipClusterProviderSpec, machineConfig *providerv1.AirshipMachineProviderSpec) error WaitForDeploymentsCreateOrUpdateFuture(future deckhand.DeploymentsCreateOrUpdateFuture) error }
AirshipDeckhandClient defines the operations that will interact with the Airship Resources API
type AirshipDrydockClient ¶
type AirshipDrydockClient interface { // Virtual Machines Operations RunCommand(resoureGroup string, name string, cmd string) (drydock.VirtualMachinesRunCommandFuture, error) VMIfExists(resourceGroup string, name string) (*drydock.VirtualMachine, error) DeleteVM(resourceGroup string, name string) (drydock.VirtualMachinesDeleteFuture, error) WaitForVMRunCommandFuture(future drydock.VirtualMachinesRunCommandFuture) error WaitForVMDeletionFuture(future drydock.VirtualMachinesDeleteFuture) error // Disk Operations DeleteManagedDisk(resourceGroup string, name string) (drydock.DisksDeleteFuture, error) WaitForDisksDeleteFuture(future drydock.DisksDeleteFuture) error }
AirshipDrydockClient defines the operations that will interact with the Airship Drydock API
type AirshipPromenadeClient ¶
AirshipPromenadeClient defines the operations that will interact with the Airship Resources API
type AirshipShipyardClient ¶
AirshipShipyardClient defines the operations that will interact with the Airship Resources API
type MachineScope ¶
type MachineScope struct { *Scope Machine *clusterv1.Machine MachineClient client.MachineInterface MachineConfig *v1alpha1.AirshipMachineProviderSpec MachineStatus *v1alpha1.AirshipMachineProviderStatus }
MachineScope defines a scope defined around a machine and its cluster.
func NewMachineScope ¶
func NewMachineScope(params MachineScopeParams) (*MachineScope, error)
NewMachineScope creates a new MachineScope from the supplied parameters. This is meant to be called for each machine actuator operation.
func (*MachineScope) Close ¶
func (m *MachineScope) Close()
func (*MachineScope) Location ¶
func (m *MachineScope) Location() string
Location returns the machine location.
func (*MachineScope) Namespace ¶
func (m *MachineScope) Namespace() string
Namespace returns the machine namespace.
func (*MachineScope) Role ¶
func (m *MachineScope) Role() string
Name returns the machine role from the labels.
type MachineScopeGetter ¶
type MachineScopeGetter interface {
GetMachineScope(params MachineScopeParams) (*MachineScope, error)
}
type MachineScopeGetterFunc ¶
type MachineScopeGetterFunc func(params MachineScopeParams) (*MachineScope, error)
func (MachineScopeGetterFunc) GetMachineScope ¶
func (f MachineScopeGetterFunc) GetMachineScope(params MachineScopeParams) (*MachineScope, error)
type MachineScopeParams ¶
type MachineScopeParams struct { AirshipClients Cluster *clusterv1.Cluster Machine *clusterv1.Machine Client client.ClusterV1alpha1Interface }
MachineScopeParams defines the input parameters used to create a new MachineScope.
type Scope ¶
type Scope struct { AirshipClients Cluster *clusterv1.Cluster ClusterClient client.ClusterInterface ClusterConfig *v1alpha1.AirshipClusterProviderSpec ClusterStatus *v1alpha1.AirshipClusterProviderStatus Context context.Context }
Scope defines the basic context for an actuator to operate upon.
func NewScope ¶
func NewScope(params ScopeParams) (*Scope, error)
NewScope creates a new Scope from the supplied parameters. This is meant to be called for each different actuator iteration.
func (*Scope) Close ¶
func (s *Scope) Close()
Close closes the current scope persisting the cluster configuration and status.
func (*Scope) SecurityGroups ¶
func (s *Scope) SecurityGroups() map[v1alpha1.SecurityGroupRole]*v1alpha1.SecurityGroup
SecurityGroups returns the cluster security groups as a map, it creates the map if empty.
type ScopeGetter ¶
type ScopeGetter interface {
GetScope(params ScopeParams) (*Scope, error)
}
type ScopeGetterFunc ¶
type ScopeGetterFunc func(params ScopeParams) (*Scope, error)
func (ScopeGetterFunc) GetScope ¶
func (f ScopeGetterFunc) GetScope(params ScopeParams) (*Scope, error)
type ScopeParams ¶
type ScopeParams struct { AirshipClients Cluster *clusterv1.Cluster Client client.ClusterV1alpha1Interface }
ScopeParams defines the input parameters used to create a new Scope.