Fixes Related To AWS STS (in BlockStoreS3
And add_external_connection
)
#7577
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explain the changes
test_store_validity
add the condition related to AWS STS as it appears in all other methods in the class._delete_past_versions
has a condition related to AWS so I added AWSSTS.add_external_connection
add the type AWSSTS in a condition (which I thought was missing).Issues: Fixed #xxx / Gap #xxx
test_store_validity
you could see in noobaa-core logs:Note: to see it live I changed the
defaultSTSCredsValidity
to 900 (minimum possible) and waited 15 minutes after the creation of the aws-sts backingstore.Testing Instructions:
Note:
nb
is an alias that runs the local operator frombuild/_output/bin
(alias created bydevenv
).nb backingstore create aws-sts-s3 <backingstore-name> -n <your-namespace>
nb bucketclass create placement-bucketclass <bucketclass-name> --backingstores=<backingstore-name> -n <your-namespace>
nb obc create <obc-name> --bucketclass=<bucket-class-name> -n <your-namespace>
kubectl port-forward -n <your-namespace> service/s3 12443:443
alias s3-nb-user-1='AWS_SECRET_ACCESS_KEY=<paste-here> AWS_ACCESS_KEY_ID=<paste-here> aws --no-verify-ssl --endpoint-url https://localhost:12443'
nb system set-debug-level 3 -n <your-namespace>
s3-nb-user-1 s3api put-object --bucket <obc-bucket-name> --key <key-name> --body <path-to-file>
s3-nb-user-1 s3api get-object --bucket <obc-bucket-name> --key <key-name>