-
Notifications
You must be signed in to change notification settings - Fork 32
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
dnsrecord condition only propagate owned records status #597
Conversation
d98bd7d
to
d45b53f
Compare
d45b53f
to
e3a358b
Compare
@@ -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"` |
There was a problem hiding this comment.
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) | ||
} | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
All listed records were propagating to all dns policies.
This PR does 2 things: