From 9cf93e3c1f3e8408aeb8afd399d29d7ddcff6391 Mon Sep 17 00:00:00 2001 From: Viktor Voytovych Date: Tue, 17 Nov 2026 13:17:36 +0200 Subject: [PATCH] fix(search): Reuse the existing org and project index policy names Staging's Milo already has organization-index-policy and project-index-policy for the Organization and Project resources. The search validator allows one policy for each group, version and kind, so it refuses the two policies of #331, and the datum bundle stops applying on staging. The validator skips a policy with the same name. With the names staging uses, Flux applies over the two existing objects and takes them over. Nothing is deleted, so the search cleanup finalizer does not run and both indexes keep their names. On an environment with no such policies, the two policies are created under these names. On staging, the organization type stops being searchable, as #331 intends. The spec hash of both policies changes, so the search controller re-publishes every organization and project once. Related to: datum-cloud/staff-portal#840 --- .../search.miloapis.com/organization-resourceindexpolicy.yaml | 2 +- .../search.miloapis.com/project-resourceindexpolicy.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/services/search.miloapis.com/organization-resourceindexpolicy.yaml b/config/services/search.miloapis.com/organization-resourceindexpolicy.yaml index f3efcb6..34eb30c 100644 --- a/config/services/search.miloapis.com/organization-resourceindexpolicy.yaml +++ b/config/services/search.miloapis.com/organization-resourceindexpolicy.yaml @@ -1,7 +1,7 @@ apiVersion: search.miloapis.com/v1alpha1 kind: ResourceIndexPolicy metadata: - name: organization-resource-index-policy + name: organization-index-policy spec: conditions: - expression: has(metadata.name) diff --git a/config/services/search.miloapis.com/project-resourceindexpolicy.yaml b/config/services/search.miloapis.com/project-resourceindexpolicy.yaml index 7628363..239927c 100644 --- a/config/services/search.miloapis.com/project-resourceindexpolicy.yaml +++ b/config/services/search.miloapis.com/project-resourceindexpolicy.yaml @@ -1,7 +1,7 @@ apiVersion: search.miloapis.com/v1alpha1 kind: ResourceIndexPolicy metadata: - name: project-resource-index-policy + name: project-index-policy spec: conditions: - expression: has(metadata.name)