Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsrecord condition only propagate owned records status #597

Merged
merged 1 commit into from
May 1, 2024

Conversation

philbrookes
Copy link
Contributor

All listed records were propagating to all dns policies.

This PR does 2 things:

  • rename ProbeConditions to RecordConditions
  • only propagates owned DNS Record conditions to the policy.

@philbrookes philbrookes requested a review from a team as a code owner May 1, 2024 07:32
@philbrookes philbrookes force-pushed the dns-policy-status-propagation branch 4 times, most recently from d98bd7d to d45b53f Compare May 1, 2024 07:37
@philbrookes philbrookes force-pushed the dns-policy-status-propagation branch from d45b53f to e3a358b Compare May 1, 2024 08:22
@@ -133,7 +133,7 @@ type DNSPolicyStatus struct {
HealthCheck *HealthCheckStatus `json:"healthCheck,omitempty"`

// +optional
ProbeConditions map[string][]metav1.Condition `json:"probeConditions,omitempty"`
RecordConditions map[string][]metav1.Condition `json:"recordConditions,omitempty"`
Copy link
Member

@mikenairn mikenairn May 1, 2024

Choose a reason for hiding this comment

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

Makes more sense than probeConditions. I do wonder how we intend to do this for other policies though, i had expected a more policy generic way of reporting status about policy sub resources.

if reference.Controller != nil && *reference.Controller && reference.Name == dnsPolicy.Name && reference.UID == dnsPolicy.UID {
controlledRecords.Items = append(controlledRecords.Items, record)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

What's the significance of it being a controller reference or not? This also differs from how we find related sub resources elsewhere, wondering which approach is more desirable, not sure if we use the owner ref in other polices or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just copied this logic from here, happy to change it, if there's a better pattern, this does seem to work for me though.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, i think we should come back to this. We can go with as is for now.

@maleck13 maleck13 merged commit ade95c0 into Kuadrant:main May 1, 2024
13 checks passed
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.

3 participants