Skip to content

AutoOps ECK integration#8941

Merged
naemono merged 142 commits intoelastic:mainfrom
naemono:ccm-integration
Dec 29, 2025
Merged

AutoOps ECK integration#8941
naemono merged 142 commits intoelastic:mainfrom
naemono:ccm-integration

Conversation

@naemono
Copy link
Contributor

@naemono naemono commented Dec 4, 2025

Resolves #8789

What is this change?

This adds a new CRD AutoOpsAgentPolicy that allows Elastic AutoOps to be integrated into self-managed ECK clusters.

TODO

  • Allow parts of the configuration (configmap) to be overridden
  • Allow cleanup of orphaned Agents and their relevant data.
  • A minimally functional e2e test should be possible that just verifies that the deployment is created, and (currently fautlly behavior) becomes ready, even with URLs set to localhost. - This is still non-functional, but a wip This is now fully functional.

Implementation Notes

  • For each ES cluster, the CA is copied to the namespace of the AutoOps Policy, and an API Key is created in the ES cluster for communication purposes and an additional secret is created that contains the API Key.
  • Currently if the policy is in the same namespace as ECK operator the query for ES clusters is cluster-scoped, and if it's outside of the operator namespace, it's namespace scoped. This follows what we did for SSP, but recent discussions are questioning this behavior. (This behavior could quickly change and default to cluster-scoped always, which seems to make sense)

Needs testing

  • All Helm Charts

naemono added 26 commits October 7, 2025 13:25
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
@prodsecmachine
Copy link
Collaborator

prodsecmachine commented Dec 4, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

🔍 Preview links for changed docs

naemono

This comment was marked as resolved.

Use requeuerbac from association package.
delete unused func

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
@pebrc

This comment was marked as resolved.

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
@naemono
Copy link
Contributor Author

naemono commented Dec 18, 2025

I just realised that the telemetry integration for AutoOpsAgentPolicies is missing.

This has now been added:

❯ kc view-secret -n elastic kibana-sample-kb-config 'telemetry.yml' | yq '.eck.stats.autoopsagentpolicies'
helm_resource_count: 0
pod_count: 1
resource_count: 1

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
@naemono
Copy link
Contributor Author

naemono commented Dec 22, 2025

buildkite test this -f p=kind,t=TestAutoOpsAgentPolicy -m s=9.2.0

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Copy link
Collaborator

@pebrc pebrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Let's undo that rename of policyFromLabels though.

I will create a few follow up issues:

  • status reporting is very bare-bones, we should maybe offer a bit more traceablity
  • phase calculation could be cleaner (but I don't see it as a blocker for merging) there is a lot of overlap in responsiblity between reconcile.go and a derivation of the status phase from the error/ready count
  • we should add support for an explicit namespace selector to allow uses to restrict the reach of the policy (we have the RBAC access reviews but that is more a cluster admin level feature, the namespace selector would be a user level feature)

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
@naemono
Copy link
Contributor Author

naemono commented Dec 22, 2025

buildkite test this -f p=kind -m s=9.2.0,s=8.19.6

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
…o ccm-integration

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:autoops >feature Adds or discusses adding a feature to the product v3.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cloud connected mode] Manage autoOps agents in a native manner in ECK

6 participants