[CONTINT-5028] Add permissions to collect Argo and Flux CRDs and use kustomize SA for e2e-tests #2486
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
E2E_GO_TEST_TIMEOUTthat can be overridden to catch the test failing before the CI timing out (60mns) at which point we don't get any useful logMotivation
main):{"level":"ERROR","ts":"2026-01-14T09:14:18.881Z","msg":"Reconciler error","controller":"datadogagent","controllerGroup":"datadoghq.com","controllerKind":"DatadogAgent","DatadogAgent":{"name":"dda-minimum","namespace":"e2e-operator"},"namespace":"e2e-operator","name":"dda-minimum","reconcileID":"2676b79b-f3dd-4009-9ff1-e5f32d25ec6b","error":"[clusterroles.rbac.authorization.k8s.io \"e2e-operator-dda-minimum-orch-exp-dca\" is forbidden: user \"system:serviceaccount:e2e-operator:datadog-operator-linux\" (groups=[\"system:serviceaccounts\" \"system:serviceaccounts:e2e-operator\" \"system:authenticated\"]) is attempting to grant RBAC permissions not currently held:\n{APIGroups:[\"argoproj.io\"], Resources:[\"applications\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"argoproj.io\"], Resources:[\"applicationsets\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"kustomize.toolkit.fluxcd.io\"], Resources:[\"kustomizations\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"buckets\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"externalartifacts\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"gitrepositories\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"helmcharts\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"helmrepositories\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"ocirepositories\"], Verbs:[\"list\" \"watch\"]}, clusterroles.rbac.authorization.k8s.io \"e2e-operator-dda-minimum-orch-exp-dca\" not found]","errorCauses":[{"error":"clusterroles.rbac.authorization.k8s.io \"e2e-operator-dda-minimum-orch-exp-dca\" is forbidden: user \"system:serviceaccount:e2e-operator:datadog-operator-linux\" (groups=[\"system:serviceaccounts\" \"system:serviceaccounts:e2e-operator\" \"system:authenticated\"]) is attempting to grant RBAC permissions not currently held:\n{APIGroups:[\"argoproj.io\"], Resources:[\"applications\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"argoproj.io\"], Resources:[\"applicationsets\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"kustomize.toolkit.fluxcd.io\"], Resources:[\"kustomizations\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"buckets\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"externalartifacts\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"gitrepositories\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"helmcharts\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"helmrepositories\"], Verbs:[\"list\" \"watch\"]}\n{APIGroups:[\"source.toolkit.fluxcd.io\"], Resources:[\"ocirepositories\"], Verbs:[\"list\" \"watch\"]}"},{"error":"clusterroles.rbac.authorization.k8s.io \"e2e-operator-dda-minimum-orch-exp-dca\" not found"}],"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"}Additional Notes
Anything else we should know when reviewing?
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
See #2470
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel