-
Notifications
You must be signed in to change notification settings - Fork 362
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
Add Global Cluster support #673
Add Global Cluster support #673
Conversation
Signed-off-by: Trenton Lawrence <pitime2@outlook.com>
172f62c
to
9553ddd
Compare
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.
LGTM after a couple small comments! Let me know when it's ready to be merged.
apis/rds/v1alpha1/custom_types.go
Outdated
// SourceDBClusterIdentifier. | ||
// +immutable | ||
// +optional | ||
SourceDBClusterIDRef *xpv1.Reference `json:"sourceDBClusterIDRef,omitempty"` |
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.
SourceDBClusterIDRef *xpv1.Reference `json:"sourceDBClusterIDRef,omitempty"` | |
SourceDBClusterIdentifierRef *xpv1.Reference `json:"sourceDBClusterIdentifierRef,omitempty"` |
We use the exact name of the field as prefix for consistencty.
apis/rds/v1alpha1/custom_types.go
Outdated
// set SourceDBClusterIdentifier. | ||
// +immutable | ||
// +optional | ||
SourceDBClusterIDSelector *xpv1.Selector `json:"sourceDBClusterIDSelector,omitempty"` |
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.
SourceDBClusterIDSelector *xpv1.Selector `json:"sourceDBClusterIDSelector,omitempty"` | |
SourceDBClusterIdentifierSelector *xpv1.Reference `json:"sourceDBClusterIdentifierSelector,omitempty"` |
We use the exact name of the field as prefix for consistencty.
clusterIdentifier := aws.String(meta.GetExternalName(cr)) | ||
resp := &svcsdk.DescribeGlobalClustersOutput{} | ||
for _, dbCluster := range obj.GlobalClusters { | ||
if aws.StringValue(dbCluster.GlobalClusterIdentifier) == aws.StringValue(clusterIdentifier) { |
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.
if aws.StringValue(dbCluster.GlobalClusterIdentifier) == aws.StringValue(clusterIdentifier) { | |
if aws.StringValue(dbCluster.GlobalClusterIdentifier) == meta.GetExternalName(cr) { |
…ency Signed-off-by: Trenton Lawrence <pitime2@outlook.com>
714204d
to
fec6ea2
Compare
Thanks @PocketMobsters ! |
Description of your changes
Adds support for Global Aurora Clusters
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
sourceDBClusterIDRef
and verified it created a GlobalCluster with the sourceDBCluster attached properly.