Documentation ¶
Index ¶
- func IsCredentialsNotFoundError(err error) bool
- func IsInvalidConfig(err error) bool
- func IsTooManyCredentials(err error) bool
- func ResponseWasNotFound(resp autorest.Response) bool
- type AzureClientSet
- type Factory
- func (f *Factory) GetDNSRecordSetsClient(credentialNamespace, credentialName string) (*dns.RecordSetsClient, error)
- func (f *Factory) GetDeploymentsClient(credentialNamespace, credentialName string) (*resources.DeploymentsClient, error)
- func (f *Factory) GetDisksClient(credentialNamespace, credentialName string) (*compute.DisksClient, error)
- func (f *Factory) GetGroupsClient(credentialNamespace, credentialName string) (*resources.GroupsClient, error)
- func (f *Factory) GetInterfacesClient(credentialNamespace, credentialName string) (*network.InterfacesClient, error)
- func (f *Factory) GetNatGatewaysClient(credentialNamespace, credentialName string) (*network.NatGatewaysClient, error)
- func (f *Factory) GetNetworkSecurityGroupsClient(credentialNamespace, credentialName string) (*network.SecurityGroupsClient, error)
- func (f *Factory) GetPublicIPAddressesClient(credentialNamespace, credentialName string) (*network.PublicIPAddressesClient, error)
- func (f *Factory) GetResourceSkusClient(credentialNamespace, credentialName string) (*compute.ResourceSkusClient, error)
- func (f *Factory) GetSnapshotsClient(credentialNamespace, credentialName string) (*compute.SnapshotsClient, error)
- func (f *Factory) GetStorageAccountsClient(credentialNamespace, credentialName string) (*storage.AccountsClient, error)
- func (f *Factory) GetSubnetsClient(credentialNamespace, credentialName string) (*network.SubnetsClient, error)
- func (f *Factory) GetVirtualMachineScaleSetVMsClient(credentialNamespace, credentialName string) (*compute.VirtualMachineScaleSetVMsClient, error)
- func (f *Factory) GetVirtualMachineScaleSetsClient(credentialNamespace, credentialName string) (*compute.VirtualMachineScaleSetsClient, error)
- func (f *Factory) GetVirtualNetworksClient(credentialNamespace, credentialName string) (*network.VirtualNetworksClient, error)
- type FactoryConfig
- type Interface
- type OrganizationFactory
- func (f *OrganizationFactory) GetCredentialSecret(ctx context.Context, objectMeta v1.ObjectMeta) (*v1alpha1.CredentialSecret, error)
- func (f *OrganizationFactory) GetDNSRecordSetsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*dns.RecordSetsClient, error)
- func (f *OrganizationFactory) GetDeploymentsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*resources.DeploymentsClient, error)
- func (f *OrganizationFactory) GetDisksClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.DisksClient, error)
- func (f *OrganizationFactory) GetGroupsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*resources.GroupsClient, error)
- func (f *OrganizationFactory) GetInterfacesClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.InterfacesClient, error)
- func (f *OrganizationFactory) GetNatGatewaysClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.NatGatewaysClient, error)
- func (f *OrganizationFactory) GetResourceSkusClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.ResourceSkusClient, error)
- func (f *OrganizationFactory) GetSnapshotsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.SnapshotsClient, error)
- func (f *OrganizationFactory) GetStorageAccountsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*storage.AccountsClient, error)
- func (f *OrganizationFactory) GetSubnetsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.SubnetsClient, error)
- func (f *OrganizationFactory) GetVirtualMachineScaleSetVMsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.VirtualMachineScaleSetVMsClient, error)
- func (f *OrganizationFactory) GetVirtualMachineScaleSetsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.VirtualMachineScaleSetsClient, error)
- func (f *OrganizationFactory) GetVirtualNetworksClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.VirtualNetworksClient, error)
- type OrganizationFactoryConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCredentialsNotFoundError ¶
IsCredentialsNotFoundError asserts credentialsNotFoundError.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsTooManyCredentials ¶
IsTooManyCredentials asserts tooManyCredentialsError.
func ResponseWasNotFound ¶
ResponseWasNotFound returns true if the response code from the Azure API was a 404.
Types ¶
type AzureClientSet ¶
type AzureClientSet struct { // The subscription ID this client set is configured with. SubscriptionID string // DeploymentsClient manages deployments of ARM templates. DeploymentsClient *resources.DeploymentsClient DisksClient *compute.DisksClient // GroupsClient manages ARM resource groups. GroupsClient *resources.GroupsClient // DNSRecordSetsClient manages DNS zones' records. DNSRecordSetsClient *dns.RecordSetsClient // DNSRecordSetsClient manages DNS zones. DNSZonesClient *dns.ZonesClient // InterfacesClient manages virtual network interfaces. InterfacesClient *network.InterfacesClient // NatGatewaysClient manages Nat Gateways. NatGatewaysClient *network.NatGatewaysClient // PublicIpAddressesClient manages public IP addresses. PublicIpAddressesClient *network.PublicIPAddressesClient // ResourceSkusClient manages VM type SKUs. ResourceSkusClient *compute.ResourceSkusClient // SecurityRulesClient manages networking rules in a security group. SecurityRulesClient *network.SecurityRulesClient SnapshotsClient *compute.SnapshotsClient // StorageAccountsClient manages blobs in storage containers. StorageAccountsClient *storage.AccountsClient // SubnetsClient manages subnets. SubnetsClient *network.SubnetsClient // UsageClient is used to work with limits and quotas. UsageClient *compute.UsageClient // VirtualNetworkClient manages virtual networks. VirtualNetworkClient *network.VirtualNetworksClient // VirtualNetworkGatewayConnectionsClient manages virtual network gateway connections. VirtualNetworkGatewayConnectionsClient *network.VirtualNetworkGatewayConnectionsClient // VirtualNetworkGatewaysClient manages virtual network gateways. VirtualNetworkGatewaysClient *network.VirtualNetworkGatewaysClient // VirtualMachineScaleSetsClient manages virtual machine scale sets. VirtualMachineScaleSetsClient *compute.VirtualMachineScaleSetsClient // VirtualMachineScaleSetVMsClient manages virtual machine scale set VMs. VirtualMachineScaleSetVMsClient *compute.VirtualMachineScaleSetVMsClient // VnetPeeringClient manages virtual network peerings. VnetPeeringClient *network.VirtualNetworkPeeringsClient }
AzureClientSet is the collection of Azure API clients.
func NewAzureClientSet ¶
func NewAzureClientSet(clientCredentialsConfig auth.ClientCredentialsConfig, metricsCollector collector.AzureAPIMetrics, subscriptionID, partnerID string) (*AzureClientSet, error)
NewAzureClientSet returns the Azure API clients using the given Authorizer.
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory is creating Azure clients for specified AzureConfig CRs, so basically for specified tenant clusters. All created clients are cached.
func NewFactory ¶
func NewFactory(config FactoryConfig) (*Factory, error)
NewFactory returns a new Azure client factory that is used throughout entire azure-operator lifetime.
func (*Factory) GetDNSRecordSetsClient ¶
func (f *Factory) GetDNSRecordSetsClient(credentialNamespace, credentialName string) (*dns.RecordSetsClient, error)
GetDNSRecordSetsClient returns RecordSetsClient that is used for management of DNS records. The client (for specified cluster) is cached after creation, so the same client is returned every time.
func (*Factory) GetDeploymentsClient ¶
func (f *Factory) GetDeploymentsClient(credentialNamespace, credentialName string) (*resources.DeploymentsClient, error)
GetDeploymentsClient returns DeploymentsClient that is used for management of deployments and ARM templates. The client (for specified cluster) is cached after creation, so the same client is returned every time.
func (*Factory) GetDisksClient ¶
func (f *Factory) GetDisksClient(credentialNamespace, credentialName string) (*compute.DisksClient, error)
GetDisksClient returns DisksClient that is used for management of virtual disks. The client (for specified cluster) is cached after creation, so the same client is returned every time.
func (*Factory) GetGroupsClient ¶
func (f *Factory) GetGroupsClient(credentialNamespace, credentialName string) (*resources.GroupsClient, error)
GetGroupsClient returns GroupsClient that is used for management of resource groups for the specified cluster. The created client is cached for the time period specified in the factory config.
func (*Factory) GetInterfacesClient ¶
func (f *Factory) GetInterfacesClient(credentialNamespace, credentialName string) (*network.InterfacesClient, error)
GetInterfacesClient returns InterfacesClient that is used for management of network interfaces for the specified cluster. The created client is cached for the time period specified in the factory config.
func (*Factory) GetNatGatewaysClient ¶
func (f *Factory) GetNatGatewaysClient(credentialNamespace, credentialName string) (*network.NatGatewaysClient, error)
GetNatGatewaysClient returns *network.NatGatewaysClient that is used for management of Nat Gateways. The created client is cached for the time period specified in the factory config.
func (*Factory) GetNetworkSecurityGroupsClient ¶
func (f *Factory) GetNetworkSecurityGroupsClient(credentialNamespace, credentialName string) (*network.SecurityGroupsClient, error)
GetNetworkSecurityGroupsClient returns *network.SecurityGroupsClient that is used for management of Network Security Groups. The created client is cached for the time period specified in the factory config.
func (*Factory) GetPublicIPAddressesClient ¶
func (f *Factory) GetPublicIPAddressesClient(credentialNamespace, credentialName string) (*network.PublicIPAddressesClient, error)
func (*Factory) GetResourceSkusClient ¶
func (f *Factory) GetResourceSkusClient(credentialNamespace, credentialName string) (*compute.ResourceSkusClient, error)
GetResourceSkusClient returns *compute.ResourceSkusClient that is used for reading VM instance types. The created client is cached for the time period specified in the factory config.
func (*Factory) GetSnapshotsClient ¶
func (f *Factory) GetSnapshotsClient(credentialNamespace, credentialName string) (*compute.SnapshotsClient, error)
GetSnapshotsClient returns *compute.SnapshotsClient that is used for management of Azure snapshots (both disks and VMs). The created client is cached for the time period specified in the factory config.
func (*Factory) GetStorageAccountsClient ¶
func (f *Factory) GetStorageAccountsClient(credentialNamespace, credentialName string) (*storage.AccountsClient, error)
GetStorageAccountsClient returns *storage.AccountsClient that is used for management of Azure storage accounts for the specified cluster. The created client is cached for the time period specified in the factory config.
func (*Factory) GetSubnetsClient ¶
func (f *Factory) GetSubnetsClient(credentialNamespace, credentialName string) (*network.SubnetsClient, error)
GetSubnetsClient returns *network.SubnetsClient that is used for management of Azure subnets. The created client is cached for the time period specified in the factory config.
func (*Factory) GetVirtualMachineScaleSetVMsClient ¶
func (f *Factory) GetVirtualMachineScaleSetVMsClient(credentialNamespace, credentialName string) (*compute.VirtualMachineScaleSetVMsClient, error)
GetVirtualMachineScaleSetVMsClient returns GetVirtualMachineScaleSetVMsClient that is used for management of virtual machine scale set instances for the specified cluster. The created client is cached for the time period specified in the factory config.
func (*Factory) GetVirtualMachineScaleSetsClient ¶
func (f *Factory) GetVirtualMachineScaleSetsClient(credentialNamespace, credentialName string) (*compute.VirtualMachineScaleSetsClient, error)
GetVirtualMachineScaleSetsClient returns VirtualMachineScaleSetsClient that is used for management of virtual machine scale sets for the specified cluster. The created client is cached for the time period specified in the factory config.
func (*Factory) GetVirtualNetworksClient ¶
func (f *Factory) GetVirtualNetworksClient(credentialNamespace, credentialName string) (*network.VirtualNetworksClient, error)
GetVirtualNetworksClient returns *network.VirtualNetworksClient that is used for management of Azure virtual networks. The created client is cached for the time period specified in the factory config.
type FactoryConfig ¶
type FactoryConfig struct { AzureAPIMetrics collector.AzureAPIMetrics CacheDuration time.Duration CredentialProvider credential.Provider Logger micrologger.Logger }
type Interface ¶
type Interface interface { GetCredentialSecret(ctx context.Context, objectMeta v1.ObjectMeta) (*v1alpha1.CredentialSecret, error) GetDeploymentsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*resources.DeploymentsClient, error) GetDisksClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.DisksClient, error) GetGroupsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*resources.GroupsClient, error) GetInterfacesClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.InterfacesClient, error) GetDNSRecordSetsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*dns.RecordSetsClient, error) GetVirtualMachineScaleSetsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.VirtualMachineScaleSetsClient, error) GetVirtualMachineScaleSetVMsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.VirtualMachineScaleSetVMsClient, error) GetVirtualNetworksClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.VirtualNetworksClient, error) GetSnapshotsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.SnapshotsClient, error) GetStorageAccountsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*storage.AccountsClient, error) GetSubnetsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.SubnetsClient, error) GetNatGatewaysClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.NatGatewaysClient, error) GetResourceSkusClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.ResourceSkusClient, error) }
type OrganizationFactory ¶
type OrganizationFactory struct {
// contains filtered or unexported fields
}
func NewOrganizationFactory ¶
func NewOrganizationFactory(c OrganizationFactoryConfig) OrganizationFactory
func (*OrganizationFactory) GetCredentialSecret ¶ added in v5.5.0
func (f *OrganizationFactory) GetCredentialSecret(ctx context.Context, objectMeta v1.ObjectMeta) (*v1alpha1.CredentialSecret, error)
func (*OrganizationFactory) GetDNSRecordSetsClient ¶
func (f *OrganizationFactory) GetDNSRecordSetsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*dns.RecordSetsClient, error)
func (*OrganizationFactory) GetDeploymentsClient ¶
func (f *OrganizationFactory) GetDeploymentsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*resources.DeploymentsClient, error)
func (*OrganizationFactory) GetDisksClient ¶
func (f *OrganizationFactory) GetDisksClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.DisksClient, error)
func (*OrganizationFactory) GetGroupsClient ¶
func (f *OrganizationFactory) GetGroupsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*resources.GroupsClient, error)
func (*OrganizationFactory) GetInterfacesClient ¶
func (f *OrganizationFactory) GetInterfacesClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.InterfacesClient, error)
func (*OrganizationFactory) GetNatGatewaysClient ¶
func (f *OrganizationFactory) GetNatGatewaysClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.NatGatewaysClient, error)
func (*OrganizationFactory) GetResourceSkusClient ¶
func (f *OrganizationFactory) GetResourceSkusClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.ResourceSkusClient, error)
func (*OrganizationFactory) GetSnapshotsClient ¶
func (f *OrganizationFactory) GetSnapshotsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.SnapshotsClient, error)
func (*OrganizationFactory) GetStorageAccountsClient ¶
func (f *OrganizationFactory) GetStorageAccountsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*storage.AccountsClient, error)
func (*OrganizationFactory) GetSubnetsClient ¶
func (f *OrganizationFactory) GetSubnetsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.SubnetsClient, error)
func (*OrganizationFactory) GetVirtualMachineScaleSetVMsClient ¶
func (f *OrganizationFactory) GetVirtualMachineScaleSetVMsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.VirtualMachineScaleSetVMsClient, error)
func (*OrganizationFactory) GetVirtualMachineScaleSetsClient ¶
func (f *OrganizationFactory) GetVirtualMachineScaleSetsClient(ctx context.Context, objectMeta v1.ObjectMeta) (*compute.VirtualMachineScaleSetsClient, error)
func (*OrganizationFactory) GetVirtualNetworksClient ¶
func (f *OrganizationFactory) GetVirtualNetworksClient(ctx context.Context, objectMeta v1.ObjectMeta) (*network.VirtualNetworksClient, error)
type OrganizationFactoryConfig ¶
type OrganizationFactoryConfig struct { CtrlClient client.Client Factory *Factory Logger micrologger.Logger }