Skip to content

Commit 06adff5

Browse files
Default to gcr.io/kpt-fn/ (#2126)
* Default to gcr.io/kpt-fn/ * reference docs * Update tests * Extend to render and fndoc * Add new tests * Update book and package examples docs * Delete helloworld examples * Rebase updates * Rename examples * Fully resolved path for results display * Update render docs * Update e2e tests for eval and render * Move the call up in stack * Short hand for --include-meta-resources * Move call to container.go * Suggested changes * generate docs * Update eval tests * Changes
1 parent cb43796 commit 06adff5

File tree

25 files changed

+254
-40
lines changed

25 files changed

+254
-40
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
testType: eval
16+
image: set-namespace:v0.1.3
17+
args:
18+
namespace: staging
19+
stdErr: |
20+
[RUNNING] "gcr.io/kpt-fn/set-namespace:v0.1.3"
21+
[PASS] "gcr.io/kpt-fn/set-namespace:v0.1.3"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/resources.yaml b/resources.yaml
2+
index 7a494c9..254b9cd 100644
3+
--- a/resources.yaml
4+
+++ b/resources.yaml
5+
@@ -15,6 +15,7 @@ apiVersion: apps/v1
6+
kind: Deployment
7+
metadata:
8+
name: nginx-deployment
9+
+ namespace: staging
10+
spec:
11+
replicas: 3
12+
---
13+
@@ -22,5 +23,6 @@ apiVersion: custom.io/v1
14+
kind: Custom
15+
metadata:
16+
name: custom
17+
+ namespace: staging
18+
spec:
19+
image: nginx:1.2.3
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: kpt.dev/v1
2+
kind: FunctionResultList
3+
metadata:
4+
name: fnresults
5+
exitCode: 0
6+
items:
7+
- image: gcr.io/kpt-fn/set-namespace:v0.1.3
8+
exitCode: 0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.expected
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
apiVersion: apps/v1
15+
kind: Deployment
16+
metadata:
17+
name: nginx-deployment
18+
spec:
19+
replicas: 3
20+
---
21+
apiVersion: custom.io/v1
22+
kind: Custom
23+
metadata:
24+
name: custom
25+
spec:
26+
image: nginx:1.2.3
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
stdErr: |
16+
[RUNNING] "gcr.io/kpt-fn/set-namespace:v0.1.3"
17+
[PASS] "gcr.io/kpt-fn/set-namespace:v0.1.3"
18+
[RUNNING] "gcr.io/kpt-fn/set-labels:v0.1.4"
19+
[PASS] "gcr.io/kpt-fn/set-labels:v0.1.4"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
diff --git a/resources.yaml b/resources.yaml
2+
index 7a494c9..a9dd224 100644
3+
--- a/resources.yaml
4+
+++ b/resources.yaml
5+
@@ -15,12 +15,25 @@ apiVersion: apps/v1
6+
kind: Deployment
7+
metadata:
8+
name: nginx-deployment
9+
+ namespace: staging
10+
+ labels:
11+
+ tier: backend
12+
spec:
13+
replicas: 3
14+
+ selector:
15+
+ matchLabels:
16+
+ tier: backend
17+
+ template:
18+
+ metadata:
19+
+ labels:
20+
+ tier: backend
21+
---
22+
apiVersion: custom.io/v1
23+
kind: Custom
24+
metadata:
25+
name: custom
26+
+ namespace: staging
27+
+ labels:
28+
+ tier: backend
29+
spec:
30+
image: nginx:1.2.3
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: kpt.dev/v1
2+
kind: FunctionResultList
3+
metadata:
4+
name: fnresults
5+
exitCode: 0
6+
items:
7+
- image: gcr.io/kpt-fn/set-namespace:v0.1.3
8+
exitCode: 0
9+
- image: gcr.io/kpt-fn/set-labels:v0.1.4
10+
exitCode: 0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.expected
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: kpt.dev/v1
2+
kind: Kptfile
3+
metadata:
4+
name: app
5+
pipeline:
6+
mutators:
7+
- image: set-namespace:v0.1.3
8+
configMap:
9+
namespace: staging
10+
- image: set-labels:v0.1.4
11+
configMap:
12+
tier: backend

0 commit comments

Comments
 (0)