Skip to content

ACK controller have duplicate CRD causing issues when using kustomize #2018

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

Open
leofvo opened this issue Feb 15, 2024 · 5 comments
Open

ACK controller have duplicate CRD causing issues when using kustomize #2018

leofvo opened this issue Feb 15, 2024 · 5 comments
Labels
area/helm Issues or PRs related to Helm charts kind/feature Categorizes issue or PR as related to a new feature.

Comments

@leofvo
Copy link

leofvo commented Feb 15, 2024

Is your feature request related to a problem?
Yes.
To understand our issue, we are using argocd and kustomize, and we have defined an argocd application that is regrouping all ACK controller we want to use.
Basically, we use IAM, RDS, S3.
We have an issue due to kustomize, when kustomize is building the yaml, it throws an error due to CRDs duplication...

The CRDs concerned are the following:
services.k8s.aws_adoptedresources.yaml
services.k8s.aws_fieldexports.yaml

Theses CRDs are present in each helm charts, and they are exactly the same..

Step to reproduce our problem
Create your kustomize file:

helmCharts:
- repo: oci://public.ecr.aws/aws-controllers-k8s
  name: s3-chart
  includeCRDs: true
  releaseName: s3
  version: 1.0.9
- repo: oci://public.ecr.aws/aws-controllers-k8s
  name: rds-chart
  includeCRDs: true
  releaseName: rds
  version: 1.1.11

Then apply:
kustomize build --enable-helm .

At this step, kustomize will fail saying that some CRDs are the same, and need to be merge or patch.

Describe the solution you'd like
Define this CRDs as helm dependencies could allow us to activate the CRD creation once.

Describe alternatives you've considered
Giving more flexibility to choose which CRDs are deployed from the helm values.

@a-hilaly a-hilaly added kind/feature Categorizes issue or PR as related to a new feature. area/helm Issues or PRs related to Helm charts labels Feb 15, 2024
@gecube
Copy link

gecube commented Feb 21, 2024

Hi!

Interesting thing. I really wonder how I did not notice it, as I am using FluxCD and did not run into this issue. For the more context - I am installing every chart as a separate release.

Also I would like to mention, that I had ANOTHER issue with CRDs, when upgrading Helm charts versions #2007

@ack-bot
Copy link
Collaborator

ack-bot commented Aug 19, 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 Aug 19, 2024
@gecube
Copy link

gecube commented Aug 19, 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 Aug 19, 2024
@jon-rei
Copy link

jon-rei commented Jan 7, 2025

I also ran into the same problem with ArgoCD. We use ArgoCD to deploy all our applications and use the ack-chart to enable all the controllers we want to deploy in our clusters.

ArgoCD now displays the following for our application:

Resource apiextensions.k8s.io/CustomResourceDefinition//adoptedresources.services.k8s.aws appeared 2 times among application resources.
Resource apiextensions.k8s.io/CustomResourceDefinition//fieldexports.services.k8s.aws appeared 2 times among application resources.

For us, the deployment of the controllers does not fail, but there is a warning in the application, but it would be great if the CRD deployment could be improved.

@james-callahan
Copy link

Trying to do a kustomization with multiple upstream controllers fail:

Error: accumulating resources: accumulation: may not add resource with an already registered id: CustomResourceDefinition.v1.apiextensions.k8s.io/adoptedresources.services.k8s.aws.[noNs]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Issues or PRs related to Helm charts kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

6 participants