Skip to content

ACK EC2 Controller doesn't adopt VPC Peering Connection. #2419

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

Closed
stefanescualexandrumihai opened this issue Apr 7, 2025 · 1 comment · Fixed by aws-controllers-k8s/ec2-controller#261
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. service/ec2 Indicates issues or PRs that are related to ec2-controller.

Comments

@stefanescualexandrumihai

Describe the bug
I've tried to create and adopt a VPCPeeringConnection. The creation worked as expected.
However, when I adopted an existing VPC Peering, the object's status showed the following message:
resource reference wrapper or ID required: VPCID,VPCRef
I expected this message during creation, not adoption.

vpc-peering-adoption.yaml

apiVersion: ec2.services.k8s.aws/v1alpha1
kind: VPCPeeringConnection
metadata:
  name: test-vpc-peering
  namespace: sbx-clusters
  annotations:
    services.k8s.aws/adoption-fields: |
      {
        "vpcPeeringConnectionID": "pcx-0aa55b452463eee7b"
      }
    services.k8s.aws/adoption-policy: adopt

kubectl get vpcpeeringconnections test-vpc-peering -o yaml

apiVersion: ec2.services.k8s.aws/v1alpha1
kind: VPCPeeringConnection
metadata:
  annotations:
    services.k8s.aws/adopted: "true"
    services.k8s.aws/adoption-fields: |
      {
        "vpcPeeringConnectionID": "pcx-0aa55b452463eee7b"
      }
    services.k8s.aws/adoption-policy: adopt
  name: test-vpc-peering
  namespace: sbx-clusters
spec:
  acceptRequest: false
  tags:
  - key: Name
    value: test-peering
status:
  accepterVPCInfo:
    ownerID: "2580123456"
    region: us-west-2
    vpcID: vpc-0c9ef1d6e465094ef
  ackResourceMetadata:
    ownerAccountID: "2580123456"
    region: us-west-2
  conditions:
  - lastTransitionTime: "2025-04-07T12:07:52Z"
    message: Reference resolution failed
    reason: 'resource reference wrapper or ID required: VPCID,VPCRef'
    status: Unknown
    type: ACK.ReferencesResolved
  expirationTime: "2025-04-14T08:27:19Z"
  requesterVPCInfo:
    cidrBlock: 10.10.0.0/24
    cidrBlockSet:
    - cidrBlock: 10.10.0.0/24
    ownerID: "2580123456"
    peeringOptions:
      allowDNSResolutionFromRemoteVPC: false
      allowEgressFromLocalClassicLinkToRemoteVPC: false
      allowEgressFromLocalVPCToRemoteClassicLink: false
    region: us-west-2
    vpcID: vpc-0562e703c4ced8dda
  status:
    code: pending-acceptance
    message: Pending Acceptance by 258057316678
  vpcPeeringConnectionID: pcx-0aa55b452463eee7b

ACK EC2 Controller logs:

...
{"level":"error","ts":"2025-04-07T12:41:12.367Z","msg":"Reconciler error","controller":"vpcpeeringconnection","controllerGroup":"ec2.services.k8s.aws","controllerKind":"VPCPeeringConnection","VPCPeeringConnection":{"name":"test-vpc-peering","namespace":"sbx-clusters"},"namespace":"sbx-clusters","name":"test-vpc-peering","reconcileID":"c8a55f2b-0aef-4e9a-8ffe-3fa4c6264eb6","error":"resource reference wrapper or ID required: VPCID,VPCRef","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:347\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:294\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:255"}...
  • Kubernetes version 1.30
  • Using EKS (yes/no), if so version? 1.30
  • AWS service targeted (S3, RDS, etc.) ACK EC2 Controller 1.4.0
Copy link

github-actions bot commented Apr 7, 2025

Hello @stefanescualexandrumihai 👋 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.

@michaelhtm michaelhtm added kind/bug Categorizes issue or PR as related to a bug. service/ec2 Indicates issues or PRs that are related to ec2-controller. labels Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. service/ec2 Indicates issues or PRs that are related to ec2-controller.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants