-
Notifications
You must be signed in to change notification settings - Fork 15
Description
We want 2 new entries in each registry entry:
- The runtime groupID, if present.
- The targets this ownerID wants present (remove the rootHost) only when groupID present.
For example, if a DNS Record with groupID: group1 has an endpoint of "host in CNAME 60 target1,target2". The resulting registry entry should be (alongside whatever current information is put into the registry) something like:
version=1;ownerID=sdfsdf;groupID=group1;targets=target1&&target2
In terms of implementation, before publish is called:
- https://github.com/Kuadrant/dns-operator/blob/main/internal/controller/dnsrecord_controller.go#L354
- https://github.com/Kuadrant/dns-operator/blob/main/internal/controller/remote_dnsrecord_controller.go#L211
We want something like
if groupID != "" {
e.labels[group] = groupID
e.labels[targets] = e.targets
} else {
// clean up logic
}unit test of usage: https://github.com/Kuadrant/dns-operator/blob/main/internal/external-dns/registry/txt_test.go#L190-L196
This will enable us to work out:
- Which groups own a particular endpoint
- Which groups own any particular target