Skip to content

Commit

Permalink
Merge pull request #18848 from juanvallejo/jvallejo/group-svc-ds-oc-s…
Browse files Browse the repository at this point in the history
…tatus

Automatic merge from submit-queue (batch tested with PRs 18811, 18805, 18848).

nest daemonsets under their services

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1540560#c10

cc @deads2k @soltysh
  • Loading branch information
openshift-merge-robot authored Mar 8, 2018
2 parents 28384d0 + bf33eca commit ceac27f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/oc/cli/describe/projectstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ func (d *ProjectStatusDescriber) Describe(namespace, name string) (string, error
})...)
}

for _, node := range service.DaemonSets {
printLines(out, indent, 1, describeDaemonSetInServiceGroup(local, node)...)
}

rsNode:
for _, rsNode := range service.FulfillingRSs {
for _, coveredD := range service.FulfillingDeployments {
Expand Down
11 changes: 11 additions & 0 deletions pkg/oc/graph/genericgraph/graphview/service_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type ServiceGroup struct {
DeploymentConfigPipelines []DeploymentConfigPipeline
ReplicationControllers []ReplicationController
ReplicaSets []ReplicaSet
DaemonSets []DaemonSet
Deployments []Deployment
StatefulSets []StatefulSet

Expand All @@ -32,6 +33,7 @@ type ServiceGroup struct {
FulfillingRCs []*kubegraph.ReplicationControllerNode
FulfillingRSs []*kubegraph.ReplicaSetNode
FulfillingPods []*kubegraph.PodNode
FulfillingDSs []*kubegraph.DaemonSetNode

ExposingRoutes []*routegraph.RouteNode
}
Expand Down Expand Up @@ -79,6 +81,8 @@ func NewServiceGroup(g osgraph.Graph, serviceNode *kubegraph.ServiceNode) (Servi
service.FulfillingStatefulSets = append(service.FulfillingStatefulSets, castContainer)
case *kubegraph.DeploymentNode:
service.FulfillingDeployments = append(service.FulfillingDeployments, castContainer)
case *kubegraph.DaemonSetNode:
service.FulfillingDSs = append(service.FulfillingDSs, castContainer)
default:
utilruntime.HandleError(fmt.Errorf("unrecognized container: %v (%T)", castContainer, castContainer))
}
Expand Down Expand Up @@ -117,6 +121,13 @@ func NewServiceGroup(g osgraph.Graph, serviceNode *kubegraph.ServiceNode) (Servi
service.ReplicaSets = append(service.ReplicaSets, rsView)
}

for _, fulfillingDS := range service.FulfillingDSs {
dsView, dsCovers := NewDaemonSet(g, fulfillingDS)

covered.Insert(dsCovers.List()...)
service.DaemonSets = append(service.DaemonSets, dsView)
}

for _, fulfillingStatefulSet := range service.FulfillingStatefulSets {
view, covers := NewStatefulSet(g, fulfillingStatefulSet)

Expand Down

0 comments on commit ceac27f

Please sign in to comment.