Skip to content

feat: Add ResourceIndexPolicy for Domain, DNSZone, Contact, and Note#215

Merged
kevwilliams merged 3 commits intomainfrom
feat/search-resource-index-policies
Apr 13, 2026
Merged

feat: Add ResourceIndexPolicy for Domain, DNSZone, Contact, and Note#215
kevwilliams merged 3 commits intomainfrom
feat/search-resource-index-policies

Conversation

@kevwilliams
Copy link
Copy Markdown
Contributor

Summary

  • Deploys ResourceIndexPolicy resources for four additional types so they appear in search.miloapis.com results alongside the existing User policy
  • Indexes searchable fields on Domain, DNSZone, Contact, and Note resources
  • Wires all four policies into the search.miloapis.com kustomization component

Details

Resource Group Version Indexed fields
Domain networking.datumapis.com v1alpha domainName, status.apex, status.nameservers[0].hostname, registrar/registry names
DNSZone dns.networking.miloapis.com v1alpha1 domainName, dnsZoneClassName
Contact notification.miloapis.com v1alpha1 givenName, familyName, email address
Note notes.miloapis.com v1alpha1 content, nextAction

Note: Contact uses spec.givenName/spec.familyName — the issue sample referenced firstName/lastName which does not match the actual milo type definition.

Note: Domain version is v1alpha (no trailing 1) — this is intentional. The network-services-operator has two separate API packages: api/v1alpha (Domain) and api/v1alpha1 (Connector, ConnectorAdvertisement, ConnectorClass).

Closes #214

Test plan

  • Verify search returns Domain resources after deploy
  • Verify search returns DNSZone resources after deploy
  • Verify search returns Contact resources after deploy
  • Verify search returns Note resources after deploy
  • Confirm no regressions on existing User search results

Deploys search index policies for four additional resource types so they
appear in search.miloapis.com results alongside existing User resources.

- Domain (networking.datumapis.com/v1alpha): indexes domainName, apex,
  nameservers, and registrar/registry names
- DNSZone (dns.networking.miloapis.com/v1alpha1): indexes domainName
  and dnsZoneClassName
- Contact (notification.miloapis.com/v1alpha1): indexes givenName,
  familyName, and email address
- Note (notes.miloapis.com/v1alpha1): indexes content and nextAction

Contact uses spec.givenName/spec.familyName per the actual milo type
(not firstName/lastName as referenced in the issue).
@kevwilliams kevwilliams requested a review from a team as a code owner April 13, 2026 19:09
@kevwilliams kevwilliams requested a review from gaghan430 April 13, 2026 19:09
@kevwilliams kevwilliams self-assigned this Apr 13, 2026
@kevwilliams
Copy link
Copy Markdown
Contributor Author

I wasn't 100% sure on all the fields but took a swing at it. Let me know what you think @scotwells

@kevwilliams kevwilliams requested a review from scotwells April 13, 2026 19:12
Copy link
Copy Markdown
Collaborator

@scotwells scotwells left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor feedback.

Comment thread config/services/search.miloapis.com/dnszone-resourceindexpolicy.yaml Outdated
Comment thread config/services/search.miloapis.com/dnszone-resourceindexpolicy.yaml Outdated
Comment thread config/services/search.miloapis.com/note-resourceindexpolicy.yaml Outdated
- Remove conditions blocks (resources always have a name)
- Add display-name and description annotation fields to all policies
- Drop spec.dnsZoneClassName from DNSZone policy (all zones use same class)
- Remove Note ResourceIndexPolicy entirely
@kevwilliams kevwilliams requested a review from scotwells April 13, 2026 19:43
Comment thread config/services/search.miloapis.com/domain-resourceindexpolicy.yaml Outdated
Remove status fields (nameservers, registrar, registry, apex) from
Domain policy and drop metadata.namespace from all policies — users
search by name, display name, description, and resource-specific
identifiers like domainName or email, not system-populated metadata.
@kevwilliams kevwilliams merged commit 0f86dac into main Apr 13, 2026
9 checks passed
@kevwilliams kevwilliams deleted the feat/search-resource-index-policies branch April 13, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: deploy ResourceIndexPolicy resources for Domains, DNS Zones, Contacts, and Notes

2 participants