github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/e2e/testdata/fn-render/subpkg-resource-deletion/.expected/diff.patch (about)

     1  diff --git a/Kptfile b/Kptfile
     2  index 6d53889..b36c49f 100644
     3  --- a/Kptfile
     4  +++ b/Kptfile
     5  @@ -2,6 +2,9 @@ apiVersion: kpt.dev/v1
     6   kind: Kptfile
     7   metadata:
     8     name: app
     9  +  namespace: staging
    10  +  labels:
    11  +    tier: backend
    12   pipeline:
    13     mutators:
    14       - image: gcr.io/kpt-fn/starlark:v0.2.1
    15  diff --git a/db/Kptfile b/db/Kptfile
    16  index 6dc9479..0aedfe5 100644
    17  --- a/db/Kptfile
    18  +++ b/db/Kptfile
    19  @@ -2,6 +2,10 @@ apiVersion: kpt.dev/v1
    20   kind: Kptfile
    21   metadata:
    22     name: db
    23  +  namespace: staging
    24  +  labels:
    25  +    app: backend
    26  +    tier: backend
    27   pipeline:
    28     mutators:
    29       - image: gcr.io/kpt-fn/starlark:v0.2.1
    30  diff --git a/db/resources.yaml b/db/resources.yaml
    31  index 2270171..9dabb18 100644
    32  --- a/db/resources.yaml
    33  +++ b/db/resources.yaml
    34  @@ -1,26 +1,10 @@
    35  -# Copyright 2021 Google LLC
    36  -#
    37  -# Licensed under the Apache License, Version 2.0 (the "License");
    38  -# you may not use this file except in compliance with the License.
    39  -# You may obtain a copy of the License at
    40  -#
    41  -#      http://www.apache.org/licenses/LICENSE-2.0
    42  -#
    43  -# Unless required by applicable law or agreed to in writing, software
    44  -# distributed under the License is distributed on an "AS IS" BASIS,
    45  -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    46  -# See the License for the specific language governing permissions and
    47  -# limitations under the License.
    48  -apiVersion: apps/v1
    49  -kind: StatefulSet
    50  -metadata:
    51  -  name: db
    52  -spec:
    53  -  replicas: 3
    54  ----
    55   apiVersion: custom.io/v1
    56   kind: Custom
    57   metadata:
    58     name: custom
    59  +  namespace: staging
    60  +  labels:
    61  +    app: backend
    62  +    tier: backend
    63   spec:
    64     image: nginx:1.2.3
    65  diff --git a/db/statefulset-filter.yaml b/db/statefulset-filter.yaml
    66  index 7d006a8..155b19f 100644
    67  --- a/db/statefulset-filter.yaml
    68  +++ b/db/statefulset-filter.yaml
    69  @@ -15,6 +15,10 @@ apiVersion: fn.kpt.dev/v1alpha1
    70   kind: StarlarkRun
    71   metadata:
    72     name: statefulset-filter
    73  +  namespace: staging
    74  +  labels:
    75  +    app: backend
    76  +    tier: backend
    77   source: |
    78     # filter to return if resource is statefulset kind
    79     def isStatefulSet(r):
    80  diff --git a/deployment_httpbin.yaml b/deployment_httpbin.yaml
    81  deleted file mode 100644
    82  index 44bfc6b..0000000
    83  --- a/deployment_httpbin.yaml
    84  +++ /dev/null
    85  @@ -1,36 +0,0 @@
    86  -# Copyright 2021 Google LLC
    87  -#
    88  -# Licensed under the Apache License, Version 2.0 (the "License");
    89  -# you may not use this file except in compliance with the License.
    90  -# You may obtain a copy of the License at
    91  -#
    92  -#      http://www.apache.org/licenses/LICENSE-2.0
    93  -#
    94  -# Unless required by applicable law or agreed to in writing, software
    95  -# distributed under the License is distributed on an "AS IS" BASIS,
    96  -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    97  -# See the License for the specific language governing permissions and
    98  -# limitations under the License.
    99  -apiVersion: apps/v1
   100  -kind: Deployment
   101  -metadata:
   102  -  name: httpbin
   103  -  namespace: staging
   104  -  labels:
   105  -    app: backend
   106  -    tier: db
   107  -spec:
   108  -  replicas: 4
   109  -  selector:
   110  -    matchLabels:
   111  -      app: backend
   112  -      tier: db
   113  -  template:
   114  -    metadata:
   115  -      labels:
   116  -        app: backend
   117  -        tier: db
   118  -    spec:
   119  -      containers:
   120  -        - name: httpbin
   121  -          image: kennethreitz/httpbin
   122  diff --git a/resources.yaml b/resources.yaml
   123  index 6590f6c..b5b54e0 100644
   124  --- a/resources.yaml
   125  +++ b/resources.yaml
   126  @@ -15,5 +15,15 @@ apiVersion: apps/v1
   127   kind: Deployment
   128   metadata:
   129     name: nginx-deployment
   130  +  namespace: staging
   131  +  labels:
   132  +    tier: backend
   133   spec:
   134     replicas: 3
   135  +  selector:
   136  +    matchLabels:
   137  +      tier: backend
   138  +  template:
   139  +    metadata:
   140  +      labels:
   141  +        tier: backend
   142  diff --git a/starlark-httpbin.yaml b/starlark-httpbin.yaml
   143  index 3de07cf..0d96dee 100644
   144  --- a/starlark-httpbin.yaml
   145  +++ b/starlark-httpbin.yaml
   146  @@ -15,6 +15,9 @@ apiVersion: fn.kpt.dev/v1alpha1
   147   kind: StarlarkRun
   148   metadata:
   149     name: httpbin-gen
   150  +  namespace: staging
   151  +  labels:
   152  +    tier: backend
   153   source: |
   154     # filter to return if resource is HTTPBin resource
   155     def isHTTPBin(r):