File tree Expand file tree Collapse file tree 14 files changed +391
-7
lines changed
fn-eval/krm-check-exclude-kustomize
fn-render/krm-check-exclude-kustomize Expand file tree Collapse file tree 14 files changed +391
-7
lines changed Original file line number Diff line number Diff line change
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 : gcr.io/kpt-fn/set-labels:v0.1
17
+ args :
18
+ tier : backend
Original file line number Diff line number Diff line change
1
+ diff --git a/kustomization.yaml b/kustomization.yaml
2
+ index f91c46a..94769e0 100644
3
+ --- a/kustomization.yaml
4
+ +++ b/kustomization.yaml
5
+ @@ -11,7 +11,9 @@
6
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7
+ # See the License for the specific language governing permissions and
8
+ # limitations under the License.
9
+ -
10
+ # kustomization.yaml contents
11
+ resources:
12
+ - resources.yaml
13
+ + metadata:
14
+ + labels:
15
+ + tier: backend
16
+ diff --git a/resources.yaml b/resources.yaml
17
+ index f6f4685..b11c929 100644
18
+ --- a/resources.yaml
19
+ +++ b/resources.yaml
20
+ @@ -15,12 +15,23 @@ apiVersion: apps/v1
21
+ kind: Deployment
22
+ metadata:
23
+ name: nginx-deployment
24
+ + labels:
25
+ + tier: backend
26
+ spec:
27
+ replicas: 3
28
+ + selector:
29
+ + matchLabels:
30
+ + tier: backend
31
+ + template:
32
+ + metadata:
33
+ + labels:
34
+ + tier: backend
35
+ ---
36
+ apiVersion: custom.io/v1
37
+ kind: Custom
38
+ metadata:
39
+ name: custom
40
+ + labels:
41
+ + tier: backend
42
+ spec:
43
+ image: nginx:1.2.3 # kpt-set: {something}
Original file line number Diff line number Diff line change
1
+ .expected
Original file line number Diff line number Diff line change
1
+ apiVersion: kpt.dev/v1
2
+ kind: Kptfile
3
+ metadata:
4
+ name: app
5
+ pipeline:
6
+ mutators:
7
+ - image: set-labels:v0.1
8
+ configMap:
9
+ tier: backend
Original file line number Diff line number Diff line change
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
+ # kustomization.yaml contents
16
+ resources :
17
+ - resources.yaml
Original file line number Diff line number Diff line change
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 # kpt-set: {something}
Original file line number Diff line number Diff line change
1
+ diff --git a/kustomization.yaml b/kustomization.yaml
2
+ index f91c46a..94769e0 100644
3
+ --- a/kustomization.yaml
4
+ +++ b/kustomization.yaml
5
+ @@ -11,7 +11,9 @@
6
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7
+ # See the License for the specific language governing permissions and
8
+ # limitations under the License.
9
+ -
10
+ # kustomization.yaml contents
11
+ resources:
12
+ - resources.yaml
13
+ + metadata:
14
+ + labels:
15
+ + tier: backend
16
+ diff --git a/resources.yaml b/resources.yaml
17
+ index f6f4685..b11c929 100644
18
+ --- a/resources.yaml
19
+ +++ b/resources.yaml
20
+ @@ -15,12 +15,23 @@ apiVersion: apps/v1
21
+ kind: Deployment
22
+ metadata:
23
+ name: nginx-deployment
24
+ + labels:
25
+ + tier: backend
26
+ spec:
27
+ replicas: 3
28
+ + selector:
29
+ + matchLabels:
30
+ + tier: backend
31
+ + template:
32
+ + metadata:
33
+ + labels:
34
+ + tier: backend
35
+ ---
36
+ apiVersion: custom.io/v1
37
+ kind: Custom
38
+ metadata:
39
+ name: custom
40
+ + labels:
41
+ + tier: backend
42
+ spec:
43
+ image: nginx:1.2.3 # kpt-set: {something}
Original file line number Diff line number Diff line change
1
+ apiVersion: kpt.dev/v1
2
+ kind: Kptfile
3
+ metadata:
4
+ name: app
5
+ pipeline:
6
+ mutators:
7
+ - image: set-labels:v0.1
8
+ configMap:
9
+ tier: backend
Original file line number Diff line number Diff line change
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
+ # kustomization.yaml contents
16
+ resources :
17
+ - resources.yaml
Original file line number Diff line number Diff line change
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 # kpt-set: {something}
You can’t perform that action at this time.
0 commit comments