Skip to content

Commit 0f86dac

Browse files
authored
feat: Add ResourceIndexPolicy for Domain, DNSZone, Contact, and Note (#215)
## 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
2 parents dfd3674 + ebd5e8c commit 0f86dac

4 files changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: search.miloapis.com/v1alpha1
2+
kind: ResourceIndexPolicy
3+
metadata:
4+
name: contact-resource-index-policy
5+
spec:
6+
fields:
7+
- path: .metadata.name
8+
searchable: true
9+
- path: .metadata.annotations["kubernetes.io/display-name"]
10+
searchable: true
11+
- path: .metadata.annotations["kubernetes.io/description"]
12+
searchable: true
13+
- path: .spec.givenName
14+
searchable: true
15+
- path: .spec.familyName
16+
searchable: true
17+
- path: .spec.email
18+
searchable: true
19+
targetResource:
20+
group: notification.miloapis.com
21+
kind: Contact
22+
version: v1alpha1
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: search.miloapis.com/v1alpha1
2+
kind: ResourceIndexPolicy
3+
metadata:
4+
name: dnszone-resource-index-policy
5+
spec:
6+
fields:
7+
- path: .metadata.name
8+
searchable: true
9+
- path: .metadata.annotations["kubernetes.io/display-name"]
10+
searchable: true
11+
- path: .metadata.annotations["kubernetes.io/description"]
12+
searchable: true
13+
- path: .spec.domainName
14+
searchable: true
15+
targetResource:
16+
group: dns.networking.miloapis.com
17+
kind: DNSZone
18+
version: v1alpha1
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: search.miloapis.com/v1alpha1
2+
kind: ResourceIndexPolicy
3+
metadata:
4+
name: domain-resource-index-policy
5+
spec:
6+
fields:
7+
- path: .metadata.name
8+
searchable: true
9+
- path: .metadata.annotations["kubernetes.io/display-name"]
10+
searchable: true
11+
- path: .metadata.annotations["kubernetes.io/description"]
12+
searchable: true
13+
- path: .spec.domainName
14+
searchable: true
15+
targetResource:
16+
group: networking.datumapis.com
17+
kind: Domain
18+
version: v1alpha

config/services/search.miloapis.com/kustomization.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ kind: Component
33

44
resources:
55
- user-resourceindexpolicy.yaml
6+
- domain-resourceindexpolicy.yaml
7+
- dnszone-resourceindexpolicy.yaml
8+
- contact-resourceindexpolicy.yaml
69

710
# Use explicit sorting options so we can guarantee order in which resources are
811
# applied.

0 commit comments

Comments
 (0)