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

Add service account info into service describe #472

Merged
merged 1 commit into from
Nov 5, 2019

Conversation

daisy-ycguo
Copy link
Member

Fixes #413

Proposed Changes

  • Add service account info to service describe if present.

Release Note:

  • 🧽 Add service account info to service describe if present.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 4, 2019
@daisy-ycguo daisy-ycguo changed the title Add serviceaccount info into service describe Add service account info into service describe Nov 4, 2019
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 4, 2019
@daisy-ycguo
Copy link
Member Author

/retest

@@ -495,7 +496,7 @@ func validateServiceOutput(t *testing.T, service string, output string) {
assert.Assert(t, util.ContainsAll(output, "Ready", "RoutesReady", "OK", "TYPE", "AGE", "REASON"))
}

func createTestService(name string, revisionNames []string, conditions duckv1.Conditions) v1alpha1.Service {
func createTestService(name string, revisionNames []string, serviceaccount string, conditions duckv1.Conditions) v1alpha1.Service {
Copy link
Collaborator

@navidshaikh navidshaikh Nov 4, 2019

Choose a reason for hiding this comment

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

Can we define createTestServiceWithServiceAccount function and have it called createTestService + code for adding ServiceAccount ?
Most of the invocation to createTestService are with empty strings (serviceAccount) otherwise.

Copy link
Collaborator

Choose a reason for hiding this comment

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

*serviceAccount

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed. Thanks.

Copy link
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

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

Left a couple feedback.

Thanks for the contribution.

@@ -546,6 +547,20 @@ func createTestService(name string, revisionNames []string, conditions duckv1.Co
}
service.Status.Traffic = trafficTargets
}

if len(serviceaccount) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This check reads odd... if serviceaccount is suppose to be the serviceAccountName as it's set in the PodSpec can we call it that and also check for != "" instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed. Thanks.

@knative-prow-robot knative-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 5, 2019
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/kn/commands/service/describe.go 83.6% 83.7% 0.1

@daisy-ycguo
Copy link
Member Author

@maximilien @navidshaikh It's ready for a second review. Thank you.

Copy link
Collaborator

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold
/assign @rhuss

@knative-prow-robot knative-prow-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Nov 5, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: daisy-ycguo, navidshaikh

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 5, 2019
@rhuss
Copy link
Contributor

rhuss commented Nov 5, 2019

/hold cancel
/lgtm

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 5, 2019
@rhuss rhuss removed the request for review from sixolet November 5, 2019 10:39
@knative-prow-robot knative-prow-robot merged commit c5b3f7a into knative:master Nov 5, 2019
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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add service account info in service describe
7 participants