Repository navigation
feat(search): Index billing accounts - #332
Merged
Merged
Conversation
Add a ResourceIndexPolicy for billing.miloapis.com BillingAccount so staff can find an account by its name, display name, billing contact email, invoice emails, purchase order number or agreement reference.
mattdjenkinson
approved these changes
Nov 16, 2026
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
ResourceIndexPolicyforbilling.miloapis.comBillingAccount, 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.yamland lists it in that folder'skustomization.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 oneThe 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.comsucceeds and outputs 10ResourceIndexPolicyobjects, 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.