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

FluxCD - resources with references are always configured #1880

Open
gecube opened this issue Aug 22, 2023 · 4 comments
Open

FluxCD - resources with references are always configured #1880

gecube opened this issue Aug 22, 2023 · 4 comments
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

@gecube
Copy link

gecube commented Aug 22, 2023

Describe the bug

If we create a resource that utilises ref from another resource like

apiVersion: ec2.services.k8s.aws/v1alpha1
kind: RouteTable
metadata:
  name: production-private-route-table-eu-west-2c
  namespace: infra-production
spec:
  vpcRef:
    from:
      name: production
  routes:
    - destinationCIDRBlock: 0.0.0.0/0
      natGatewayRef:
        from:
          name: natgateway-eu-west-2c
    - destinationCIDRBlock: 10.0.0.0/16
      vpcPeeringConnectionID: pcx-0a7197b4f5ced6f01

then the target resource looks like:

spec:
  routes:
    - destinationCIDRBlock: 10.0.0.0/16
      vpcPeeringConnectionID: pcx-0a7197b4f5ced6f01
    - destinationCIDRBlock: 0.0.0.0/0
      natGatewayID: nat-07a301987eaa97785
  tags:
    - key: services.k8s.aws/namespace
      value: infra-production
    - key: services.k8s.aws/controller-version
      value: ec2-1.0.3
  vpcRef:
    from:
      name: production

So we can clearly see that natGatewayID was substituted. So it means that on every reconciliation by flux resource is changed twice. Also it is curious that vpcRef is not substituted.

Steps to reproduce

Just apply the first manifest

Expected outcome

No idea. Needs to be discussed. Probably - make substitutions in status field. Or use admission controller. No idea. The only thing I can propose - ask not to change the original description, otherwise I will need to find a way to remove a fields from reconciliation.

@gecube
Copy link
Author

gecube commented Sep 14, 2023

linked to #1898

@a-hilaly
Copy link
Member

This could be very likely a bug with ACK references.. we'll have to investigate this further. Thank you for reporting this @gecube !

@ack-bot
Copy link
Collaborator

ack-bot commented May 11, 2024

Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-prow ack-prow bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 11, 2024
@gecube
Copy link
Author

gecube commented May 11, 2024

/remove-lifecycle stale

@ack-prow ack-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 11, 2024
@a-hilaly a-hilaly 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 Jun 18, 2024
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

No branches or pull requests

3 participants