-
Notifications
You must be signed in to change notification settings - Fork 232
Bug 1449908 - Group replica sets by owner reference #1553
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
Bug 1449908 - Group replica sets by owner reference #1553
Conversation
@@ -1195,13 +1197,13 @@ function OverviewController($scope, | |||
group: "extensions", | |||
resource: "deployments" | |||
}, context, function(deploymentData) { | |||
overview.deployments = deploymentData.by('metadata.name'); | |||
overview.deploymentsByUID = deploymentData.by('metadata.uid'); |
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.
this isnt new, but were we not sorting deployments before? how is it being ordered when you are looking at the by Resource Type view?
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.
Looks like an oversight and they weren't sorted.
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.
can you open an issue for this so we dont lose track of it
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.
Opened #1555
groupByControllerUID: function(apiObjects) { | ||
return _.groupBy(apiObjects, function(apiObject) { | ||
var ownerRefs = getOwnerReferences(apiObject); | ||
var controllerRef = _.find(ownerRefs, { controller: true }); |
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.
is it possible (in theory) for more than one controller to claim ownership, if that were the case you would want the item to appear under each group and not just the first one you find. Would be curious if the API prevents you from having more than one ownerRef with controller true. Could try manually adding an ownerRef on a pod that points to a random controller that exists.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1449908 Use owner references to decide if a replica set is owned by a deployment. Change maps to use deployment UID instead of deployment name. This avoids problems when a deployment is deleted and another is created with the same name.
12aab5d
to
f4abfc2
Compare
@jwforres updated |
[merge] |
Evaluated for origin web console merge up to f4abfc2 |
Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/1378/) (Base Commit: 6f33bb4) |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1449908
Use owner references to decide if a replica set is owned by a deployment. Change maps to use deployment UID instead of deployment name. This avoids problems when a deployment is deleted and another is created with the same name.