Skip to content

Commit

Permalink
Generator with subpackages (#2095)
Browse files Browse the repository at this point in the history
  • Loading branch information
phanimarupaka authored May 25, 2021
1 parent aae8da6 commit a02d902
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 0 deletions.
25 changes: 25 additions & 0 deletions e2e/testdata/fn-render/generator-subpkgs/.expected/diff.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/db/configmap_db-map.yaml b/db/configmap_db-map.yaml
new file mode 100644
index 0000000..7a0f3af
--- /dev/null
+++ b/db/configmap_db-map.yaml
@@ -0,0 +1,6 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: db-map
+data:
+ db-key: db-value
diff --git a/def/configmap_parent-map.yaml b/def/configmap_parent-map.yaml
new file mode 100644
index 0000000..fd1e17d
--- /dev/null
+++ b/def/configmap_parent-map.yaml
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: parent-map
+ namespace: def
+data:
+ parent-key: parent-value
1 change: 1 addition & 0 deletions e2e/testdata/fn-render/generator-subpkgs/.krmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.expected
8 changes: 8 additions & 0 deletions e2e/testdata/fn-render/generator-subpkgs/Kptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kpt.dev/v1alpha2
kind: Kptfile
metadata:
name: app-with-generator
pipeline:
mutators:
- image: gcr.io/kpt-fn/upsert-resource:unstable
configPath: fn-config.yaml
8 changes: 8 additions & 0 deletions e2e/testdata/fn-render/generator-subpkgs/db/Kptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kpt.dev/v1alpha2
kind: Kptfile
metadata:
name: db
pipeline:
mutators:
- image: gcr.io/kpt-fn/upsert-resource:unstable
configPath: fn-config.yaml
6 changes: 6 additions & 0 deletions e2e/testdata/fn-render/generator-subpkgs/db/fn-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: db-map
data:
db-key: db-value
19 changes: 19 additions & 0 deletions e2e/testdata/fn-render/generator-subpkgs/db/resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: db
spec:
replicas: 3
7 changes: 7 additions & 0 deletions e2e/testdata/fn-render/generator-subpkgs/fn-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: parent-map
namespace: def
data:
parent-key: parent-value
26 changes: 26 additions & 0 deletions e2e/testdata/fn-render/generator-subpkgs/resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
---
apiVersion: custom.io/v1
kind: Custom
metadata:
name: custom
spec:
image: nginx:1.2.3

0 comments on commit a02d902

Please sign in to comment.