Skip to content
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

group services w same selectors in oc status #18953

Conversation

juanvallejo
Copy link
Contributor

@juanvallejo juanvallejo commented Mar 12, 2018

Fixes #7503

Before

$ oc status
In project My Project (myproject) on server https://127.0.0.1:8443

svc/foo - foo.com
  dc/myapp deploys istag/myapp:latest <-
    bc/myapp source builds https://github.com/juanvallejo/myapp on openshift/nodejs:8
    deployment #1 deployed 7 minutes ago - 1 pod

svc/bar - 172.30.75.107:8080
  dc/myapp deploys istag/myapp:latest <-
    bc/myapp source builds https://github.com/juanvallejo/myapp on openshift/nodejs:8
    deployment #1 deployed 7 minutes ago - 1 pod
...

After

$ oc status
In project My Project (myproject) on server https://127.0.0.1:8443

svc/bar - 172.30.75.107:8080
svc/foo - foo.com
  dc/myapp deploys istag/myapp:latest <-
    bc/myapp source builds https://github.com/juanvallejo/myapp on openshift/nodejs:8
    deployment #1 deployed 7 hours ago - 1 pod
...

cc @soltysh @deads2k

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 12, 2018
@juanvallejo juanvallejo force-pushed the jvallejo/group-services-w-same-selector branch 2 times, most recently from 5e8cd42 to eb32248 Compare March 12, 2018 22:05
@juanvallejo
Copy link
Contributor Author

/test gcp
/test extended_networking_minimal

@juanvallejo
Copy link
Contributor Author

cc @soltysh

@juanvallejo
Copy link
Contributor Author

/retest

@juanvallejo
Copy link
Contributor Author

/test gcp

1 similar comment
@juanvallejo
Copy link
Contributor Author

/test gcp

@@ -164,6 +164,37 @@ func (d *ProjectStatusDescriber) MakeGraph(namespace string) (osgraph.Graph, set
return g, forbiddenResources, nil
}

func selectorEquals(A, B map[string]string) bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you looked at k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/labels to compare selectors and labels? I think you could reuse some of the logic from there.

@juanvallejo juanvallejo force-pushed the jvallejo/group-services-w-same-selector branch from eb32248 to 873662b Compare March 16, 2018 19:49
@juanvallejo
Copy link
Contributor Author

@soltysh thanks, updated to use k8s.io/apimachinery/pkg/labels

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: juanvallejo, soltysh

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 19, 2018
@soltysh
Copy link
Contributor

soltysh commented Mar 19, 2018

/retest

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@juanvallejo
Copy link
Contributor Author

/test extended_conformance_install

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 18953, 18992).

@openshift-merge-robot openshift-merge-robot merged commit 344a232 into openshift:master Mar 19, 2018
@juanvallejo juanvallejo deleted the jvallejo/group-services-w-same-selector branch March 19, 2018 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants