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

AWS VPC Peering and Security Group Firewall rule cluster resources enhancement #566

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

worryg0d
Copy link
Collaborator

Done:

  • added handling of external changes for AWS VPC Peering cluster resources
  • added deleting AWS VPC Peering resource if it doesn't exist on Instaclustr
  • added deleting AWS Security Group Firewall Rule resource if it doesn't exist on Instaclustr
  • fixed a bug in the AWS Security Group Firewall Rule status checker when it deletes itself

@worryg0d worryg0d added bug Something isn't working enhancement New feature or request labels Sep 19, 2023
@worryg0d worryg0d self-assigned this Sep 19, 2023
Comment on lines 21 to 23
"errors"

"github.com/go-logr/logr"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please leave the gap

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

if err != nil {
return err
}
}

if awsPeering.Annotations[models.UpdateQueuedAnnotation] == "" &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about using the UpdatingEvent annotation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense. Good catch, thanks. Fixed

aws.Annotations[models.UpdateQueuedAnnotation] = models.True
err = r.Patch(ctx, aws, patch)
if err != nil {
l.Error(err, "Cannot patch AWS VPC Peering resource metadata with update queued annotation",
"AWS VPC Peering ID", aws.Status.ID,
)
r.EventRecorder.Eventf(
aws, models.Warning, models.PatchFailed,
"Patching resource with update queued annotation is failed. Reason: %v",
err,
)

return models.ReconcileRequeue
}

err = r.API.UpdatePeering(aws.Status.ID, instaclustr.AWSPeeringEndpoint, &aws.Spec)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems unnecessary

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@worryg0d worryg0d force-pushed the aws-vpc-external-changes-handling branch 2 times, most recently from 967000c to fd2c1bf Compare September 19, 2023 14:24
@worryg0d worryg0d force-pushed the aws-vpc-external-changes-handling branch from fd2c1bf to 3c564a2 Compare September 19, 2023 14:38
@taaraora taaraora merged commit 80dba79 into main Sep 19, 2023
1 check 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 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants