Documentation ¶
Index ¶
- Constants
- type AzureAccessServiceAdapter
- type AzureCluster
- func (c AzureCluster) GetBaseDomain() string
- func (c AzureCluster) GetCredentials() cluster.Credentials
- func (c AzureCluster) GetName() string
- func (c AzureCluster) GetNamespace() string
- func (c AzureCluster) GetRegion() string
- func (c AzureCluster) GetResourceGroup() string
- func (c AzureCluster) GetTags() map[string]string
- type AzureClusterGetter
- type AzureCredentials
- type AzureObjectStorageAdapter
- func (s AzureObjectStorageAdapter) ConfigureBucket(ctx context.Context, bucket *v1alpha1.Bucket) error
- func (s AzureObjectStorageAdapter) CreateBucket(ctx context.Context, bucket *v1alpha1.Bucket) error
- func (s AzureObjectStorageAdapter) DeleteBucket(ctx context.Context, bucket *v1alpha1.Bucket) error
- func (s AzureObjectStorageAdapter) ExistsBucket(ctx context.Context, bucket *v1alpha1.Bucket) (bool, error)
- type AzureObjectStorageService
- func (s AzureObjectStorageService) NewAccessRoleService(ctx context.Context, logger logr.Logger, cluster cluster.Cluster) (objectstorage.AccessRoleService, error)
- func (s AzureObjectStorageService) NewObjectStorageService(ctx context.Context, logger logr.Logger, cluster cluster.Cluster, ...) (objectstorage.ObjectStorageService, error)
Constants ¶
const ( Group = "infrastructure.cluster.x-k8s.io" KindCluster = "AzureCluster" VersionCluster = "v1beta1" KindClusterIdentity = "AzureClusterIdentity" VersionClusterIdentity = "v1beta1" ClientSecretKeyName = "clientSecret" )
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 (AzureAccessServiceAdapter) DeleteRole ¶
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 ¶
type AzureCredentials ¶
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 ¶
CreateBucket creates the Storage Account if it not exists AND the Storage Container
func (AzureObjectStorageAdapter) DeleteBucket ¶
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)