kubeflow / fairing

Python SDK for building, training, and deploying ML models
Apache License 2.0
337 stars 144 forks source link

add sub_path option to volume_mounts #528

Closed Minkyu-Choi closed 4 years ago

Minkyu-Choi commented 4 years ago

What this PR does / why we need it:

When kubeflow users using cluster builder in an air-gapped environment, users may want to add specific configuration for their build environment(kaniko executor pod). If there's internal python repository inside of air-gapped environment, users should add extra pip.conf file under /etc path using volume_mounts resource mutator.

Currently there's no sub_path option for volume_mounts and this results replacing whole folder contents of /etc to one pip.conf file. So, this PR add sub_path option to volume_mounts to support mount a file to existing path.

If user omits sub_path option then it'll behave as-is since default value of sub_path is None. So, this PR doesn't break backward compatibility.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #None

Special notes for your reviewer:

Release note:

google-cla[bot] commented 4 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

kubeflow-bot commented 4 years ago

This change is Reviewable

k8s-ci-robot commented 4 years ago

Hi @Minkyu-Choi. Thanks for your PR.

I'm waiting for a kubeflow 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
Minkyu-Choi commented 4 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.

What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot I signed it!

xauthulei commented 4 years ago

/ok-to-test Thanks for your contribution @Minkyu-Choi

jinchihe commented 4 years ago

/lgtm /approve

@Minkyu-Choi Thanks!

k8s-ci-robot commented 4 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jinchihe

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: - ~~[OWNERS](https://github.com/kubeflow/fairing/blob/master/OWNERS)~~ [jinchihe] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment