Documentation ¶
Index ¶
- Constants
- func ValidateCredentials(ctx context.Context, credentials *azidentity.ClientSecretCredential, ...) error
- type AvailabilitySetClient
- type Azure
- func (a *Azure) AddICMPRulesIfRequired(ctx context.Context, cluster *kubermaticv1.Cluster) error
- func (a *Azure) CleanUpCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, ...) (*kubermaticv1.Cluster, error)
- func (a *Azure) DefaultCloudSpec(ctx context.Context, cloud *kubermaticv1.CloudSpec) error
- func (a *Azure) InitializeCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, ...) (*kubermaticv1.Cluster, error)
- func (a *Azure) ReconcileCluster(ctx context.Context, cluster *kubermaticv1.Cluster, ...) (*kubermaticv1.Cluster, error)
- func (a *Azure) ValidateCloudSpec(ctx context.Context, cloud kubermaticv1.CloudSpec) error
- func (a *Azure) ValidateCloudSpecUpdate(_ context.Context, oldSpec kubermaticv1.CloudSpec, ...) error
- type ClientSet
- type Credentials
- type NetworkClient
- type ResourceGroupClient
- type RouteTableClient
- type SecurityGroupClient
- type SubnetClient
Constants ¶
const ( // FinalizerSecurityGroup will instruct the deletion of the security group. FinalizerSecurityGroup = "kubermatic.k8c.io/cleanup-azure-security-group" // FinalizerRouteTable will instruct the deletion of the route table. FinalizerRouteTable = "kubermatic.k8c.io/cleanup-azure-route-table" // FinalizerSubnet will instruct the deletion of the subnet. FinalizerSubnet = "kubermatic.k8c.io/cleanup-azure-subnet" // FinalizerVNet will instruct the deletion of the virtual network. FinalizerVNet = "kubermatic.k8c.io/cleanup-azure-vnet" // FinalizerResourceGroup will instruct the deletion of the resource group. FinalizerResourceGroup = "kubermatic.k8c.io/cleanup-azure-resource-group" // FinalizerAvailabilitySet will instruct the deletion of the availability set. FinalizerAvailabilitySet = "kubermatic.k8c.io/cleanup-azure-availability-set" )
Variables ¶
This section is empty.
Functions ¶
func ValidateCredentials ¶ added in v2.20.0
func ValidateCredentials(ctx context.Context, credentials *azidentity.ClientSecretCredential, subscriptionID string) error
Types ¶
type AvailabilitySetClient ¶ added in v2.21.0
type AvailabilitySetClient interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters armcompute.AvailabilitySet, options *armcompute.AvailabilitySetsClientCreateOrUpdateOptions) (armcompute.AvailabilitySetsClientCreateOrUpdateResponse, error) Get(ctx context.Context, resourceGroupName string, availabilitySetName string, options *armcompute.AvailabilitySetsClientGetOptions) (armcompute.AvailabilitySetsClientGetResponse, error) Delete(ctx context.Context, resourceGroupName string, availabilitySetName string, options *armcompute.AvailabilitySetsClientDeleteOptions) (armcompute.AvailabilitySetsClientDeleteResponse, error) }
AvailabilitySetClient is the subset of functions we need from armcompute.AvailabilitySetsClient; this interface is purely here for allowing unit tests.
type Azure ¶
type Azure struct {
// contains filtered or unexported fields
}
func New ¶
func New(dc *kubermaticv1.Datacenter, secretKeyGetter provider.SecretKeySelectorValueFunc) (*Azure, error)
New returns a new Azure provider.
func (*Azure) AddICMPRulesIfRequired ¶
func (*Azure) CleanUpCloudProvider ¶
func (a *Azure) CleanUpCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)
func (*Azure) DefaultCloudSpec ¶
func (*Azure) InitializeCloudProvider ¶
func (a *Azure) InitializeCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)
func (*Azure) ReconcileCluster ¶ added in v2.19.0
func (a *Azure) ReconcileCluster(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)
func (*Azure) ValidateCloudSpec ¶
func (*Azure) ValidateCloudSpecUpdate ¶
func (a *Azure) ValidateCloudSpecUpdate(_ context.Context, oldSpec kubermaticv1.CloudSpec, newSpec kubermaticv1.CloudSpec) error
ValidateCloudSpecUpdate verifies whether an update of cloud spec is valid and permitted.
type ClientSet ¶ added in v2.19.0
type ClientSet struct { Groups ResourceGroupClient Networks NetworkClient Subnets SubnetClient RouteTables RouteTableClient SecurityGroups SecurityGroupClient AvailabilitySets AvailabilitySetClient }
ClientSet provides a set of Azure service clients that are necessary to reconcile resources needed by KKP.
func GetClientSet ¶ added in v2.19.0
func GetClientSet(cloud kubermaticv1.CloudSpec, credentials Credentials) (*ClientSet, error)
GetClientSet returns a ClientSet using the passed credentials as authorization.
type Credentials ¶
type Credentials struct { TenantID string SubscriptionID string ClientID string ClientSecret string }
func GetCredentialsForCluster ¶
func GetCredentialsForCluster(cloud kubermaticv1.CloudSpec, secretKeySelector provider.SecretKeySelectorValueFunc) (Credentials, error)
GetCredentialsForCluster returns the credentials for the passed in cloud spec or an error.
func (Credentials) ToAzureCredential ¶ added in v2.21.0
func (c Credentials) ToAzureCredential() (*azidentity.ClientSecretCredential, error)
type NetworkClient ¶ added in v2.21.0
type NetworkClient interface { BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters armnetwork.VirtualNetwork, options *armnetwork.VirtualNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.VirtualNetworksClientCreateOrUpdateResponse], error) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *armnetwork.VirtualNetworksClientGetOptions) (armnetwork.VirtualNetworksClientGetResponse, error) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *armnetwork.VirtualNetworksClientBeginDeleteOptions) (*runtime.Poller[armnetwork.VirtualNetworksClientDeleteResponse], error) }
NetworkClient is the subset of functions we need from armnetwork.VirtualNetworksClient; this interface is purely here for allowing unit tests.
type ResourceGroupClient ¶ added in v2.21.0
type ResourceGroupClient interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, parameters armresources.ResourceGroup, options *armresources.ResourceGroupsClientCreateOrUpdateOptions) (armresources.ResourceGroupsClientCreateOrUpdateResponse, error) Get(ctx context.Context, resourceGroupName string, options *armresources.ResourceGroupsClientGetOptions) (armresources.ResourceGroupsClientGetResponse, error) BeginDelete(ctx context.Context, resourceGroupName string, options *armresources.ResourceGroupsClientBeginDeleteOptions) (*runtime.Poller[armresources.ResourceGroupsClientDeleteResponse], error) }
ResourceGroupClient is the subset of functions we need from armresources.VirtualResourceGroupsClient; this interface is purely here for allowing unit tests.
type RouteTableClient ¶ added in v2.21.0
type RouteTableClient interface { BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters armnetwork.RouteTable, options *armnetwork.RouteTablesClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.RouteTablesClientCreateOrUpdateResponse], error) Get(ctx context.Context, resourceGroupName string, routeTableName string, options *armnetwork.RouteTablesClientGetOptions) (armnetwork.RouteTablesClientGetResponse, error) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, options *armnetwork.RouteTablesClientBeginDeleteOptions) (*runtime.Poller[armnetwork.RouteTablesClientDeleteResponse], error) }
RouteTableClient is the subset of functions we need from armnetwork.RouteTablesClient; this interface is purely here for allowing unit tests.
type SecurityGroupClient ¶ added in v2.21.0
type SecurityGroupClient interface { BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters armnetwork.SecurityGroup, options *armnetwork.SecurityGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.SecurityGroupsClientCreateOrUpdateResponse], error) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *armnetwork.SecurityGroupsClientGetOptions) (armnetwork.SecurityGroupsClientGetResponse, error) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *armnetwork.SecurityGroupsClientBeginDeleteOptions) (*runtime.Poller[armnetwork.SecurityGroupsClientDeleteResponse], error) }
SecurityGroupClient is the subset of functions we need from armnetwork.SecurityGroupsClient; this interface is purely here for allowing unit tests.
type SubnetClient ¶ added in v2.21.0
type SubnetClient interface { BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters armnetwork.Subnet, options *armnetwork.SubnetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.SubnetsClientCreateOrUpdateResponse], error) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *armnetwork.SubnetsClientGetOptions) (armnetwork.SubnetsClientGetResponse, error) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *armnetwork.SubnetsClientBeginDeleteOptions) (*runtime.Poller[armnetwork.SubnetsClientDeleteResponse], error) }
SubnetClient is the subset of functions we need from armnetwork.SubnetsClient; this interface is purely here for allowing unit tests.