Repository navigation
CLI: add support for deployments in oc status - #18439
Conversation
| ref := getRef(d) | ||
| glog.V(4).Infof("Examining %s", getKindName(ref)) | ||
| dNode := appsgraph.EnsureDeploymentNode(p.g, d) | ||
| dNode := kubegraph.EnsureDeploymentNode(p.g, d) |
There was a problem hiding this comment.
if you wonder why, I moved 'Deployments' from appsgraph which seems to hold only apps.openshift.io resources to kubegraph as Deployments are upstream.
There was a problem hiding this comment.
Would you mind moving DaemonSets as well, it's the function before this one?
There was a problem hiding this comment.
Same for ReplicaSets a few lines below.
There was a problem hiding this comment.
interesting, I thought I moved replica sets already... seems like they are not used/loaded anywhere
There was a problem hiding this comment.
done. moved both to kube nodes
| func describeDeploymentStatus(rs *kapisext.ReplicaSet, revision int64, first bool, restartCount int32) string { | ||
| timeAt := strings.ToLower(formatRelativeTime(rs.CreationTimestamp.Time)) | ||
| replicaSetRevision, _ := deployutil.Revision(rs) | ||
| if replicaSetRevision == revision { |
There was a problem hiding this comment.
@spadgett since you did the console pages for deployments
| // ScalingEdgeKind goes from HorizontalPodAutoscaler to scaled objects indicating that the HPA scales the object | ||
| ScalingEdgeKind = "Scaling" | ||
| // TriggersDeploymentEdgeKind points from DeploymentConfigs to ImageStreamTags that trigger the deployment | ||
| TriggersDeploymentEdgeKind = "TriggersDeployment" |
There was a problem hiding this comment.
this was duplicated from appsgraph because of import cycles... we should probably move this into some common package
There was a problem hiding this comment.
follow up, don't want to pollute this PR
| } | ||
|
|
||
| // AddTriggerEdges creates edges that point to named Docker image repositories for each image used in the deployment. | ||
| func AddTriggerEdges(g osgraph.MutableUniqueGraph, node *kubegraph.DeploymentNode) *kubegraph.DeploymentNode { |
There was a problem hiding this comment.
we should rework this to make it usable for StatefulSets and DaemonSets?
There was a problem hiding this comment.
done, this now works for statefulsets as well
|
@smarterclayton ready for review :-) |
soltysh
left a comment
There was a problem hiding this comment.
A few suggestions, but this lgtm
|
|
||
| o.describer = &describe.ProjectStatusDescriber{ | ||
| K: kclientset, | ||
| KubeClient: kclientset, |
| ref := getRef(d) | ||
| glog.V(4).Infof("Examining %s", getKindName(ref)) | ||
| dNode := appsgraph.EnsureDeploymentNode(p.g, d) | ||
| dNode := kubegraph.EnsureDeploymentNode(p.g, d) |
There was a problem hiding this comment.
Would you mind moving DaemonSets as well, it's the function before this one?
| ref := getRef(d) | ||
| glog.V(4).Infof("Examining %s", getKindName(ref)) | ||
| dNode := appsgraph.EnsureDeploymentNode(p.g, d) | ||
| dNode := kubegraph.EnsureDeploymentNode(p.g, d) |
There was a problem hiding this comment.
Same for ReplicaSets a few lines below.
b035d04 to
86a8bc9
Compare
soltysh
left a comment
There was a problem hiding this comment.
lgtm, but would you mind removing the wip from the 2nd commit title ;) ?
| func describeStatefulSetInServiceGroup(f formatter, node *kubegraph.StatefulSetNode) []string { | ||
| func describeDeploymentInServiceGroup(f formatter, deploy graphview.Deployment, restartFn func(node *kubegraph.ReplicaSetNode) int32) []string { | ||
| local := namespacedFormatter{currentNamespace: deploy.Deployment.Deployment.Namespace} | ||
| // TODO: Figure out what this is |
|
/retest |
c587158 to
02412d4
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mfojtik, soltysh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
Automatic merge from submit-queue. |
@smarterclayton this is a long overdue...
current state:
TODO: