azure

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Group                  = "infrastructure.cluster.x-k8s.io"
	KindCluster            = "AzureCluster"
	VersionCluster         = "v1beta1"
	KindClusterIdentity    = "AzureClusterIdentity"
	VersionClusterIdentity = "v1beta1"
	ClientSecretKeyName    = "clientSecret"
)
View Source
const (
	LifecycleRuleName = "ExpirationLogging"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureAccessServiceAdapter

type AzureAccessServiceAdapter struct {
}

func NewAzureAccessService

func NewAzureAccessService() AzureAccessServiceAdapter

func (AzureAccessServiceAdapter) ConfigureRole

func (s AzureAccessServiceAdapter) ConfigureRole(ctx context.Context, bucket *v1alpha1.Bucket) error

func (AzureAccessServiceAdapter) DeleteRole

func (s AzureAccessServiceAdapter) DeleteRole(ctx context.Context, bucket *v1alpha1.Bucket) error

type AzureCluster

type AzureCluster struct {
	Client      client.Client
	Name        string
	Namespace   string
	BaseDomain  string
	Region      string
	Tags        map[string]string
	Credentials AzureCredentials
}

AzureCluster implements Cluster Interface with Azure data

func (AzureCluster) GetBaseDomain

func (c AzureCluster) GetBaseDomain() string

func (AzureCluster) GetCredentials

func (c AzureCluster) GetCredentials() cluster.Credentials

func (AzureCluster) GetName

func (c AzureCluster) GetName() string

func (AzureCluster) GetNamespace

func (c AzureCluster) GetNamespace() string

func (AzureCluster) GetRegion

func (c AzureCluster) GetRegion() string

func (AzureCluster) GetResourceGroup

func (c AzureCluster) GetResourceGroup() string

func (AzureCluster) GetTags

func (c AzureCluster) GetTags() map[string]string

type AzureClusterGetter

type AzureClusterGetter struct {
	Client            client.Client
	ManagementCluster flags.ManagementCluster
}

AzureClusterGetter implements ClusterGetter Interface It creates an AzureCluster object

func (AzureClusterGetter) GetCluster

func (c AzureClusterGetter) GetCluster(ctx context.Context) (cluster.Cluster, error)

type AzureCredentials

type AzureCredentials struct {
	ResourceGroup  string
	SubscriptionID string
	TypeIdentity   string
	ClientID       string
	TenantID       string
	SecretRef      corev1.Secret
}

type AzureObjectStorageAdapter

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

func NewAzureStorageService

func NewAzureStorageService(storageAccountClient *armstorage.AccountsClient, blobContainerClient *armstorage.BlobContainersClient, managementPoliciesClient *armstorage.ManagementPoliciesClient, logger logr.Logger, cluster AzureCluster, client client.Client) AzureObjectStorageAdapter

func (AzureObjectStorageAdapter) ConfigureBucket

func (s AzureObjectStorageAdapter) ConfigureBucket(ctx context.Context, bucket *v1alpha1.Bucket) error

ConfigureBucket set lifecycle rules (expiration on blob)

func (AzureObjectStorageAdapter) CreateBucket

func (s AzureObjectStorageAdapter) CreateBucket(ctx context.Context, bucket *v1alpha1.Bucket) error

CreateBucket creates the Storage Account if it not exists AND the Storage Container

func (AzureObjectStorageAdapter) DeleteBucket

func (s AzureObjectStorageAdapter) DeleteBucket(ctx context.Context, bucket *v1alpha1.Bucket) error

DeleteBucket deletes the Storage Account (Storage Container will be deleted by cascade) Here, we decided to have a Storage Account dedicated to a Storage Container (relation 1 - 1) We want to prevent the Storage Account from being used by anyone

func (AzureObjectStorageAdapter) ExistsBucket

func (s AzureObjectStorageAdapter) ExistsBucket(ctx context.Context, bucket *v1alpha1.Bucket) (bool, error)

ExistsBucket checks if the bucket exists on Azure firstly, it checks if the Storage Account exists then, it checks if the Blob Container exists

type AzureObjectStorageService

type AzureObjectStorageService struct {
}

func (AzureObjectStorageService) NewAccessRoleService

func (s AzureObjectStorageService) NewAccessRoleService(ctx context.Context, logger logr.Logger, cluster cluster.Cluster) (objectstorage.AccessRoleService, error)

func (AzureObjectStorageService) NewObjectStorageService

func (s AzureObjectStorageService) NewObjectStorageService(ctx context.Context, logger logr.Logger, cluster cluster.Cluster, client client.Client) (objectstorage.ObjectStorageService, error)

Jump to

Keyboard shortcuts

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