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

Git PipelineResource errs when HOME != /tekton/home & UID is non-zero #2575

Merged
merged 1 commit into from May 13, 2020
Merged

Git PipelineResource errs when HOME != /tekton/home & UID is non-zero #2575

merged 1 commit into from May 13, 2020

Conversation

ghost
Copy link

@ghost ghost commented May 7, 2020

Fixes #2523

Changes

When the disable-home-env-overwrite flag is "true"...

Currently the git pipelineresource errors out if a securityContext
is set on a TaskRun. This happens because it will attempt to lock
$HOME/.gitconfig. If UID is non-zero and HOME is not set then it
tries to lock //.gitconfig which is in a root-owned directory.

This commit sets an explicit home directory of /tekton/home for the git
pipelineresource. This volume mount always exists, even if the user
has set the disable-home-env-overwrite flag to "true", and it's always
world-writeable since it's an emptyDir with no permissions set on it.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 7, 2020
@afrittoli afrittoli added the kind/bug Categorizes issue or PR as related to a bug. label May 8, 2020
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/meow

@tekton-robot
Copy link
Collaborator

@vdemeester: cat image

In response to this:

/meow

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.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 12, 2020
@vdemeester
Copy link
Member

ah needs a rebase 🙏

When the disable-home-env-overwrite flag is "true"...

Currently the git pipelineresource errors out if a securityContext
is set on a TaskRun. This happens because it will attempt to lock
$HOME/.gitconfig. If UID is non-zero and HOME is not set then it
tries to lock `//.gitconfig` which is in a root-owned directory.

This commit sets an explicit home directory of /tekton/home for the git
pipelineresource. This volume mount always exists, even if the user
has set the disable-home-env-overwrite flag to "true", and it's always
world-writeable since it's an emptyDir with no permissions set on it.
@ghost
Copy link
Author

ghost commented May 12, 2020

Cheers, rebased!

@dlorenc
Copy link
Contributor

dlorenc commented May 13, 2020

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 13, 2020
@tekton-robot tekton-robot merged commit 4d62948 into tektoncd:master May 13, 2020
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. kind/bug Categorizes issue or PR as related to a bug. 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.

Git PipelineResource fails when disable-home-env-overwrite=true and UID is non-zero
4 participants