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

Allow disabling implicit HOME overwrite #2044

Merged
merged 1 commit into from Feb 26, 2020
Merged

Allow disabling implicit HOME overwrite #2044

merged 1 commit into from Feb 26, 2020

Conversation

ghost
Copy link

@ghost ghost commented Feb 13, 2020

Changes

Tekton currently overwrites the $HOME variables in task containers. This behaviour is problematic when an image explicitly sets the HOME env var and expects it to be set to that value upon running.

This PR introduces a feature-flags ConfigMap with a single flag - disable-home-env-overwrite - that, when set to "true" will prevent Tekton from overriding the $HOME variable in Task containers. This behaviour will be kept for one release which must include a deprecation warning that the behaviour will be changing soon. In the release after that the flag will be flipped so that the default behaviour becomes for Tekton to NOT override the $HOME variable.

Contributes to issues #2013 and #1836

Submitter Checklist

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

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

Tekton currently overwrites the $HOME variables in Step containers. This behaviour is problematic when an image explicitly sets the HOME env var and expects it to be set to that value upon running. You can now disable this behaviour in Tekton by using the feature-flags ConfigMap. See docs/install.md for further details on disabling this behaviour.

@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 13, 2020
@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Feb 13, 2020
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 13, 2020
@ghost ghost changed the title WIP allow user to disable tektons implicit HOME override with configmap Allow user to disable tektons implicit HOME override with configmap Feb 19, 2020
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 19, 2020
@ghost ghost changed the title Allow user to disable tektons implicit HOME override with configmap Allow disabling implicit HOME overwrite Feb 19, 2020
@ghost
Copy link
Author

ghost commented Feb 19, 2020

okey dokey, I think this PR is ready for review now.

@ghost
Copy link
Author

ghost commented Feb 20, 2020

/test pull-tekton-pipeline-integration-tests

1 similar comment
@ghost
Copy link
Author

ghost commented Feb 20, 2020

/test pull-tekton-pipeline-integration-tests

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
@sbwsg this needs a rebase 😝

@tekton-robot
Copy link
Collaborator

@vdemeester: cat image

In response to this:

/meow
@sbwsg this needs a rebase 😝

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 Feb 24, 2020
@vdemeester vdemeester added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 25, 2020
Tekton currently overwrites a Task container's HOME environment variable
so that it always points to /tekton/home. This behaviour causes issues
for any image that expects this variable to be set to some predefined
value.

This PR introduces a feature flag configmap and a flag to disable
Tekton's HOME behaviour. The default behaviour remains the same but in
an upcoming release we will change this default so that Tekton no longer
overwrites the HOME variable.
@skaegi
Copy link
Contributor

skaegi commented Feb 26, 2020

/lgtm
Just re-validated...

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2020
@skaegi skaegi removed their assignment Feb 26, 2020
@tekton-robot tekton-robot merged commit 6877e66 into tektoncd:master Feb 26, 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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

None yet

4 participants