Skip to content

Commit

Permalink
Pull from main into oci-branch (#2643)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
15 people authored Jan 13, 2022
1 parent 45fb5ee commit aa29f77
Show file tree
Hide file tree
Showing 113 changed files with 1,982 additions and 3,453 deletions.
474 changes: 474 additions & 0 deletions docs/design-docs/01-oci-support.md

Large diffs are not rendered by default.

62 changes: 26 additions & 36 deletions e2e/live/end-to-end-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,10 @@ ${BIN_DIR}/kpt live apply e2e/live/testdata/rg-test-case-1a > $OUTPUT_DIR/status
# The ResourceGroup inventory CRD is automatically installed on the initial apply.
assertContains "installing inventory ResourceGroup CRD"
assertContains "namespace/rg-test-namespace unchanged"
assertContains "1 resource(s) applied. 0 created, 1 unchanged, 0 configured, 0 failed"
assertContains "pod/pod-a created"
assertContains "pod/pod-b created"
assertContains "pod/pod-c created"
assertContains "3 resource(s) applied. 3 created, 0 unchanged, 0 configured, 0 failed"
assertContains "4 resource(s) applied. 3 created, 1 unchanged, 0 configured, 0 failed"
wait 2
# Validate resources in the cluster
# ConfigMap inventory with four inventory items.
Expand All @@ -451,11 +450,10 @@ assertRGInventory "rg-test-namespace" "4"
${BIN_DIR}/kpt live apply e2e/live/testdata/rg-test-case-1a > $OUTPUT_DIR/status 2>&1
assertNotContains "installing inventory ResourceGroup CRD" # Not applied again
assertContains "namespace/rg-test-namespace unchanged"
assertContains "1 resource(s) applied. 0 created, 1 unchanged, 0 configured, 0 failed"
assertContains "pod/pod-a unchanged"
assertContains "pod/pod-b unchanged"
assertContains "pod/pod-c unchanged"
assertContains "3 resource(s) applied. 0 created, 3 unchanged, 0 configured, 0 failed"
assertContains "4 resource(s) applied. 0 created, 4 unchanged, 0 configured, 0 failed"
wait 2

printResult
Expand Down Expand Up @@ -529,12 +527,11 @@ printResult
echo "[ResourceGroup] Testing initial apply dry-run"
echo "kpt live apply --dry-run e2e/live/testdata/rg-test-case-1a"
${BIN_DIR}/kpt live apply --dry-run e2e/live/testdata/rg-test-case-1a > $OUTPUT_DIR/status
assertContains "namespace/rg-test-namespace created (dry-run)"
assertContains "1 resource(s) applied. 1 created, 0 unchanged, 0 configured, 0 failed (dry-run)"
assertContains "pod/pod-a created (dry-run)"
assertContains "pod/pod-b created (dry-run)"
assertContains "pod/pod-c created (dry-run)"
assertContains "3 resource(s) applied. 3 created, 0 unchanged, 0 configured, 0 failed"
assertContains "namespace/rg-test-namespace created"
assertContains "pod/pod-a created"
assertContains "pod/pod-b created"
assertContains "pod/pod-c created"
assertContains "4 resource(s) applied. 4 created, 0 unchanged, 0 configured, 0 failed"
printResult

# Test: Basic kpt live apply
Expand All @@ -545,11 +542,10 @@ ${BIN_DIR}/kpt live apply e2e/live/testdata/rg-test-case-1a > $OUTPUT_DIR/status
# The ResourceGroup CRD is already installed.
assertNotContains "installing inventory ResourceGroup CRD"
assertContains "namespace/rg-test-namespace unchanged"
assertContains "1 resource(s) applied. 0 created, 1 unchanged, 0 configured, 0 failed"
assertContains "pod/pod-a created"
assertContains "pod/pod-b created"
assertContains "pod/pod-c created"
assertContains "3 resource(s) applied. 3 created, 0 unchanged, 0 configured, 0 failed"
assertContains "4 resource(s) applied. 3 created, 1 unchanged, 0 configured, 0 failed"
wait 2
# Validate resources in the cluster
# ConfigMap inventory with four inventory items.
Expand All @@ -565,11 +561,10 @@ ${BIN_DIR}/kpt live apply link-to-rg-test-case-1a > $OUTPUT_DIR/status
# The ResourceGroup CRD is already installed.
assertNotContains "installing inventory ResourceGroup CRD"
assertContains "namespace/rg-test-namespace unchanged"
assertContains "1 resource(s) applied. 0 created, 1 unchanged, 0 configured, 0 failed"
assertContains "pod/pod-a unchanged"
assertContains "pod/pod-b unchanged"
assertContains "pod/pod-c unchanged"
assertContains "3 resource(s) applied. 0 created, 3 unchanged, 0 configured, 0 failed"
assertContains "4 resource(s) applied. 0 created, 4 unchanged, 0 configured, 0 failed"
wait 2
# Validate resources in the cluster
# ConfigMap inventory with four inventory items.
Expand Down Expand Up @@ -602,14 +597,13 @@ echo "[ResourceGroup] Testing basic apply dry-run"
echo "kpt live apply --dry-run e2e/live/testdata/rg-test-case-1b"
cp -f e2e/live/testdata/rg-test-case-1a/Kptfile e2e/live/testdata/rg-test-case-1b
${BIN_DIR}/kpt live apply --dry-run e2e/live/testdata/rg-test-case-1b > $OUTPUT_DIR/status
assertContains "namespace/rg-test-namespace configured (dry-run)"
assertContains "1 resource(s) applied. 0 created, 0 unchanged, 1 configured, 0 failed (dry-run)"
assertContains "pod/pod-b configured (dry-run)"
assertContains "pod/pod-c configured (dry-run)"
assertContains "pod/pod-d created (dry-run)"
assertContains "3 resource(s) applied. 1 created, 0 unchanged, 2 configured, 0 failed (dry-run)"
assertContains "pod/pod-a pruned (dry-run)"
assertContains "1 resource(s) pruned, 0 skipped, 0 failed (dry-run)"
assertContains "namespace/rg-test-namespace configured"
assertContains "pod/pod-b configured"
assertContains "pod/pod-c configured"
assertContains "pod/pod-d created"
assertContains "4 resource(s) applied. 1 created, 0 unchanged, 3 configured, 0 failed"
assertContains "pod/pod-a pruned"
assertContains "1 resource(s) pruned, 0 skipped, 0 failed"
wait 2
# Validate resources in the cluster
# ConfigMap inventory with four inventory items.
Expand All @@ -626,11 +620,10 @@ echo "kpt live apply e2e/live/testdata/rg-test-case-1b"
${BIN_DIR}/kpt live apply e2e/live/testdata/rg-test-case-1b > $OUTPUT_DIR/status
assertNotContains "installing inventory ResourceGroup CRD" # CRD already installed
assertContains "namespace/rg-test-namespace unchanged"
assertContains "1 resource(s) applied. 0 created, 1 unchanged, 0 configured, 0 failed"
assertContains "pod/pod-b unchanged"
assertContains "pod/pod-c unchanged"
assertContains "pod/pod-d created"
assertContains "3 resource(s) applied. 1 created, 2 unchanged, 0 configured, 0 failed"
assertContains "4 resource(s) applied. 1 created, 3 unchanged, 0 configured, 0 failed"
assertContains "pod/pod-a pruned"
assertContains "1 resource(s) pruned, 0 skipped, 0 failed"
wait 2
Expand All @@ -647,12 +640,11 @@ printResult
echo "[ResourceGroup] Testing basic destroy dry-run"
echo "kpt live destroy --dry-run e2e/live/testdata/rg-test-case-1b"
${BIN_DIR}/kpt live destroy --dry-run e2e/live/testdata/rg-test-case-1b > $OUTPUT_DIR/status
assertContains "pod/pod-d deleted (dry-run)"
assertContains "pod/pod-c deleted (dry-run)"
assertContains "pod/pod-b deleted (dry-run)"
assertContains "3 resource(s) deleted, 0 skipped (dry-run)"
assertContains "namespace/rg-test-namespace deleted (dry-run)"
assertContains "1 resource(s) deleted, 0 skipped (dry-run)"
assertContains "pod/pod-d deleted"
assertContains "pod/pod-c deleted"
assertContains "pod/pod-b deleted"
assertContains "namespace/rg-test-namespace deleted"
assertContains "4 resource(s) deleted, 0 skipped"
# Validate resources NOT DESTROYED in the cluster
assertPodExists "pod-b" "rg-test-namespace"
assertPodExists "pod-c" "rg-test-namespace"
Expand All @@ -667,9 +659,8 @@ ${BIN_DIR}/kpt live destroy e2e/live/testdata/rg-test-case-1b > $OUTPUT_DIR/stat
assertContains "pod/pod-d deleted"
assertContains "pod/pod-c deleted"
assertContains "pod/pod-b deleted"
assertContains "3 resource(s) deleted, 0 skipped"
assertContains "namespace/rg-test-namespace deleted"
assertContains "1 resource(s) deleted, 0 skipped"
assertContains "4 resource(s) deleted, 0 skipped"
# Validate resources NOT in the cluster
assertPodNotExists "pod-b" "rg-test-namespace"
assertPodNotExists "pod-c" "rg-test-namespace"
Expand All @@ -684,7 +675,7 @@ cat e2e/live/testdata/stdin-test/pods.yaml | ${BIN_DIR}/kpt live apply - > $OUTP
assertContains "pod/pod-a created"
assertContains "pod/pod-b created"
assertContains "pod/pod-c created"
assertContains "3 resource(s) applied. 3 created, 0 unchanged, 0 configured, 0 failed"
assertContains "4 resource(s) applied. 3 created, 1 unchanged, 0 configured, 0 failed"
printResult
echo "cat e2e/live/testdata/stdin-test/pods.yaml | kpt live status -"
cat e2e/live/testdata/stdin-test/pods.yaml | ${BIN_DIR}/kpt live status - > $OUTPUT_DIR/status 2>&1
Expand All @@ -698,7 +689,7 @@ cat e2e/live/testdata/stdin-test/pods.yaml | ${BIN_DIR}/kpt live destroy - > $OU
assertContains "pod/pod-a deleted"
assertContains "pod/pod-b deleted"
assertContains "pod/pod-c deleted"
assertContains "3 resource(s) deleted, 0 skipped"
assertContains "4 resource(s) deleted, 0 skipped"
printResult

# Test: kpt live apply continue-on-error
Expand Down Expand Up @@ -829,11 +820,10 @@ echo "kpt live apply e2e/live/testdata/migrate-case-1b"
cp -f e2e/live/testdata/migrate-case-1a/Kptfile e2e/live/testdata/migrate-case-1b
${BIN_DIR}/kpt live apply e2e/live/testdata/migrate-case-1b > $OUTPUT_DIR/status
assertContains "namespace/test-rg-namespace unchanged"
assertContains "1 resource(s) applied. 0 created, 1 unchanged, 0 configured, 0 failed"
assertContains "pod/pod-b unchanged"
assertContains "pod/pod-c unchanged"
assertContains "pod/pod-d created"
assertContains "3 resource(s) applied. 1 created, 2 unchanged, 0 configured, 0 failed"
assertContains "4 resource(s) applied. 1 created, 3 unchanged, 0 configured, 0 failed"
assertContains "pod/pod-a pruned"
assertContains "1 resource(s) pruned, 0 skipped, 0 failed"
wait 2
Expand Down
7 changes: 5 additions & 2 deletions e2e/testdata/fn-eval/error-in-pipe/.expected/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ stdErr: |
Stderr:
"[error] /// : failed to configure function: input namespace cannot be empty"
Exit code: 1
[RUNNING] "gcr.io/kpt-fn/dne"
[FAIL] "gcr.io/kpt-fn/dne" in 0s
Error: Function image "gcr.io/kpt-fn/dne" doesn't exist
Stderr:
"docker: Error response from daemon: manifest for gcr.io/kpt-fn/dne:latest not found: manifest unknown: Failed to fetch \"latest\" from request \"/v2/kpt-fn/dne/manifests/latest\"."
"See 'docker run --help'."
Exit code: 125
24 changes: 24 additions & 0 deletions e2e/testdata/fn-eval/exec-function-stderr/.expected/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.

testType: eval
stdErr: |
[RUNNING] "./function.sh"
[PASS] "./function.sh" in 0s
Stderr:
"Hello world 0!"
"Hello world 1!"
"Hello world 2!"
"Hello world 3!"
...(18 line(s) truncated, use '--truncate-output=false' to disable)
21 changes: 21 additions & 0 deletions e2e/testdata/fn-eval/exec-function-stderr/.expected/diff.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/resources.yaml b/resources.yaml
index e8ae6bb..297b99f 100644
--- a/resources.yaml
+++ b/resources.yaml
@@ -15,7 +15,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
- namespace: foo
+ namespace: bar
spec:
replicas: 3
---
@@ -23,6 +23,6 @@ apiVersion: custom.io/v1
kind: Custom
metadata:
name: custom
- namespace: foo
+ namespace: bar
spec:
image: nginx:1.2.3
19 changes: 19 additions & 0 deletions e2e/testdata/fn-eval/exec-function-stderr/.expected/exec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#! /bin/bash
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.

set -eo pipefail

kpt fn source \
| kpt fn eval --exec ./function.sh
1 change: 1 addition & 0 deletions e2e/testdata/fn-eval/exec-function-stderr/.krmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.expected
21 changes: 21 additions & 0 deletions e2e/testdata/fn-eval/exec-function-stderr/function.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /usr/bin/env bash
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.

sed -e 's/foo/bar/'

for i in {0..20}
do
>&2 echo "Hello world $i!"
done
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,18 @@
# 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: fourth-nginx
namespace: json-output
annotations:
config.k8s.io/owning-inventory: json-output
config.kubernetes.io/depends-on: apps/namespaces/json-output/Deployment/third-nginx
name: nginx-deployment
namespace: foo
spec:
replicas: 1
selector:
matchLabels:
app: fourth-nginx
template:
metadata:
labels:
app: fourth-nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
replicas: 3
---
apiVersion: custom.io/v1
kind: Custom
metadata:
name: custom
namespace: foo
spec:
image: nginx:1.2.3
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ metadata:
exitCode: 0
items:
- image: gcr.io/kpt-fn/starlark:v0.2
stderr: |
function succeeded, reporting it on stderr
stderr: function succeeded, reporting it on stderr
exitCode: 0
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ exitCode: 1
image: gcr.io/kpt-fn/dne # non-existing image
args:
namespace: staging
stdErr: 'Function image "gcr.io/kpt-fn/dne" doesn''t exist'
stdErr: 'gcr.io/kpt-fn/dne:latest not found'
24 changes: 24 additions & 0 deletions e2e/testdata/fn-render/exec-function-stderr/.expected/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.

allowExec: true
stdErr: |
[RUNNING] "./testdata/fn-render/exec-function-stderr/function.sh"
[PASS] "./testdata/fn-render/exec-function-stderr/function.sh" in 0s
Stderr:
"Hello world 0!"
"Hello world 1!"
"Hello world 2!"
"Hello world 3!"
...(18 line(s) truncated, use '--truncate-output=false' to disable)
21 changes: 21 additions & 0 deletions e2e/testdata/fn-render/exec-function-stderr/.expected/diff.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/resources.yaml b/resources.yaml
index e8ae6bb..297b99f 100644
--- a/resources.yaml
+++ b/resources.yaml
@@ -15,7 +15,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
- namespace: foo
+ namespace: bar
spec:
replicas: 3
---
@@ -23,6 +23,6 @@ apiVersion: custom.io/v1
kind: Custom
metadata:
name: custom
- namespace: foo
+ namespace: bar
spec:
image: nginx:1.2.3
1 change: 1 addition & 0 deletions e2e/testdata/fn-render/exec-function-stderr/.krmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.expected
7 changes: 7 additions & 0 deletions e2e/testdata/fn-render/exec-function-stderr/Kptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kpt.dev/v1
kind: Kptfile
metadata:
name: app
pipeline:
mutators:
- exec: "./testdata/fn-render/exec-function-stderr/function.sh"
Loading

0 comments on commit aa29f77

Please sign in to comment.