-
Notifications
You must be signed in to change notification settings - Fork 231
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
update kyaml to v0.12 and cli-utils to latest #2523
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should add some e2e tests for it. For example, we can have something like:
Prepare 2 resources in one file. Run a function (can be written in starlark) to update the new path and index annotations.
Before:
# x.yaml
resourceFoo
---
resourceBar
After:
# y.yaml
resourceBar
---
resourceFoo
Do the same using the legacy annotations in another test. It should produce the same result.
Adding e2e tests revealed an issue; will investigate and fix. Thanks for the suggestion! |
b541c6d
to
fa0e5c7
Compare
ef7096a
to
f037b21
Compare
f037b21
to
60d2b11
Compare
56aea28
to
c92a9ad
Compare
c92a9ad
to
ac0ddde
Compare
@natasha41575 I will take a look at it today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. minor nits.
k8s.io/klog/v2 v2.10.0 | ||
k8s.io/kubectl v0.22.2 | ||
k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e | ||
sigs.k8s.io/cli-utils v0.26.1-0.20211020064957-d62b5c62002d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should switch to a released version of cli-utils before next kpt release.
e39aa30
to
8569bbf
Compare
8569bbf
to
18e0a8d
Compare
18e0a8d
to
301e3ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mortent Do you want to take another look given you requested changes earlier in #2523 (review)? |
* design document template (#2563) * updated maintainers * update to the front page * installation paragraph * design doc template * additional process detail * slight updates * update kyaml and cli-utils to latest (#2523) * Do not error while adding merge comment (#2564) * Remove check if repo is checked into git for update (#2569) * Remove check if repo is checked into git for update * Update tests * Update should accept empty path with version (#2572) * Update roadmap for Q4 (#2571) * Update roadmap for Q4 * Suggested changes * Update roadmap (#2574) * Update roadmap * Suggested changes * Update with suggested format * Organize better * update installation doc and Homebrew to use 1.0.0-beta.8 (#2578) * Update kpt book with depends-on annotation (#2565) * Update kpt book with depends-on annotation * Addressed comments * Add snippet for resource dependencies in chapter overview * fix: use KptFileKind variable instead of KptFileName for GVR (#2580) When specifying the Kptfile resource kind, some code were using the KptFileName variable instead of KptFileKind. Both variables currently contain the same value: "Kptfile", but this will be an issue in the future should the KptFileName and KptFileKind variables have different values. * Disable unwrapping to read fnconfig (#2582) * Disable wrapping to read fnconfig * Update index annotation * Update licenses (#2583) - Use go install with explicit tag to avoid modifying go mod - Add licenses to yaml files (new addlicense feature) - Add updated license-check to make all * Revert "update installation doc and Homebrew to use 1.0.0-beta.8 (#2578)" (#2584) This reverts commit 98f0299. * add tests to exercise modify path annotation (#2586) * Update design doc review process (#2594) * Update beta 9 (#2597) * Add missing json annotation to KptFile (#2598) * Implement metrics annotation (#2588) * Implement metrics annotation * Changes * Suggested changes * Suggested changes * Attributor * Design proposal: kpt live -- Inventory to ResourceGroup (#2576) * DD for kpt live apply from STDIN * resolve comments * Update doc with rg fn interaction Co-authored-by: Phani Teja Marupaka <[email protected]> * Add cnrm annotation to merge3 (#2605) * docs: Specify origin in git push command in 3.8 (#2608) Issues: #2596 * upgrade to kyaml 0.13.0+ (#2603) * upgrade to kyaml 0.13.0+ * use the latest kyaml * --image flag typo fix (#2601) Fix typo in `kpt fn eval`'s --image flag description * Simplify and speed up "kpt live" e2e tests (#2613) * Simplify and speed up live e2e tests * Addressed comments * Adding OCI to Kptfile schema Adding OCI to error utils Adding OCI argument parsing to kpt pkg get Adding get/fetch validation Adding pull and untar to support kpt get Making change in md file go fmt and fixing tests * Adds `oci://` to disambiguate `kpt pkg get` argument Factoring upstream fetcher out of switch cases go fmt fixes Ignore scopelint in table tests Adding support for `kpt pkg update` Fix fmt and tests Path must be added to returned absPath Removing git repo error message check * this startup check probably doesn't make sense any more? the pkg update logic doesn't rely on the state of the local git repo to merge Adding OCI support to kpt pkg diff * Mainly involves using upstream.Fetcher methods Adding prototype kpt pkg pull command Based on design and latest conversations Adding kpt pkg push command Minor fixes * Fixing a direct reference to Git field * Adding output to pkg push command Rename upstream pkg to remote Refactoring remote names * Rename Fether to Upstream * Split Upstream and Origin implementations Removing redundant Origin suffix from names Adding compile-time interface assertion go fix formatting Adding missing err checks Fixing package reference case Fixing case sensitive package * Fixing go.sum after rebase * Adjusting merge of update * Adding support for directory in oci subpackage upstream * Fix formatting * Remove check if repo is checked into git for update (#2569) * Remove check if repo is checked into git for update * Update tests * Updating go.sum * Adding previous round of PR feedback * Updating scheme * Adding TODO(oci-support) marker to kpt site content Co-authored-by: Mike Borozdin <[email protected]> Co-authored-by: Natasha Sarkar <[email protected]> Co-authored-by: phani <[email protected]> Co-authored-by: Mengqi Yu <[email protected]> Co-authored-by: Morten Torkildsen <[email protected]> Co-authored-by: Ramon Quitales <[email protected]> Co-authored-by: Karl Isenberg <[email protected]> Co-authored-by: Martin Maly <[email protected]> Co-authored-by: Yuwen Ma <[email protected]> Co-authored-by: Phani Teja Marupaka <[email protected]> Co-authored-by: sdowell <[email protected]> Co-authored-by: Ben Congdon <[email protected]> Co-authored-by: Louis DeJardin <[email protected]>
* design document template (#2563) * updated maintainers * update to the front page * installation paragraph * design doc template * additional process detail * slight updates * update kyaml and cli-utils to latest (#2523) * Do not error while adding merge comment (#2564) * Remove check if repo is checked into git for update (#2569) * Remove check if repo is checked into git for update * Update tests * Update should accept empty path with version (#2572) * Update roadmap for Q4 (#2571) * Update roadmap for Q4 * Suggested changes * Update roadmap (#2574) * Update roadmap * Suggested changes * Update with suggested format * Organize better * update installation doc and Homebrew to use 1.0.0-beta.8 (#2578) * Update kpt book with depends-on annotation (#2565) * Update kpt book with depends-on annotation * Addressed comments * Add snippet for resource dependencies in chapter overview * fix: use KptFileKind variable instead of KptFileName for GVR (#2580) When specifying the Kptfile resource kind, some code were using the KptFileName variable instead of KptFileKind. Both variables currently contain the same value: "Kptfile", but this will be an issue in the future should the KptFileName and KptFileKind variables have different values. * Disable unwrapping to read fnconfig (#2582) * Disable wrapping to read fnconfig * Update index annotation * Update licenses (#2583) - Use go install with explicit tag to avoid modifying go mod - Add licenses to yaml files (new addlicense feature) - Add updated license-check to make all * Revert "update installation doc and Homebrew to use 1.0.0-beta.8 (#2578)" (#2584) This reverts commit 98f0299. * add tests to exercise modify path annotation (#2586) * Update design doc review process (#2594) * Update beta 9 (#2597) * Add missing json annotation to KptFile (#2598) * Implement metrics annotation (#2588) * Implement metrics annotation * Changes * Suggested changes * Suggested changes * Attributor * Design proposal: kpt live -- Inventory to ResourceGroup (#2576) * DD for kpt live apply from STDIN * resolve comments * Update doc with rg fn interaction Co-authored-by: Phani Teja Marupaka <[email protected]> * Add cnrm annotation to merge3 (#2605) * docs: Specify origin in git push command in 3.8 (#2608) Issues: #2596 * upgrade to kyaml 0.13.0+ (#2603) * upgrade to kyaml 0.13.0+ * use the latest kyaml * --image flag typo fix (#2601) Fix typo in `kpt fn eval`'s --image flag description * Simplify and speed up "kpt live" e2e tests (#2613) * Simplify and speed up live e2e tests * Addressed comments * Use reconcile-timeout for live apply tests (#2618) * Fix flaky e2e test (#2622) * Docs: OCI Support design docs (#2589) * Starting to fill in oci design doc * Updates to design doc * Formatting updates * Updating title * Adding why * Update 01-oci-support.md * Update 01-oci-support.md * Docs: Adding yaml examples to kpt pkg update * Docs: add descriptions of pkg pull/push Also adds kpt pkg copy as an alternative * Update 01-oci-support.md Adding comparison of get vs pull * Update 01-oci-support.md Updating the descriptions of `kpt pkg pull` and `kpt pkg push` Co-authored-by: Louis DeJardin <[email protected]> * changed default image pull policy to if-not-present (#2600) * updated installation instructions for kpt 1.0.beta.10 (#2628) * feat: Use fn patch version for cli autocomplete (#2629) This brings the cli function autocompletion in line with other updates to kpt function catalog/documentation, in which we display the fully qualified (patch) version for functions. This is accomplished using the new /catalog-v2.json endpoint which serves an updated schema that includes the latest patch version of each function release. * fix: bash auto completion for CLI flags (#2630) This kpt subcommand is invoked by bash shell completion, which previously returned an error when attempting to perform auto completion for flag values. The actual subcommands and their associated flags are registered with the root Command but not this subcommand, which results in flag validation returning an error for this subcommand. Disabling flag validation fixes this issue and enables auto completion for flags in bash. * Cobra based autocompletion (#2631) * refactor: set klog flags before adding to cmd When flags are set using the Command.Flags().Set() method, the flags are marked as Changed. This results in the Cobra autocompletion logic treating it as though the user passed flags for the Command, ultimately resulting in Cobra not rendering the available subcommands for the root kpt command. This change enables the expected behavior when invoking `kpt <tab>` with the Cobra built-in autocompletion. * refactor: use Cobra built-in autocompletion Prior to this change, the kpt CLI exposed two methods for enabling shell autocompletion: - kpt --install-completion - kpt completion [bash|fish|zsh|powershell] The former was implemented using complete, whereas the latter is provided by Cobra as a default. There is not a clear motivation to offer two methods to provide autocompletion functionality, so this change aims to consolidate these into a single method. This change removes the --install-completion option and applies some fixes to enable proper operation of Cobras autocompletion. The decision was made to favor the Cobra implementation over the custom one in order to reduce maintenance cost and offer similar behavior to other popular CLIs which leverage Cobra (e.g. kubectl) * ci: allow no mozilla repos in create-licenses As of a prior commit there are no dependencies on mozilla repos. This change prevents the script from failing in the case of mozilla_repos being an empty string. * fn render supports function binary executables (#2593) * update base image in Dockerfiles (#2634) * Add annotation reference docs (#2636) * docs: add autocompletion in installation guide (#2635) * Fix go.sum with `go mod tidy` * Fix to optional kpt pkg push argument * Update cli-utils to latest version (#2616) * Remove printers from third_party and use cli-utils (#2627) * docs: fix book hyperlink for depends-on (#2640) The hyperlink was missing a trailing / which was leading to a 404 for the redirected page. * feat: always print truncated function stderr (#2639) * feat: always print truncated function stderr This change makes it so that kpt fn render|eval will always print truncated stderr output from functions. This is intended to improve the experience of debugging functions. * test: add unit test cases for printFnStderr * test: add e2e test for fn eval stderr This test case is intended to check that kpt fn eval outputs the stderr of the function even when the function succeeds. This is doing using a simple function script which emits hello world to stderr. * test: add e2e test for fn render stderr This test case is intended to check that kpt fn render outputs the stderr of the function even when the function succeeds. This is doing using a simple function script which emits hello world to stderr. * Update cli-utils to v0.27.0 (#2644) * Added docs for using exec in fn render (#2642) * Added docs for using exec in fn render * addressed review comment * Removing extra files from merge Co-authored-by: Mike Borozdin <[email protected]> Co-authored-by: Natasha Sarkar <[email protected]> Co-authored-by: phani <[email protected]> Co-authored-by: Mengqi Yu <[email protected]> Co-authored-by: Morten Torkildsen <[email protected]> Co-authored-by: Ramon Quitales <[email protected]> Co-authored-by: Karl Isenberg <[email protected]> Co-authored-by: Martin Maly <[email protected]> Co-authored-by: Yuwen Ma <[email protected]> Co-authored-by: Phani Teja Marupaka <[email protected]> Co-authored-by: sdowell <[email protected]> Co-authored-by: Ben Congdon <[email protected]> Co-authored-by: Louis DeJardin <[email protected]> Co-authored-by: Sunil Arora <[email protected]>
commit c0c9326 Author: Louis DeJardin <[email protected]> Date: Tue Jan 25 23:54:52 2022 +0000 Running go mod tidy and make commit 2681dc4 Merge: aa29f77 3d90e0e Author: Louis DeJardin <[email protected]> Date: Tue Jan 25 23:50:38 2022 +0000 Merge remote-tracking branch 'upstream/main' into HEAD commit aa29f77 Author: Louis DeJardin <[email protected]> Date: Thu Jan 13 15:47:42 2022 -0800 Pull from main into oci-branch (kptdev#2643) * design document template (kptdev#2563) * updated maintainers * update to the front page * installation paragraph * design doc template * additional process detail * slight updates * update kyaml and cli-utils to latest (kptdev#2523) * Do not error while adding merge comment (kptdev#2564) * Remove check if repo is checked into git for update (kptdev#2569) * Remove check if repo is checked into git for update * Update tests * Update should accept empty path with version (kptdev#2572) * Update roadmap for Q4 (kptdev#2571) * Update roadmap for Q4 * Suggested changes * Update roadmap (kptdev#2574) * Update roadmap * Suggested changes * Update with suggested format * Organize better * update installation doc and Homebrew to use 1.0.0-beta.8 (kptdev#2578) * Update kpt book with depends-on annotation (kptdev#2565) * Update kpt book with depends-on annotation * Addressed comments * Add snippet for resource dependencies in chapter overview * fix: use KptFileKind variable instead of KptFileName for GVR (kptdev#2580) When specifying the Kptfile resource kind, some code were using the KptFileName variable instead of KptFileKind. Both variables currently contain the same value: "Kptfile", but this will be an issue in the future should the KptFileName and KptFileKind variables have different values. * Disable unwrapping to read fnconfig (kptdev#2582) * Disable wrapping to read fnconfig * Update index annotation * Update licenses (kptdev#2583) - Use go install with explicit tag to avoid modifying go mod - Add licenses to yaml files (new addlicense feature) - Add updated license-check to make all * Revert "update installation doc and Homebrew to use 1.0.0-beta.8 (kptdev#2578)" (kptdev#2584) This reverts commit 98f0299. * add tests to exercise modify path annotation (kptdev#2586) * Update design doc review process (kptdev#2594) * Update beta 9 (kptdev#2597) * Add missing json annotation to KptFile (kptdev#2598) * Implement metrics annotation (kptdev#2588) * Implement metrics annotation * Changes * Suggested changes * Suggested changes * Attributor * Design proposal: kpt live -- Inventory to ResourceGroup (kptdev#2576) * DD for kpt live apply from STDIN * resolve comments * Update doc with rg fn interaction Co-authored-by: Phani Teja Marupaka <[email protected]> * Add cnrm annotation to merge3 (kptdev#2605) * docs: Specify origin in git push command in 3.8 (kptdev#2608) Issues: kptdev#2596 * upgrade to kyaml 0.13.0+ (kptdev#2603) * upgrade to kyaml 0.13.0+ * use the latest kyaml * --image flag typo fix (kptdev#2601) Fix typo in `kpt fn eval`'s --image flag description * Simplify and speed up "kpt live" e2e tests (kptdev#2613) * Simplify and speed up live e2e tests * Addressed comments * Use reconcile-timeout for live apply tests (kptdev#2618) * Fix flaky e2e test (kptdev#2622) * Docs: OCI Support design docs (kptdev#2589) * Starting to fill in oci design doc * Updates to design doc * Formatting updates * Updating title * Adding why * Update 01-oci-support.md * Update 01-oci-support.md * Docs: Adding yaml examples to kpt pkg update * Docs: add descriptions of pkg pull/push Also adds kpt pkg copy as an alternative * Update 01-oci-support.md Adding comparison of get vs pull * Update 01-oci-support.md Updating the descriptions of `kpt pkg pull` and `kpt pkg push` Co-authored-by: Louis DeJardin <[email protected]> * changed default image pull policy to if-not-present (kptdev#2600) * updated installation instructions for kpt 1.0.beta.10 (kptdev#2628) * feat: Use fn patch version for cli autocomplete (kptdev#2629) This brings the cli function autocompletion in line with other updates to kpt function catalog/documentation, in which we display the fully qualified (patch) version for functions. This is accomplished using the new /catalog-v2.json endpoint which serves an updated schema that includes the latest patch version of each function release. * fix: bash auto completion for CLI flags (kptdev#2630) This kpt subcommand is invoked by bash shell completion, which previously returned an error when attempting to perform auto completion for flag values. The actual subcommands and their associated flags are registered with the root Command but not this subcommand, which results in flag validation returning an error for this subcommand. Disabling flag validation fixes this issue and enables auto completion for flags in bash. * Cobra based autocompletion (kptdev#2631) * refactor: set klog flags before adding to cmd When flags are set using the Command.Flags().Set() method, the flags are marked as Changed. This results in the Cobra autocompletion logic treating it as though the user passed flags for the Command, ultimately resulting in Cobra not rendering the available subcommands for the root kpt command. This change enables the expected behavior when invoking `kpt <tab>` with the Cobra built-in autocompletion. * refactor: use Cobra built-in autocompletion Prior to this change, the kpt CLI exposed two methods for enabling shell autocompletion: - kpt --install-completion - kpt completion [bash|fish|zsh|powershell] The former was implemented using complete, whereas the latter is provided by Cobra as a default. There is not a clear motivation to offer two methods to provide autocompletion functionality, so this change aims to consolidate these into a single method. This change removes the --install-completion option and applies some fixes to enable proper operation of Cobras autocompletion. The decision was made to favor the Cobra implementation over the custom one in order to reduce maintenance cost and offer similar behavior to other popular CLIs which leverage Cobra (e.g. kubectl) * ci: allow no mozilla repos in create-licenses As of a prior commit there are no dependencies on mozilla repos. This change prevents the script from failing in the case of mozilla_repos being an empty string. * fn render supports function binary executables (kptdev#2593) * update base image in Dockerfiles (kptdev#2634) * Add annotation reference docs (kptdev#2636) * docs: add autocompletion in installation guide (kptdev#2635) * Fix go.sum with `go mod tidy` * Fix to optional kpt pkg push argument * Update cli-utils to latest version (kptdev#2616) * Remove printers from third_party and use cli-utils (kptdev#2627) * docs: fix book hyperlink for depends-on (kptdev#2640) The hyperlink was missing a trailing / which was leading to a 404 for the redirected page. * feat: always print truncated function stderr (kptdev#2639) * feat: always print truncated function stderr This change makes it so that kpt fn render|eval will always print truncated stderr output from functions. This is intended to improve the experience of debugging functions. * test: add unit test cases for printFnStderr * test: add e2e test for fn eval stderr This test case is intended to check that kpt fn eval outputs the stderr of the function even when the function succeeds. This is doing using a simple function script which emits hello world to stderr. * test: add e2e test for fn render stderr This test case is intended to check that kpt fn render outputs the stderr of the function even when the function succeeds. This is doing using a simple function script which emits hello world to stderr. * Update cli-utils to v0.27.0 (kptdev#2644) * Added docs for using exec in fn render (kptdev#2642) * Added docs for using exec in fn render * addressed review comment * Removing extra files from merge Co-authored-by: Mike Borozdin <[email protected]> Co-authored-by: Natasha Sarkar <[email protected]> Co-authored-by: phani <[email protected]> Co-authored-by: Mengqi Yu <[email protected]> Co-authored-by: Morten Torkildsen <[email protected]> Co-authored-by: Ramon Quitales <[email protected]> Co-authored-by: Karl Isenberg <[email protected]> Co-authored-by: Martin Maly <[email protected]> Co-authored-by: Yuwen Ma <[email protected]> Co-authored-by: Phani Teja Marupaka <[email protected]> Co-authored-by: sdowell <[email protected]> Co-authored-by: Ben Congdon <[email protected]> Co-authored-by: Louis DeJardin <[email protected]> Co-authored-by: Sunil Arora <[email protected]> commit 45fb5ee Author: Louis DeJardin <[email protected]> Date: Wed Dec 15 20:45:06 2021 -0800 Oci support rebased (kptdev#2621) * design document template (kptdev#2563) * updated maintainers * update to the front page * installation paragraph * design doc template * additional process detail * slight updates * update kyaml and cli-utils to latest (kptdev#2523) * Do not error while adding merge comment (kptdev#2564) * Remove check if repo is checked into git for update (kptdev#2569) * Remove check if repo is checked into git for update * Update tests * Update should accept empty path with version (kptdev#2572) * Update roadmap for Q4 (kptdev#2571) * Update roadmap for Q4 * Suggested changes * Update roadmap (kptdev#2574) * Update roadmap * Suggested changes * Update with suggested format * Organize better * update installation doc and Homebrew to use 1.0.0-beta.8 (kptdev#2578) * Update kpt book with depends-on annotation (kptdev#2565) * Update kpt book with depends-on annotation * Addressed comments * Add snippet for resource dependencies in chapter overview * fix: use KptFileKind variable instead of KptFileName for GVR (kptdev#2580) When specifying the Kptfile resource kind, some code were using the KptFileName variable instead of KptFileKind. Both variables currently contain the same value: "Kptfile", but this will be an issue in the future should the KptFileName and KptFileKind variables have different values. * Disable unwrapping to read fnconfig (kptdev#2582) * Disable wrapping to read fnconfig * Update index annotation * Update licenses (kptdev#2583) - Use go install with explicit tag to avoid modifying go mod - Add licenses to yaml files (new addlicense feature) - Add updated license-check to make all * Revert "update installation doc and Homebrew to use 1.0.0-beta.8 (kptdev#2578)" (kptdev#2584) This reverts commit 98f0299. * add tests to exercise modify path annotation (kptdev#2586) * Update design doc review process (kptdev#2594) * Update beta 9 (kptdev#2597) * Add missing json annotation to KptFile (kptdev#2598) * Implement metrics annotation (kptdev#2588) * Implement metrics annotation * Changes * Suggested changes * Suggested changes * Attributor * Design proposal: kpt live -- Inventory to ResourceGroup (kptdev#2576) * DD for kpt live apply from STDIN * resolve comments * Update doc with rg fn interaction Co-authored-by: Phani Teja Marupaka <[email protected]> * Add cnrm annotation to merge3 (kptdev#2605) * docs: Specify origin in git push command in 3.8 (kptdev#2608) Issues: kptdev#2596 * upgrade to kyaml 0.13.0+ (kptdev#2603) * upgrade to kyaml 0.13.0+ * use the latest kyaml * --image flag typo fix (kptdev#2601) Fix typo in `kpt fn eval`'s --image flag description * Simplify and speed up "kpt live" e2e tests (kptdev#2613) * Simplify and speed up live e2e tests * Addressed comments * Adding OCI to Kptfile schema Adding OCI to error utils Adding OCI argument parsing to kpt pkg get Adding get/fetch validation Adding pull and untar to support kpt get Making change in md file go fmt and fixing tests * Adds `oci://` to disambiguate `kpt pkg get` argument Factoring upstream fetcher out of switch cases go fmt fixes Ignore scopelint in table tests Adding support for `kpt pkg update` Fix fmt and tests Path must be added to returned absPath Removing git repo error message check * this startup check probably doesn't make sense any more? the pkg update logic doesn't rely on the state of the local git repo to merge Adding OCI support to kpt pkg diff * Mainly involves using upstream.Fetcher methods Adding prototype kpt pkg pull command Based on design and latest conversations Adding kpt pkg push command Minor fixes * Fixing a direct reference to Git field * Adding output to pkg push command Rename upstream pkg to remote Refactoring remote names * Rename Fether to Upstream * Split Upstream and Origin implementations Removing redundant Origin suffix from names Adding compile-time interface assertion go fix formatting Adding missing err checks Fixing package reference case Fixing case sensitive package * Fixing go.sum after rebase * Adjusting merge of update * Adding support for directory in oci subpackage upstream * Fix formatting * Remove check if repo is checked into git for update (kptdev#2569) * Remove check if repo is checked into git for update * Update tests * Updating go.sum * Adding previous round of PR feedback * Updating scheme * Adding TODO(oci-support) marker to kpt site content Co-authored-by: Mike Borozdin <[email protected]> Co-authored-by: Natasha Sarkar <[email protected]> Co-authored-by: phani <[email protected]> Co-authored-by: Mengqi Yu <[email protected]> Co-authored-by: Morten Torkildsen <[email protected]> Co-authored-by: Ramon Quitales <[email protected]> Co-authored-by: Karl Isenberg <[email protected]> Co-authored-by: Martin Maly <[email protected]> Co-authored-by: Yuwen Ma <[email protected]> Co-authored-by: Phani Teja Marupaka <[email protected]> Co-authored-by: sdowell <[email protected]> Co-authored-by: Ben Congdon <[email protected]> Co-authored-by: Louis DeJardin <[email protected]>
* design document template (kptdev#2563) * updated maintainers * update to the front page * installation paragraph * design doc template * additional process detail * slight updates * update kyaml and cli-utils to latest (kptdev#2523) * Do not error while adding merge comment (kptdev#2564) * Remove check if repo is checked into git for update (kptdev#2569) * Remove check if repo is checked into git for update * Update tests * Update should accept empty path with version (kptdev#2572) * Update roadmap for Q4 (kptdev#2571) * Update roadmap for Q4 * Suggested changes * Update roadmap (kptdev#2574) * Update roadmap * Suggested changes * Update with suggested format * Organize better * update installation doc and Homebrew to use 1.0.0-beta.8 (kptdev#2578) * Update kpt book with depends-on annotation (kptdev#2565) * Update kpt book with depends-on annotation * Addressed comments * Add snippet for resource dependencies in chapter overview * fix: use KptFileKind variable instead of KptFileName for GVR (kptdev#2580) When specifying the Kptfile resource kind, some code were using the KptFileName variable instead of KptFileKind. Both variables currently contain the same value: "Kptfile", but this will be an issue in the future should the KptFileName and KptFileKind variables have different values. * Disable unwrapping to read fnconfig (kptdev#2582) * Disable wrapping to read fnconfig * Update index annotation * Update licenses (kptdev#2583) - Use go install with explicit tag to avoid modifying go mod - Add licenses to yaml files (new addlicense feature) - Add updated license-check to make all * Revert "update installation doc and Homebrew to use 1.0.0-beta.8 (kptdev#2578)" (kptdev#2584) This reverts commit 98f0299. * add tests to exercise modify path annotation (kptdev#2586) * Update design doc review process (kptdev#2594) * Update beta 9 (kptdev#2597) * Add missing json annotation to KptFile (kptdev#2598) * Implement metrics annotation (kptdev#2588) * Implement metrics annotation * Changes * Suggested changes * Suggested changes * Attributor * Design proposal: kpt live -- Inventory to ResourceGroup (kptdev#2576) * DD for kpt live apply from STDIN * resolve comments * Update doc with rg fn interaction Co-authored-by: Phani Teja Marupaka <[email protected]> * Add cnrm annotation to merge3 (kptdev#2605) * docs: Specify origin in git push command in 3.8 (kptdev#2608) Issues: kptdev#2596 * upgrade to kyaml 0.13.0+ (kptdev#2603) * upgrade to kyaml 0.13.0+ * use the latest kyaml * --image flag typo fix (kptdev#2601) Fix typo in `kpt fn eval`'s --image flag description * Simplify and speed up "kpt live" e2e tests (kptdev#2613) * Simplify and speed up live e2e tests * Addressed comments * Adding OCI to Kptfile schema Adding OCI to error utils Adding OCI argument parsing to kpt pkg get Adding get/fetch validation Adding pull and untar to support kpt get Making change in md file go fmt and fixing tests * Adds `oci://` to disambiguate `kpt pkg get` argument Factoring upstream fetcher out of switch cases go fmt fixes Ignore scopelint in table tests Adding support for `kpt pkg update` Fix fmt and tests Path must be added to returned absPath Removing git repo error message check * this startup check probably doesn't make sense any more? the pkg update logic doesn't rely on the state of the local git repo to merge Adding OCI support to kpt pkg diff * Mainly involves using upstream.Fetcher methods Adding prototype kpt pkg pull command Based on design and latest conversations Adding kpt pkg push command Minor fixes * Fixing a direct reference to Git field * Adding output to pkg push command Rename upstream pkg to remote Refactoring remote names * Rename Fether to Upstream * Split Upstream and Origin implementations Removing redundant Origin suffix from names Adding compile-time interface assertion go fix formatting Adding missing err checks Fixing package reference case Fixing case sensitive package * Fixing go.sum after rebase * Adjusting merge of update * Adding support for directory in oci subpackage upstream * Fix formatting * Remove check if repo is checked into git for update (kptdev#2569) * Remove check if repo is checked into git for update * Update tests * Updating go.sum * Adding previous round of PR feedback * Updating scheme * Adding TODO(oci-support) marker to kpt site content Co-authored-by: Mike Borozdin <[email protected]> Co-authored-by: Natasha Sarkar <[email protected]> Co-authored-by: phani <[email protected]> Co-authored-by: Mengqi Yu <[email protected]> Co-authored-by: Morten Torkildsen <[email protected]> Co-authored-by: Ramon Quitales <[email protected]> Co-authored-by: Karl Isenberg <[email protected]> Co-authored-by: Martin Maly <[email protected]> Co-authored-by: Yuwen Ma <[email protected]> Co-authored-by: Phani Teja Marupaka <[email protected]> Co-authored-by: sdowell <[email protected]> Co-authored-by: Ben Congdon <[email protected]> Co-authored-by: Louis DeJardin <[email protected]>
* design document template (kptdev#2563) * updated maintainers * update to the front page * installation paragraph * design doc template * additional process detail * slight updates * update kyaml and cli-utils to latest (kptdev#2523) * Do not error while adding merge comment (kptdev#2564) * Remove check if repo is checked into git for update (kptdev#2569) * Remove check if repo is checked into git for update * Update tests * Update should accept empty path with version (kptdev#2572) * Update roadmap for Q4 (kptdev#2571) * Update roadmap for Q4 * Suggested changes * Update roadmap (kptdev#2574) * Update roadmap * Suggested changes * Update with suggested format * Organize better * update installation doc and Homebrew to use 1.0.0-beta.8 (kptdev#2578) * Update kpt book with depends-on annotation (kptdev#2565) * Update kpt book with depends-on annotation * Addressed comments * Add snippet for resource dependencies in chapter overview * fix: use KptFileKind variable instead of KptFileName for GVR (kptdev#2580) When specifying the Kptfile resource kind, some code were using the KptFileName variable instead of KptFileKind. Both variables currently contain the same value: "Kptfile", but this will be an issue in the future should the KptFileName and KptFileKind variables have different values. * Disable unwrapping to read fnconfig (kptdev#2582) * Disable wrapping to read fnconfig * Update index annotation * Update licenses (kptdev#2583) - Use go install with explicit tag to avoid modifying go mod - Add licenses to yaml files (new addlicense feature) - Add updated license-check to make all * Revert "update installation doc and Homebrew to use 1.0.0-beta.8 (kptdev#2578)" (kptdev#2584) This reverts commit 98f0299. * add tests to exercise modify path annotation (kptdev#2586) * Update design doc review process (kptdev#2594) * Update beta 9 (kptdev#2597) * Add missing json annotation to KptFile (kptdev#2598) * Implement metrics annotation (kptdev#2588) * Implement metrics annotation * Changes * Suggested changes * Suggested changes * Attributor * Design proposal: kpt live -- Inventory to ResourceGroup (kptdev#2576) * DD for kpt live apply from STDIN * resolve comments * Update doc with rg fn interaction Co-authored-by: Phani Teja Marupaka <[email protected]> * Add cnrm annotation to merge3 (kptdev#2605) * docs: Specify origin in git push command in 3.8 (kptdev#2608) Issues: kptdev#2596 * upgrade to kyaml 0.13.0+ (kptdev#2603) * upgrade to kyaml 0.13.0+ * use the latest kyaml * --image flag typo fix (kptdev#2601) Fix typo in `kpt fn eval`'s --image flag description * Simplify and speed up "kpt live" e2e tests (kptdev#2613) * Simplify and speed up live e2e tests * Addressed comments * Use reconcile-timeout for live apply tests (kptdev#2618) * Fix flaky e2e test (kptdev#2622) * Docs: OCI Support design docs (kptdev#2589) * Starting to fill in oci design doc * Updates to design doc * Formatting updates * Updating title * Adding why * Update 01-oci-support.md * Update 01-oci-support.md * Docs: Adding yaml examples to kpt pkg update * Docs: add descriptions of pkg pull/push Also adds kpt pkg copy as an alternative * Update 01-oci-support.md Adding comparison of get vs pull * Update 01-oci-support.md Updating the descriptions of `kpt pkg pull` and `kpt pkg push` Co-authored-by: Louis DeJardin <[email protected]> * changed default image pull policy to if-not-present (kptdev#2600) * updated installation instructions for kpt 1.0.beta.10 (kptdev#2628) * feat: Use fn patch version for cli autocomplete (kptdev#2629) This brings the cli function autocompletion in line with other updates to kpt function catalog/documentation, in which we display the fully qualified (patch) version for functions. This is accomplished using the new /catalog-v2.json endpoint which serves an updated schema that includes the latest patch version of each function release. * fix: bash auto completion for CLI flags (kptdev#2630) This kpt subcommand is invoked by bash shell completion, which previously returned an error when attempting to perform auto completion for flag values. The actual subcommands and their associated flags are registered with the root Command but not this subcommand, which results in flag validation returning an error for this subcommand. Disabling flag validation fixes this issue and enables auto completion for flags in bash. * Cobra based autocompletion (kptdev#2631) * refactor: set klog flags before adding to cmd When flags are set using the Command.Flags().Set() method, the flags are marked as Changed. This results in the Cobra autocompletion logic treating it as though the user passed flags for the Command, ultimately resulting in Cobra not rendering the available subcommands for the root kpt command. This change enables the expected behavior when invoking `kpt <tab>` with the Cobra built-in autocompletion. * refactor: use Cobra built-in autocompletion Prior to this change, the kpt CLI exposed two methods for enabling shell autocompletion: - kpt --install-completion - kpt completion [bash|fish|zsh|powershell] The former was implemented using complete, whereas the latter is provided by Cobra as a default. There is not a clear motivation to offer two methods to provide autocompletion functionality, so this change aims to consolidate these into a single method. This change removes the --install-completion option and applies some fixes to enable proper operation of Cobras autocompletion. The decision was made to favor the Cobra implementation over the custom one in order to reduce maintenance cost and offer similar behavior to other popular CLIs which leverage Cobra (e.g. kubectl) * ci: allow no mozilla repos in create-licenses As of a prior commit there are no dependencies on mozilla repos. This change prevents the script from failing in the case of mozilla_repos being an empty string. * fn render supports function binary executables (kptdev#2593) * update base image in Dockerfiles (kptdev#2634) * Add annotation reference docs (kptdev#2636) * docs: add autocompletion in installation guide (kptdev#2635) * Fix go.sum with `go mod tidy` * Fix to optional kpt pkg push argument * Update cli-utils to latest version (kptdev#2616) * Remove printers from third_party and use cli-utils (kptdev#2627) * docs: fix book hyperlink for depends-on (kptdev#2640) The hyperlink was missing a trailing / which was leading to a 404 for the redirected page. * feat: always print truncated function stderr (kptdev#2639) * feat: always print truncated function stderr This change makes it so that kpt fn render|eval will always print truncated stderr output from functions. This is intended to improve the experience of debugging functions. * test: add unit test cases for printFnStderr * test: add e2e test for fn eval stderr This test case is intended to check that kpt fn eval outputs the stderr of the function even when the function succeeds. This is doing using a simple function script which emits hello world to stderr. * test: add e2e test for fn render stderr This test case is intended to check that kpt fn render outputs the stderr of the function even when the function succeeds. This is doing using a simple function script which emits hello world to stderr. * Update cli-utils to v0.27.0 (kptdev#2644) * Added docs for using exec in fn render (kptdev#2642) * Added docs for using exec in fn render * addressed review comment * Removing extra files from merge Co-authored-by: Mike Borozdin <[email protected]> Co-authored-by: Natasha Sarkar <[email protected]> Co-authored-by: phani <[email protected]> Co-authored-by: Mengqi Yu <[email protected]> Co-authored-by: Morten Torkildsen <[email protected]> Co-authored-by: Ramon Quitales <[email protected]> Co-authored-by: Karl Isenberg <[email protected]> Co-authored-by: Martin Maly <[email protected]> Co-authored-by: Yuwen Ma <[email protected]> Co-authored-by: Phani Teja Marupaka <[email protected]> Co-authored-by: sdowell <[email protected]> Co-authored-by: Ben Congdon <[email protected]> Co-authored-by: Louis DeJardin <[email protected]> Co-authored-by: Sunil Arora <[email protected]>
This PR updates kpt to kyaml v0.12.0 and includes an important change referenced by #2478 and kubernetes-sigs/kustomize#4024.
The following annotations are being migrated:
config.k8s.io/id
->internal.config.kubernetes.io/id
config.kubernetes.io/path
->internal.config.kubernetes.io/path
config.kubernetes.io/index
->internal.config.kubernetes.io/index
For some time, we will support both annotations by adding both legacy and the new annotation when reading files. When writing files, the orchestrator consumes both and reconciles correctly by comparing the resource before and after running a function to infer which annotation has changed (if they differ). See the kyaml PR that implemented this change here: kubernetes-sigs/kustomize#4190.
After some grace period, support for the legacy annotations will be dropped.