Skip to content

Conversation

@maksymvavilov
Copy link
Contributor

No description provided.

Boomatang and others added 9 commits December 4, 2025 09:29
When group is set on the operator runtime, the group is passed into the
txt that is inside provide for every DNSRecord managed by the operator.

Signed-off-by: Jim Fitzpatrick <jfitzpat@redhat.com>
Signed-off-by: Michael Nairn <mnairn@redhat.com>
Updates the local DNSRecord accessor to add the group label to all
endpoints if one is set in the record status.

* Add `GetGroup()` to `DNSRecordAccessor` interface
* Add group to logger
* Set status group in local record reconcile

ToDo:
* Fix health check adapter, need to manipulate record.spec.endpoints for
  the chain to work correctly
* Fix update of group, premature reconcile check currently prevents it
  from updating correctly on update.
* Add targets to labels
* Add tests

Signed-off-by: Michael Nairn <mnairn@redhat.com>
Signed-off-by: Michael Nairn <mnairn@redhat.com>
Move removeUnhealthyEndpoints call to `getEndpoints()` to get round an issue where the spec endpoints are being incorrectly modified and saved to the spec when saving the provider labels.

Follow on task required to fix this since we can't really have the spec being saved incorrectly in any situation.

Signed-off-by: Michael Nairn <mnairn@redhat.com>
Adapt the behaviour of Registry.AdjustEndpoints instead of DNSRecordAccessor.GetEndpoints().

Labelling appears to work better after endpoints have been adjusted so will try it this way instead.

Signed-off-by: Michael Nairn <mnairn@redhat.com>
Signed-off-by: Phil Brookes <pbrookes@redhat.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Signed-off-by: Phil Brookes <pbrookes@redhat.com>

Signed-off-by: Phil Brookes <pbrookes@redhat.com>

Signed-off-by: Phil Brookes <pbrookes@redhat.com>

Signed-off-by: Phil Brookes <pbrookes@redhat.com>

Signed-off-by: Phil Brookes <pbrookes@redhat.com>

Signed-off-by: Phil Brookes <pbrookes@redhat.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Signed-off-by: Maskym Vavilov <mvavilov@redhat.com>
@maksymvavilov maksymvavilov linked an issue Dec 4, 2025 that may be closed by this pull request
Copy link
Contributor

@philbrookes philbrookes left a comment

Choose a reason for hiding this comment

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

It'd be easier to read this if you opened the PR against my branch for now, until it merges.

2 small changes, plus the failing CI needs addressing (unless that's due to my branch?)

registryHost, hostExists := registryMap.Hosts[strings.Replace(ep.DNSName, "*", internal.TXTRegistryWildcardReplacement, 1)]
if hostExists {
// check if we have deleting group associated with this host
_, groupExists := registryHost.Groups[types.Group(groupName)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
_, groupExists := registryHost.Groups[types.Group(groupName)]
if _, groupExists := registryHost.Groups[types.Group(groupName)]; groupExists {
affectedEndpoints = append(affectedEndpoints, ep)
}

TXTRecordGroupKey = "groups"

GroupRecordTTL = 60
GroupRecordTTL = 15
Copy link
Contributor

Choose a reason for hiding this comment

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

better not to commit this.

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.

List endpoints affected by the removal of an active group

4 participants