feat: Implement ResourceIndexPolicy API and Controller Manager Deployment#37
feat: Implement ResourceIndexPolicy API and Controller Manager Deployment#37JoseSzycho merged 19 commits intomainfrom
Conversation
…efine filters, and expand searchable fields
…t-manager integration, policy CRDs, and enhanced development workflow.
|
@scotwells The documentations speaks on term of a [multicluster-runtime] for the resourceIndexer. search/docs/components/resource-indexer.md Line 266 in 587e955 I think that for the work of this PR it was not necessary to add a complexity layer of the multi cluster-runtime, for the admission controllers and the simple reconciler I implemented. |
|
@JoseSzycho you should be able to simplify this by removing the webhook and using an admission controller since we will be using the aggregated apiserver framework. That means the apiserver will do its own validation of the request without having to register a webhook with the core apiserver. You also won't be able to use CRDs here because the core apiserver is going to proxy all traffic for the API group to this server instead of handling CRD requests. The search APIserver will need to connect to an etcd cluster for storage and use the standard etcd storage layer.
@JoseSzycho correct, the controller manager component will not need to be integrated with the multi-cluster runtime library since it's only responsibility is managing the lifecycle of the index policy. The resource indexer component (separate from the controller manager) is what will need to integrate with the multi-cluster runtime library because it will index resources from project control planes. |
|
@scotwells I went into the Admission Control docs, and thought that implementing the webhooks was the intend approach. Sorry for the misunderstanding.
Just to confirm the plan: I will remove the External Controller + CRD + Webhook setup. Instead, I'll enable Etcd storage in the Search APIServer options and move the validation logic directly into the REST Strategy's Validate method (or an internal Admission Plugin if needed). The existing reconciliation logic in the controller manager will be updated to watch the Would that be correct? |
|
@JoseSzycho you'd keep the external controller for reconciling index policies. But correct, you'd remove the CRDs and replace them with an etcd storage backend and then use an admission plugin to replace the webhook. I'd recommend looking at Milo's quota admission plugin for an example of creating an admission plugin. I don't see many resources available online for it. |
|
@scotwells thanks the prompt review. Will start working in fixing this. I’m updating the enhancement issue with the delay I caused. |
…te Etcd for local development and testing.
…and extend related timeouts.
This commit introduce with increased timeouts, unique test naming, and CI-specific NATS and deployment configurations without heavy observability pods. This ensure faster e2e CI testing, decreasing the test time from ~60 mins, to ~7 mins
|
@scotwells everything should be okay now. Can you review the PR again? |
…t used in the agreagated API server.
…, and sample configurations from FieldPolicy, as they won't be implented.
…search.miloapis.com API group
|
@scotwells Thanks for the great feedback. All commits have been pushed. |
scotwells
left a comment
There was a problem hiding this comment.
Good stuff! Nothing that can't be done in a follow up PR.
| name: search-ca | ||
| spec: | ||
| isCA: true | ||
| secretName: search-ca-secret |
There was a problem hiding this comment.
Why was this changed? This should be creating the CA certificate that will be used to sign TLS certs.

Refactor Controller Manager, Implement ResourceIndexPolicy API with Webhooks, and Add CI Workflow
🚀 Summary
This PR deploys the controller manager deployment to align with project standards (
milo), implements theResourceIndexPolicyAPI with robust webhook validations, and establishes a GitHub Actions workflow for environment validation.🛠️ Key Changes
1. Controller Manager Implementation
config/controller-manager), establishing thebaseandoverlays/core-control-planepattern for environment-specific configurations.METRICS_BIND_ADDRESS,LOG_LEVEL) and strict security contexts (non-root execution, read-only filesystem).coordination.k8s.ioleases.2. ResourceIndexPolicy API & Admission Controllers
ResourceIndexPolicyCRD and controller logic.3. End-to-End Test Infrastructure & CI Workflow
test-environment-validation.yaml) that automates cluster setup and validation on every Pull Request.ci:setuptask and a dedicatedciKustomize overlay to deploy a lightweight version of the search stack, explicitly excluding the observability stack (Prometheus/VictoriaMetrics) to optimize runner performance and avoid missing CRD errors.chainsawtests (Meilisearch health and Webhook validation) to use portable shell constructs and correctly handle expected failure assertions, ensuring stability across local and CI execution environments.