Skip to content
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

Fix test #2129

Merged
merged 3 commits into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.

testType: eval
image: gcr.io/kpt-fn/starlark:unstable
image: gcr.io/kpt-fn/starlark:v0.1.0
fnConfig: ../../starlark-delete-resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
includeMetaResources: true
args:
namespace: staging
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/Kptfile b/Kptfile
index 74670e7..154c558 100644
index fa1bd2d..dd352a8 100644
--- a/Kptfile
+++ b/Kptfile
@@ -2,16 +2,7 @@ apiVersion: kpt.dev/v1alpha2
Expand Down Expand Up @@ -36,7 +36,7 @@ index 74670e7..154c558 100644
+ man: nginx man text
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-namespace:v0.1
- image: gcr.io/kpt-fn/set-namespace:v0.1.3
diff --git a/resources.yaml b/resources.yaml
index c0f48b0..9e31a48 100644
--- a/resources.yaml
Expand Down Expand Up @@ -66,4 +66,4 @@ index c0f48b0..9e31a48 100644
+ image: nginx:1.14.2
+ ports:
+ - protocol: TCP
+ containerPort: 80
+ containerPort: 80
6 changes: 3 additions & 3 deletions e2e/testdata/fn-eval/consistent-formatting/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ upstreamLock:
commit: 4d2aa98b45ddee4b5fa45fbca16f2ff887de9efb
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-namespace:v0.1
- image: gcr.io/kpt-fn/set-namespace:v0.1.3
configMap:
namespace: some-space
- image: gcr.io/kpt-fn/apply-setters:v0.1
configMap:
image: nginx
tag: 1.14.1
- image: gcr.io/kpt-fn/set-labels:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1.4
configPath: ./fn-config.yaml
- image: gcr.io/kpt-fn/starlark:v0.1
- image: gcr.io/kpt-fn/starlark:v0.1.0
configPath: path/to/foo-star.yaml
inventory:
namespace: some-space
Expand Down
4 changes: 2 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 @@ -14,11 +14,11 @@

exitCode: 1
stdErr: |2-
[FAIL] "gcr.io/kpt-fn/set-namespace:v0.1"
[FAIL] "gcr.io/kpt-fn/set-namespace:v0.1.3"
Results:
[ERROR] failed to configure function: input namespace cannot be empty
Stderr:
"failed to configure function: input namespace cannot be empty"
"[error] /// : failed to configure function: input namespace cannot be empty"
Exit code: 1


Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/error-in-pipe/.expected/exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
set -eo pipefail

kpt fn source \
| kpt fn eval - --image gcr.io/kpt-fn/set-namespace:v0.1 \
| kpt fn eval - --image gcr.io/kpt-fn/set-namespace:v0.1.3 \
| kpt fn eval - --image gcr.io/kpt-fn/dne -- foo=bar \
| kpt fn sink .
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# limitations under the License.

testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
args:
namespace: staging
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/exclude-fn-config-by-default/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: app
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1.4
configPath: labelconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@

runCount: 2
testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
args:
namespace: staging
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.

testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
fnConfig: ../config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.

testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
fnConfig: ../../config.yaml
4 changes: 2 additions & 2 deletions e2e/testdata/fn-eval/function-chain/.expected/exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
set -eo pipefail

kpt fn source \
| kpt fn eval - --image gcr.io/kpt-fn/set-namespace:v0.1 -- namespace=staging \
| kpt fn eval - --image gcr.io/kpt-fn/set-label:v0.1 -- foo=bar \
| kpt fn eval - --image gcr.io/kpt-fn/set-namespace:v0.1.3 -- namespace=staging \
| kpt fn eval - --image gcr.io/kpt-fn/set-labels:v0.1.4 -- foo=bar \
| kpt fn sink .
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

runCount: 2
testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
includeMetaResources: true
args:
namespace: staging
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

runCount: 2
testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
includeMetaResources: true
args:
namespace: staging
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/Kptfile b/Kptfile
index 9d7c639..7246298 100644
index 39dec05..47f7bf4 100644
--- a/Kptfile
+++ b/Kptfile
@@ -2,6 +2,7 @@ apiVersion: kpt.dev/v1alpha2
Expand All @@ -9,7 +9,7 @@ index 9d7c639..7246298 100644
+ namespace: staging
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1.4
diff --git a/labelconfig.yaml b/labelconfig.yaml
index 7ef9890..f3a8b49 100644
--- a/labelconfig.yaml
Expand Down Expand Up @@ -39,4 +39,4 @@ index 7a494c9..254b9cd 100644
name: custom
+ namespace: staging
spec:
image: nginx:1.2.3
image: nginx:1.2.3
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/include-meta-resources/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: app
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1.4
configPath: labelconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@

testType: eval
exitCode: 1
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
fnConfig: ../../config.yaml
stdErr: "wrong Node Kind for expected: MappingNode was ScalarNode: value: {I am not a valid config file}"
4 changes: 2 additions & 2 deletions e2e/testdata/fn-eval/missing-fn-config/.expected/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

testType: eval
exitCode: 1
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
stdErr: "failed to configure function: input namespace cannot be empty"
stdOut: |
[RUNNING] "gcr.io/kpt-fn/set-namespace:v0.1"
[RUNNING] "gcr.io/kpt-fn/set-namespace:v0.1.3"
4 changes: 2 additions & 2 deletions e2e/testdata/fn-eval/missing-fn-config/.expected/results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ metadata:
name: fnresults
exitCode: 1
items:
- image: gcr.io/kpt-fn/set-namespace:v0.1
stderr: 'failed to configure function: input namespace cannot be empty'
- image: gcr.io/kpt-fn/set-namespace:v0.1.3
stderr: '[error] /// : failed to configure function: input namespace cannot be empty'
exitCode: 1
results:
- message: 'failed to configure function: input namespace cannot be empty'
Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/out-of-place/.expected/exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -eo pipefail
TEMP_DIR=$(mktemp -d)

kpt fn source \
| kpt fn eval - --image gcr.io/kpt-fn/set-namespace:v0.1 -- namespace=staging \
| kpt fn eval - --image gcr.io/kpt-fn/set-namespace:v0.1.3 -- namespace=staging \
| kpt fn sink $TEMP_DIR

# copy back the resources
Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/output-to-stdout/.expected/exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
set -eo pipefail

kpt fn source |\
kpt fn eval - --image gcr.io/kpt-fn/set-namespace:v0.1 -- namespace=staging
kpt fn eval - --image gcr.io/kpt-fn/set-namespace:v0.1.3 -- namespace=staging
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
set -eo pipefail

kpt fn eval \
--image gcr.io/kpt-fn/kubeval:v0.1 \
--image gcr.io/kpt-fn/kubeval:v0.1.1 \
-- \
schema_location='https://kubernetesjsonschema.dev'
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
set -eo pipefail

kpt fn eval \
--image gcr.io/kpt-fn/kubeval:v0.1 \
--image gcr.io/kpt-fn/kubeval:v0.1.1 \
--network \
-- \
schema_location='https://kubernetesjsonschema.dev'
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mkdir -p "$SCHEMA_DIR"
curl -sSL 'https://kubernetesjsonschema.dev/master-standalone/configmap-v1.json' -o $SCHEMA_DIR/configmap-v1.json

kpt fn eval \
--image gcr.io/kpt-fn/kubeval:v0.1 \
--image gcr.io/kpt-fn/kubeval:v0.1.1 \
--as-current-user \
--mount type=bind,src=$(pwd)/schema,dst=/schema-dir \
-- \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.

testType: eval
image: gcr.io/kpt-fn/starlark:unstable
image: gcr.io/kpt-fn/starlark:v0.1.0
fnConfig: ../../starlark-delete-resource.yaml
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/simple-function/.expected/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# limitations under the License.

testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
args:
namespace: staging
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# limitations under the License.

testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
args:
namespace: staging
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: app
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1.4
configPath: labelconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: db
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:v0.1.4
configPath: labelconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

runCount: 2
testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
includeMetaResources: true
args:
namespace: staging
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/Kptfile b/Kptfile
index 9d7c639..7246298 100644
index 39dec05..47f7bf4 100644
--- a/Kptfile
+++ b/Kptfile
@@ -2,6 +2,7 @@ apiVersion: kpt.dev/v1alpha2
Expand All @@ -9,9 +9,9 @@ index 9d7c639..7246298 100644
+ namespace: staging
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1.4
diff --git a/db/Kptfile b/db/Kptfile
index 94a1416..64ade60 100644
index 268f438..ab19d9f 100644
--- a/db/Kptfile
+++ b/db/Kptfile
@@ -2,6 +2,7 @@ apiVersion: kpt.dev/v1alpha2
Expand All @@ -21,7 +21,7 @@ index 94a1416..64ade60 100644
+ namespace: staging
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:v0.1.4
diff --git a/db/labelconfig.yaml b/db/labelconfig.yaml
index fec6885..b7b0335 100644
--- a/db/labelconfig.yaml
Expand Down Expand Up @@ -73,4 +73,4 @@ index 7a494c9..254b9cd 100644
name: custom
+ namespace: staging
spec:
image: nginx:1.2.3
image: nginx:1.2.3
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/subpkg-include-meta-resources/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: app
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1.4
configPath: labelconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: db
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:v0.1.4
configPath: labelconfig.yaml
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/subpkgs/.expected/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# limitations under the License.

testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
image: gcr.io/kpt-fn/set-namespace:v0.1.3
args:
namespace: staging
6 changes: 3 additions & 3 deletions e2e/testdata/fn-render/all-resource-deletion/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
name: app
pipeline:
mutators:
- image: gcr.io/kpt-fn/starlark:unstable
- image: gcr.io/kpt-fn/starlark:v0.1.0
configPath: delete-all.yaml
- image: gcr.io/kpt-fn/set-namespace:unstable
- image: gcr.io/kpt-fn/set-namespace:v0.1.3
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:v0.1.4
configMap:
tier: backend
4 changes: 2 additions & 2 deletions e2e/testdata/fn-render/basicpipeline/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ metadata:
name: app
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-namespace:unstable
- image: gcr.io/kpt-fn/set-namespace:v0.1.3
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:v0.1.4
configMap:
tier: backend
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
# non-zero exit code and no changes in the resources.
exitCode: 1
disableOutputTruncate: true
stdErr: "Invalid type. Expected: [integer,null], given: string in object 'apps/v1/Deployment//nginx-deployment' in file resources.yaml in field spec.replicas"
stdErr: '[ERROR] Invalid type. Expected: [integer,null], given: string in object "apps/v1/Deployment/nginx-deployment" in file "resources.yaml" in field "spec.replicas"'
stdOut: |
[RUNNING] "gcr.io/kpt-fn/kubeval:v0.1"
[RUNNING] "gcr.io/kpt-fn/kubeval:v0.1.1"
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ metadata:
name: app
pipeline:
mutators:
- image: gcr.io/kpt-fn/kubeval:v0.1
- image: gcr.io/kpt-fn/kubeval:v0.1.1
configMap:
strict: "true"
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/fn-failure/.expected/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
exitCode: 1
stdErr: "httpbin-gen:4:1: got newline, want primary expression"
stdOut: |
[RUNNING] "gcr.io/kpt-fn/starlark:unstable"
[RUNNING] "gcr.io/kpt-fn/starlark:v0.1.0"
Loading