Skip to content

[ec2-controller] VPCPeeringConnection: options are read from the spec, not AWS #3171

Open

Description

@gobos12

Describe the bug

Peering options are read from the CR's spec, not AWS, and adoption leaves out peerVPCID. Found by vpc-peering-connection-adoption, at check-adopted-spec.

Observed: an adopted CR has no accepterPeeringConnectionOptions, requesterPeeringConnectionOptions or peerVPCID, while AWS has both options set and returns the accepter VPC. Drift in the options is never detected.

Cause: the read hook builds both option sets from r.ko.Spec, not from the DescribeVpcPeeringConnections output. It also copies the accepter's AllowDNSResolutionFromRemoteVPC into AllowEgressFromLocalClassicLinkToRemoteVPC. Adoption backfills vpcID from RequesterVpcInfo, but not peerVPCID from AccepterVpcInfo.

Related: #2419 and #2480, closed: adoption failed on vpcID, fixed by the vpcID backfill.

Steps to reproduce

Create a peering connection with both options set and acceptRequest: true, then adopt it by ID with services.k8s.aws/adoption-policy: adopt and no spec.

Expected outcome

The options and peerVPCID are read from AWS, so the adopted spec has them and drift in the options is detected.

Environment

  • Kubernetes version: 1.35
  • Using EKS (yes/no), if so version? Yes, 1.35
  • AWS service targeted (S3, RDS, etc.): EC2
  • ec2-controller v1.24.0, ACK runtime v0.68.0, us-west-2

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug.
    service/ec2Indicates issues or PRs that are related to ec2-controller.
    area/adoption-annotationIssues or PRs related to ACK Adoption by Annotation feature
    on Nov 12, 2026
  2. github-actions commented on Nov 12, 2026

    @github-actions

    Hello @gobos12 👋 Thank you for opening an issue in ACK! A maintainer will triage this issue soon.

    We encourage community contributions, so if you're interested in tackling this yourself or suggesting a solution, please check out our Contribution and Code of Conduct guidelines.

    You can find more information about ACK on our website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/adoption-annotationIssues or PRs related to ACK Adoption by Annotation featurearea/drift-remediationIssues or PRs related to drift remediation.kind/bugCategorizes issue or PR as related to a bug.service/ec2Indicates issues or PRs that are related to ec2-controller.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions