Skip to content
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

Fix bucket naming clashes for cloudscale and exoscale #206

Merged
merged 5 commits into from
Aug 5, 2024

Conversation

Kidswiss
Copy link
Contributor

@Kidswiss Kidswiss commented Jul 30, 2024

Summary

If a nested services needed more than one bucket, the provisioning would fail. That's because the bucket CRs for cloudscale and exoscale patched value of the crossplane.io/composite label to the metadata.name of the resulting objects. As this will always be the name of the top most composite, there were name clashes.

This change is implemented in a backward compatible fashion. If there are already existing CRs, it will simply take their name. If the CRs are freshly created, the new naming will be used.

Also the naming follows what has been implement for the minio buckets. It takes the value of the bucketName as the name of the CRs. As bucket names should be unique per provider anyway.

Checklist

  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog
  • Update tests.
  • Link this PR to related issues.

@Kidswiss Kidswiss added the bug Something isn't working label Jul 30, 2024
@Kidswiss Kidswiss force-pushed the fix/bucket_name_clashes branch 3 times, most recently from 7da789a to 6e12f94 Compare July 30, 2024 13:02
If a nested services needed more than one bucket, the provisioning would
fail. That's because the bucket CRs for cloudscale and exoscale patched
value of the `crossplane.io/composite` label to the `metadata.name` of
the resulting objects. As this will always be the name of the top most
composite, there were name clashes.

This change is implemented in a backward compatible fashion. If there
are already existing CRs, it will simply take their name. If the CRs are
freshly created, the new naming will be used.

Also the naming follows what has been implement for the minio buckets.
It takes the value of the `bucketName` as the name of the CRs. As bucket
names should be unique per provider anyway.
@Kidswiss Kidswiss requested review from a team, TheBigLee, wejdross and zugao and removed request for a team August 5, 2024 07:28
@Kidswiss Kidswiss requested a review from TheBigLee August 5, 2024 08:11
@Kidswiss Kidswiss merged commit fabdc9c into master Aug 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants