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 --user flag for service create and update #679

Merged
merged 8 commits into from
Feb 28, 2020

Conversation

itsmurugappan
Copy link
Contributor

Fixes #678

Proposed Changes

  • Add run as user flag
  • add tests for create and update

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Feb 19, 2020
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@itsmurugappan: 0 warnings.

In response to this:

Fixes #678

Proposed Changes

  • Add run as user flag
  • add tests for create and update

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot
Copy link
Contributor

Hi @itsmurugappan. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 19, 2020
@dsimansk
Copy link
Contributor

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 19, 2020
Copy link
Member

@daisy-ycguo daisy-ycguo left a comment

Choose a reason for hiding this comment

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

Thank you for the PR.
It looks good to me except a small comment to the description.

pkg/kn/commands/service/configuration_edit_flags.go Outdated Show resolved Hide resolved
@navidshaikh
Copy link
Collaborator

How about just --user instead of --run-as-user ?

@itsmurugappan
Copy link
Contributor Author

itsmurugappan commented Feb 19, 2020

How about just --user instead of --run-as-user ?

@navidshaikh gave the same name used by k8 container spec. Can change to user if its more appropriate

@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 19, 2020
@itsmurugappan
Copy link
Contributor Author

How about just --user instead of --run-as-user ?

@daisy-ycguo @rhuss your thoughts on this ?

@itsmurugappan
Copy link
Contributor Author

/test pull-knative-client-integration-tests-latest-release

@navidshaikh
Copy link
Collaborator

gave the same name used by k8 container spec. Can change to user if its more appropriate

There are other parameters as well in SecurityContext which we might add in future (like group, privileged, etc). IMO --user flag conveys the message here that one wants to run this container with given user.
Are you also planning to add related property for --group? (may be in a next PR)

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 25, 2020
@itsmurugappan
Copy link
Contributor Author

gave the same name used by k8 container spec. Can change to user if its more appropriate

There are other parameters as well in SecurityContext which we might add in future (like group, privileged, etc). IMO --user flag conveys the message here that one wants to run this container with given user.
Are you also planning to add related property for --group? (may be in a next PR)

Makes sense. I will change accordingly.

@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/configuration_edit_flags.go 83.5% 83.9% 0.3
pkg/serving/config_changes.go 79.9% 79.9% 0.0

@itsmurugappan
Copy link
Contributor Author

/test pull-knative-client-integration-tests

@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 25, 2020
@navidshaikh navidshaikh changed the title add run as user flag #678 Add --user flag for service create and update Feb 28, 2020
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
/approve

Thank you!
Logged #691 for adding e2e tests for --user flag.

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 28, 2020
@navidshaikh
Copy link
Collaborator

/retest

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: itsmurugappan, 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 Feb 28, 2020
@knative-prow-robot knative-prow-robot merged commit 6617305 into knative:master Feb 28, 2020
@itsmurugappan itsmurugappan deleted the dev02 branch February 28, 2020 14:42
@itsmurugappan itsmurugappan restored the dev02 branch February 28, 2020 23:03
@itsmurugappan itsmurugappan deleted the dev02 branch February 28, 2020 23:04
coryrc pushed a commit to coryrc/client that referenced this pull request May 14, 2020
…ve#728)

Coverage completion marker is used in pre-submit workflow to find
most recent healthy post-submit coverage result as a basis for comparison.
We are adding the marker now regardless of unit test failure, to prevent
stale comparison baseline

knative#679
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a flag to set RunAsUser
7 participants