-
Notifications
You must be signed in to change notification settings - Fork 225
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 kpt book with depends-on annotation #2565
Conversation
thanks for making the addition! |
In kpt, this is supported by declaring dependencies with the | ||
`config.kubernetes.io/depends-on` annotation. | ||
|
||
If you look at the `wordpress-with-dependencies` package, a modified |
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.
Provide the pkg get
command, and walk the user (At no point should the user be left not knowing what to do).
@@ -0,0 +1,74 @@ | |||
Sometimes resources within a package have dependencies that require | |||
one resource to be applied and reconciled before the next resource |
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.
s/reconciled/ready ? (does ready convey the intent better here ?)
Reconciled but failed will not go through ? right ?
Two things are happening with depends-on
:
- Ordering of resources during
apply
- Waiting for a condition to be met on a resource (This part is not very clear here)
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.
Reconciled is the term we are using for this process, both in the book and elsewhere. It means the live state has been updated to reflect the desired state, so a resource that have failed the reconciliation process is not considered reconciled. I also want to avoid the term Ready
, as it is a commonly used condition for k8s resources and means something slightly different.
1. "Reconcile" is an established term in the book.
2. Please add a snippet for this feature in the chapter overview where we
highlight the major enhancements over kubectl:
https://kpt.dev/book/06-deploying-packages/
…On Wed, Nov 3, 2021, 3:53 PM Sunil Arora ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In package-examples/wordpress-with-dependencies/deployment/deployment.yaml
<#2565 (comment)>
:
> +# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: wordpress
+ namespace: default
+ labels:
+ app: wordpress
+ annotations:
+ config.kubernetes.io/depends-on: apps/namespaces/default/StatefulSet/wordpress-mysql
Should set-namespace and ensure-name-substring be aware of these
annotations ?
To clarify the use-case, so I have a kpt pkg that have resources annotated
with depends-on annotation. The pkg also uses functions that manipulates
the namespace or name, should those function also update the depends-on
annotation ?
/cc @mengqiy <https://github.com/mengqiy>
------------------------------
In site/book/06-deploying-packages/03-handling-dependencies.md
<#2565 (comment)>
:
> @@ -0,0 +1,74 @@
+Sometimes resources within a package have dependencies that require
+one resource to be applied and reconciled before the next resource
s/reconciled/ready ? (does ready convey the intent better here ?)
Reconciled but failed will not go through ? right ?
Two things are happening with depends-on:
1. Ordering of resources during apply
2. Waiting for a condition to be met on a resource (This part is not
very clear here)
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#2565 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6YIP5NX2ZV3NCTKBQONF3UKHDODANCNFSM5HE4JEBA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
* 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 <pmarupaka@google.com> * 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 <mikebz@google.com> Co-authored-by: Natasha Sarkar <natashasarkar@google.com> Co-authored-by: phani <phanitejamarupaka@gmail.com> Co-authored-by: Mengqi Yu <mengqiy@google.com> Co-authored-by: Morten Torkildsen <mortent@google.com> Co-authored-by: Ramon Quitales <quitalesramon+github@gmail.com> Co-authored-by: Karl Isenberg <karlisenberg@google.com> Co-authored-by: Martin Maly <mmaly@google.com> Co-authored-by: Yuwen Ma <yuwenma@google.com> Co-authored-by: Phani Teja Marupaka <pmarupaka@google.com> Co-authored-by: sdowell <sdowell@google.com> Co-authored-by: Ben Congdon <bencongdon96@gmail.com> Co-authored-by: Louis DeJardin <dejardin@google.com>
* 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 <pmarupaka@google.com> * 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 <dejardin@google.com> * 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 <mikebz@google.com> Co-authored-by: Natasha Sarkar <natashasarkar@google.com> Co-authored-by: phani <phanitejamarupaka@gmail.com> Co-authored-by: Mengqi Yu <mengqiy@google.com> Co-authored-by: Morten Torkildsen <mortent@google.com> Co-authored-by: Ramon Quitales <quitalesramon+github@gmail.com> Co-authored-by: Karl Isenberg <karlisenberg@google.com> Co-authored-by: Martin Maly <mmaly@google.com> Co-authored-by: Yuwen Ma <yuwenma@google.com> Co-authored-by: Phani Teja Marupaka <pmarupaka@google.com> Co-authored-by: sdowell <sdowell@google.com> Co-authored-by: Ben Congdon <bencongdon96@gmail.com> Co-authored-by: Louis DeJardin <dejardin@google.com> Co-authored-by: Sunil Arora <sunilarora@google.com>
commit c0c9326 Author: Louis DeJardin <dejardin@google.com> Date: Tue Jan 25 23:54:52 2022 +0000 Running go mod tidy and make commit 2681dc4 Merge: aa29f77 3d90e0e Author: Louis DeJardin <dejardin@google.com> Date: Tue Jan 25 23:50:38 2022 +0000 Merge remote-tracking branch 'upstream/main' into HEAD commit aa29f77 Author: Louis DeJardin <louis.dejardin@gmail.com> 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 <pmarupaka@google.com> * 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 <dejardin@google.com> * 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 <mikebz@google.com> Co-authored-by: Natasha Sarkar <natashasarkar@google.com> Co-authored-by: phani <phanitejamarupaka@gmail.com> Co-authored-by: Mengqi Yu <mengqiy@google.com> Co-authored-by: Morten Torkildsen <mortent@google.com> Co-authored-by: Ramon Quitales <quitalesramon+github@gmail.com> Co-authored-by: Karl Isenberg <karlisenberg@google.com> Co-authored-by: Martin Maly <mmaly@google.com> Co-authored-by: Yuwen Ma <yuwenma@google.com> Co-authored-by: Phani Teja Marupaka <pmarupaka@google.com> Co-authored-by: sdowell <sdowell@google.com> Co-authored-by: Ben Congdon <bencongdon96@gmail.com> Co-authored-by: Louis DeJardin <dejardin@google.com> Co-authored-by: Sunil Arora <sunilarora@google.com> commit 45fb5ee Author: Louis DeJardin <louis.dejardin@gmail.com> 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 <pmarupaka@google.com> * 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 <mikebz@google.com> Co-authored-by: Natasha Sarkar <natashasarkar@google.com> Co-authored-by: phani <phanitejamarupaka@gmail.com> Co-authored-by: Mengqi Yu <mengqiy@google.com> Co-authored-by: Morten Torkildsen <mortent@google.com> Co-authored-by: Ramon Quitales <quitalesramon+github@gmail.com> Co-authored-by: Karl Isenberg <karlisenberg@google.com> Co-authored-by: Martin Maly <mmaly@google.com> Co-authored-by: Yuwen Ma <yuwenma@google.com> Co-authored-by: Phani Teja Marupaka <pmarupaka@google.com> Co-authored-by: sdowell <sdowell@google.com> Co-authored-by: Ben Congdon <bencongdon96@gmail.com> Co-authored-by: Louis DeJardin <dejardin@google.com>
* 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 <pmarupaka@google.com> * 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 <mikebz@google.com> Co-authored-by: Natasha Sarkar <natashasarkar@google.com> Co-authored-by: phani <phanitejamarupaka@gmail.com> Co-authored-by: Mengqi Yu <mengqiy@google.com> Co-authored-by: Morten Torkildsen <mortent@google.com> Co-authored-by: Ramon Quitales <quitalesramon+github@gmail.com> Co-authored-by: Karl Isenberg <karlisenberg@google.com> Co-authored-by: Martin Maly <mmaly@google.com> Co-authored-by: Yuwen Ma <yuwenma@google.com> Co-authored-by: Phani Teja Marupaka <pmarupaka@google.com> Co-authored-by: sdowell <sdowell@google.com> Co-authored-by: Ben Congdon <bencongdon96@gmail.com> Co-authored-by: Louis DeJardin <dejardin@google.com>
* 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 <pmarupaka@google.com> * 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 <dejardin@google.com> * 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 <mikebz@google.com> Co-authored-by: Natasha Sarkar <natashasarkar@google.com> Co-authored-by: phani <phanitejamarupaka@gmail.com> Co-authored-by: Mengqi Yu <mengqiy@google.com> Co-authored-by: Morten Torkildsen <mortent@google.com> Co-authored-by: Ramon Quitales <quitalesramon+github@gmail.com> Co-authored-by: Karl Isenberg <karlisenberg@google.com> Co-authored-by: Martin Maly <mmaly@google.com> Co-authored-by: Yuwen Ma <yuwenma@google.com> Co-authored-by: Phani Teja Marupaka <pmarupaka@google.com> Co-authored-by: sdowell <sdowell@google.com> Co-authored-by: Ben Congdon <bencongdon96@gmail.com> Co-authored-by: Louis DeJardin <dejardin@google.com> Co-authored-by: Sunil Arora <sunilarora@google.com>
This updates the kpt book with an additional chapter for kpt live covering the depends-on functionality. It also adds a new example package that uses the functionality.