-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make azure storage account private #255
base: refacto-and-prep-for-private-storage-account
Are you sure you want to change the base?
make azure storage account private #255
Conversation
229d7cd
to
d59b29f
Compare
@@ -110,7 +110,12 @@ func (r BucketReconciler) reconcileNormal(ctx context.Context, objectStorageServ | |||
return ctrl.Result{}, errors.WithStack(err) | |||
} | |||
} else { | |||
logger.Info("Bucket exists and you already own it.") | |||
logger.Info("Bucket exists and you already own it, let's update it") | |||
err = objectStorageService.UpdateBucket(ctx, bucket) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless we want to delete all our storage accounts, we need to be able to update azure storage
func (s *AzureObjectStorageAdapter) getStorageAccountName(bucketName string) string { | ||
sanitizeName := sanitizeAlphanumeric24(bucketName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This had no use
6257228
to
4448883
Compare
4b3b09d
to
25fd866
Compare
@@ -64,6 +64,11 @@ func (s S3ObjectStorageAdapter) CreateBucket(ctx context.Context, bucket *v1alph | |||
return err | |||
} | |||
|
|||
// UpdateBucket does nothing as we cannot update an s3 bucket | |||
func (s S3ObjectStorageAdapter) UpdateBucket(ctx context.Context, bucket *v1alpha1.Bucket) error { | |||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to be able to update storage accounts in Azure. I'm not trying to implement this in AWS because this is not needed now and also well, this will be replaced by crossplane
"github.com/giantswarm/object-storage-operator/api/v1alpha1" | ||
) | ||
|
||
func (s AzureObjectStorageAdapter) existsContainer(ctx context.Context, bucket *v1alpha1.Bucket, storageAccountName string) (bool, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a new function but I split the existing functions from storage.go into smaller files to be more manageable
35319cc
to
4dfa6f6
Compare
4dfa6f6
to
795725e
Compare
034a54d
to
83f2ca2
Compare
83f2ca2
to
1aaf5df
Compare
What this PR does / why we need it
Towards giantswarm/roadmap#3391
This PR actually allows us to create private only azure storage accounts in case we are running MCs in private mode.
To achieve that, this PR:
This PR is based on https://github.com/giantswarm/object-storage-operator/tree/refacto-and-prep-for-private-storage-account to make review easier.
Checklist