Skip to content

Conversation

@thockin
Copy link
Member

@thockin thockin commented Dec 19, 2019

This adds a --add-user flag to write UID and GID to /etc/passwd, and then adds a test for --ssh. Hopefully this can be a blueprint for other test cases.

Fixes #176

Fixes #195

Fixes #215

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 19, 2019
@k8s-ci-robot k8s-ci-robot requested a review from stp-ip December 19, 2019 00:42
@thockin thockin force-pushed the e2e_ssh branch 3 times, most recently from f3e9c63 to efa31fa Compare December 30, 2019 23:34
@thockin thockin changed the title WIP: e2e for SSH Add e2e for SSH Jan 4, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 4, 2020
@thockin thockin changed the title Add e2e for SSH Support ssh as arbitrary users, add e2e for SSH Jan 4, 2020
@thockin
Copy link
Member Author

thockin commented Jan 4, 2020

PTAL

@thockin
Copy link
Member Author

thockin commented Jan 6, 2020

I want to cut a release today/tomorrow and I'd like this in, if you can find 10 minutes to review. Hopefully easy.

# manage permissions.
VOLUME /dot_ssh

# Callers can SSh as user "test"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: SSH

Copy link
Member

@stp-ip stp-ip left a comment

Choose a reason for hiding this comment

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

/lgtm

Just the nit above seems a thing to fix.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 7, 2020
@stp-ip
Copy link
Member

stp-ip commented Jan 7, 2020

Small nit as suggested by @erbesharat:
Using os.Current() instead of 3 os.Getuid(), os.Getgid() and os.Getenv() should reduce the footprint of the syscalls.

This requires having a docker image for git-over-ssh.
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 7, 2020
@thockin
Copy link
Member Author

thockin commented Jan 7, 2020

These calls happen exactly once (and on linux, they should be a vsyscall anyway, if it is supported).

@thockin thockin added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 7, 2020
@thockin thockin added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 7, 2020
@stp-ip
Copy link
Member

stp-ip commented Jan 7, 2020

Agreed not necessary, just an interesting suggestion nonetheless.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot merged commit 705be50 into kubernetes:master Jan 7, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stp-ip

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

@thockin thockin deleted the e2e_ssh branch October 31, 2020 06:09
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

SSH private key file permissions are too open Need a test for SSH mode git-sync doesn't work under arbitrary user

4 participants