kustomize icon indicating copy to clipboard operation
kustomize copied to clipboard

Load and calculate Destination of files for `kustomize localize`

Open annasong20 opened this issue 3 years ago • 9 comments

Implement locLoader, which loads and calculates destination paths of files for new command kustomize localize.

annasong20 avatar May 25 '22 00:05 annasong20

Hi @annasong20. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

k8s-ci-robot avatar May 25 '22 00:05 k8s-ci-robot

@annasong20: This PR has multiple commits, and the default merge method is: merge. You can request commits to be squashed using the label: tide/merge-method-squash

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.

k8s-ci-robot avatar May 25 '22 00:05 k8s-ci-robot

/label tide/merge-method-squash

annasong20 avatar May 25 '22 01:05 annasong20

/ok-to-test

natasha41575 avatar May 25 '22 23:05 natasha41575

/cc @yuwenma /uncc @phanimarupaka /uncc @mortent

@yuwenma Would you be able to take a look as well? It will be helpful to have another pair of eyes on these PRs

natasha41575 avatar Aug 04 '22 17:08 natasha41575

Partially inspired by https://github.com/kubernetes-sigs/kustomize/pull/4652#discussion_r940546360, I removed the logic that calculates the destination path from LocLoader. This is because it violates a separation of concerns. I realized that as a result of that logic,

  1. LocLoader couldn't be used to Load kustomization files using localize constraints
  2. the code was more difficult to read

I will put this logic into the next layer, Localizer. Hopefully this change improves readability!!

annasong20 avatar Aug 10 '22 01:08 annasong20

Rebased

annasong20 avatar Aug 11 '22 19:08 annasong20

Please rebase to rerun the CI

natasha41575 avatar Aug 16 '22 16:08 natasha41575

/lgtm /approve

natasha41575 avatar Aug 19 '22 21:08 natasha41575

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: annasong20, natasha41575

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

k8s-ci-robot avatar Aug 19 '22 21:08 k8s-ci-robot

/test all

natasha41575 avatar Aug 19 '22 21:08 natasha41575