-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add route label to LatestCreatedRevision
#7110
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
Changes from all commits
37fa1e9
b4a3bf0
9f347c2
246494c
35aa45e
05ee2c7
b7eec55
e4a1182
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,9 +53,22 @@ func (c *Reconciler) syncLabels(ctx context.Context, r *v1.Route) error { | |
| return err | ||
| } | ||
| revisions.Insert(tt.RevisionName) | ||
|
|
||
| // If the owner reference is a configuration, add it to the list of configurations | ||
| owner := metav1.GetControllerOf(rev) | ||
| if owner != nil && owner.Kind == "Configuration" { | ||
| configs.Insert(owner.Name) | ||
|
|
||
| // If we are tracking the latest revision, add the latest created revision as well | ||
| // so that there is a smooth transition when the new revision becomes ready. | ||
| if tt.LatestRevision != nil && *tt.LatestRevision { | ||
| config, err := c.configurationLister.Configurations(r.Namespace).Get(owner.Name) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| revisions.Insert(config.Status.LatestCreatedRevisionName) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vagababov @markusthoemmes it is tempting to also label the LCR with the LRR in this case so that the KPA gets a hint about how big to make the LCR before it is receiving traffic 🤔
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (not for this PR) |
||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.