-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Reconcile Ingress when label was different from desired #9719
Reconcile Ingress when label was different from desired #9719
Conversation
As per subject, this patch changes to reconcile Ingress when it was different from desired.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nak3 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
||
func ingressSemanticEquals(ctx context.Context, desiredIngress, ingress *netv1alpha1.Ingress) (bool, error) { | ||
logger := logging.FromContext(ctx) | ||
specDiff, err := kmp.SafeDiff(desiredIngress.Spec, ingress.Spec) |
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.
Any reason we're adding this vs. just adding the labels DeepEqual + copying the labels over?
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.
Thank you @markusthoemmes @julz
Yeah, I did this because of trying to align with other codes like
serving/pkg/reconciler/service/service.go
Line 195 in 4bfda35
func configSemanticEquals(ctx context.Context, desiredConfig, config *v1.Configuration) (bool, error) { |
serving/pkg/reconciler/service/service.go
Line 249 in 4bfda35
func routeSemanticEquals(ctx context.Context, desiredRoute, route *v1.Route) (bool, error) { |
But yes agree. The kmp.SafeDiff
seems redundant. I will just add the labels DeepEqual + copying.
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.
/lgtm
Codecov Report
@@ Coverage Diff @@
## master #9719 +/- ##
==========================================
+ Coverage 87.94% 87.97% +0.02%
==========================================
Files 177 177
Lines 8447 8449 +2
==========================================
+ Hits 7429 7433 +4
+ Misses 774 773 -1
+ Partials 244 243 -1
Continue to review full report at Codecov.
|
The following jobs failed:
Automatically retrying due to test flakiness... |
knative#9719) * Reconcile Ingress when label was different from desired As per subject, this patch changes to reconcile Ingress when it was different from desired.
Proposed Changes
As per subject, this patch changes to reconcile Ingress when
it was different from desired.
Release Note
/cc @markusthoemmes @mattmoor @tcnghia