From e3ce6c4fe4ec616dba89ac77672edc073dfb2d45 Mon Sep 17 00:00:00 2001 From: Kevin Williams Date: Mon, 16 Nov 2026 21:34:26 +0000 Subject: [PATCH] feat(search): Index billing accounts 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. --- .../billingaccount-resourceindexpolicy.yaml | 25 +++++++++++++++++++ .../search.miloapis.com/kustomization.yaml | 1 + 2 files changed, 26 insertions(+) create mode 100644 config/services/search.miloapis.com/billingaccount-resourceindexpolicy.yaml diff --git a/config/services/search.miloapis.com/billingaccount-resourceindexpolicy.yaml b/config/services/search.miloapis.com/billingaccount-resourceindexpolicy.yaml new file mode 100644 index 0000000..dc3a2b5 --- /dev/null +++ b/config/services/search.miloapis.com/billingaccount-resourceindexpolicy.yaml @@ -0,0 +1,25 @@ +apiVersion: search.miloapis.com/v1alpha1 +kind: ResourceIndexPolicy +metadata: + name: billingaccount-resource-index-policy +spec: + conditions: + - expression: has(metadata.name) + name: has-name + fields: + - path: .metadata.name + searchable: true + - path: .metadata.annotations["kubernetes.io/display-name"] + searchable: true + - path: .spec.contactInfo.email + searchable: true + - path: .spec.contactInfo.invoiceEmails[*] + searchable: true + - path: .status.paymentArrangement.invoice.purchaseOrderNumber + searchable: true + - path: .status.paymentArrangement.invoice.agreementReference + searchable: true + targetResource: + group: billing.miloapis.com + kind: BillingAccount + version: v1alpha1 diff --git a/config/services/search.miloapis.com/kustomization.yaml b/config/services/search.miloapis.com/kustomization.yaml index ab3ca2b..0469026 100644 --- a/config/services/search.miloapis.com/kustomization.yaml +++ b/config/services/search.miloapis.com/kustomization.yaml @@ -11,6 +11,7 @@ resources: - workload-resourceindexpolicy.yaml - organization-resourceindexpolicy.yaml - project-resourceindexpolicy.yaml + - billingaccount-resourceindexpolicy.yaml # Use explicit sorting options so we can guarantee order in which resources are # applied.