github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/e2e/testdata/fn-render/preserve-comments/resources.yaml (about)

     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: my-nginx
    18    namespace: my-space
    19    labels:
    20      env: dev
    21      foo: bar
    22  spec:
    23    # comment 1
    24    replicas: 3
    25    selector:
    26      # comment 2
    27      matchLabels: # comment 3
    28        # comment 4
    29        app: nginx # comment 5
    30    template:
    31      metadata:
    32        labels:
    33          app: nginx
    34      spec:
    35        # comment 6
    36        containers:
    37          # comment 7
    38          - name: nginx
    39            image: nginx:1.14.2 # comment 8
    40            ports:
    41              # comment 9
    42              - containerPort: 80 # comment 10
    43  ---
    44  apiVersion: v1
    45  kind: Service
    46  metadata:
    47    name: my-service
    48  spec:
    49    ports:
    50      # comment 1
    51      - name: etcd-server-ssl
    52        port: 2380
    53      # comment 2
    54      - name: etcd-client-ssl
    55        port: 2379
    56  ---
    57  apiVersion: constraints.gatekeeper.sh/v1beta1
    58  kind: EnforceFoo
    59  metadata:
    60    name: enforce-foo
    61  spec:
    62    parameters:
    63      naming_rules:
    64        - kind: Folder
    65          patterns:
    66            # comment 1
    67            - ^(dev|prod|staging|qa|shared)$