Repository navigation
feat(search): Index organizations and projects - #331
Merged
Merged
Conversation
There was no ResourceIndexPolicy for resourcemanager Organization or Project, so the search service never indexed them and staff-portal search could never return an organization or project.
mattdjenkinson
approved these changes
Nov 16, 2026
kevwilliams
added a commit
that referenced
this pull request
Nov 16, 2026
## Problem There is no `ResourceIndexPolicy` for `billing.miloapis.com` BillingAccount, so the search service never indexes billing accounts and they can't be found through search. ## Change This PR adds `config/services/search.miloapis.com/billingaccount-resourceindexpolicy.yaml` and lists it in that folder's `kustomization.yaml`. The following fields are searchable: - `.metadata.name` - `.metadata.annotations["kubernetes.io/display-name"]` - `.spec.contactInfo.email`: the billing contact's email - `.spec.contactInfo.invoiceEmails[*]`: the addresses invoices are sent to - `.status.paymentArrangement.invoice.purchaseOrderNumber` - `.status.paymentArrangement.invoice.agreementReference`: the signed MSA or order form, when there is one The last two only exist on accounts with an active Invoice arrangement. Contact names, postal addresses and tax IDs are left out on purpose. ## Testing `kustomize build config/services/search.miloapis.com` succeeds and outputs 10 `ResourceIndexPolicy` objects, up from 9. As with the organization and project policies in #331, I haven't confirmed whether existing billing accounts are indexed as soon as this is applied, or only when each account next changes.
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
There is no
ResourceIndexPolicyforresourcemanager.miloapis.comOrganization or Project. Because of that, the search service never indexes them, and the staff portal's global search can never return an organization or a project. For example, searchingmanifold(an existing organization) only finds users and contacts whose emails contain that word. See datum-cloud/staff-portal#840.Change
This PR adds two policies under
config/services/search.miloapis.com/and lists both in itskustomization.yaml.organization-resourceindexpolicy.yamlindexesmetadata.nameand thekubernetes.io/display-nameandkubernetes.io/descriptionannotations as searchable. It also storesspec.type(Personal or Standard), but not as a searchable field.project-resourceindexpolicy.yamlindexes the same name and annotation fields, plusspec.ownerRef.name(the owning organization), so searching for an organization's name also finds its projects.Both follow the same layout as the existing Contact and DNSZone policies.
Testing
kustomize build config/services/search.miloapis.comsucceeds and outputs 9ResourceIndexPolicyobjects, up from 7.I haven't confirmed whether existing organizations and projects are indexed as soon as these policies are applied, or only when each object next changes. If it's the latter, a re-index may be needed after this deploys.