github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/e2e/testdata/fn-render/resource-has-pkgname-prefix/mysql/mysql-deployment.yaml (about)

     1  # Copyright 2019 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: v1
    15  kind: Service
    16  metadata:
    17    name: wordpress-mysql
    18    labels:
    19      app: wordpress
    20    annotations:
    21      projectId: 'PROJECT_ID' # kpt-set: ${gcloud.core.project}
    22      teamname: 'YOURTEAM' # kpt-set: ${teamname}
    23  spec:
    24    selector:
    25      app: wordpress
    26      tier: mysql
    27    ports:
    28      - port: 3306
    29    clusterIP: None
    30  ---
    31  apiVersion: v1
    32  kind: PersistentVolumeClaim
    33  metadata:
    34    name: mysql-pv-claim
    35    labels:
    36      app: wordpress
    37    annotations:
    38      projectId: 'PROJECT_ID' # kpt-set: ${gcloud.core.project}
    39      teamname: 'YOURTEAM' # kpt-set: ${teamname}
    40  spec:
    41    resources:
    42      requests:
    43        storage: 20Gi
    44    accessModes:
    45      - ReadWriteOnce
    46  ---
    47  apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
    48  kind: Deployment
    49  metadata:
    50    name: wordpress-mysql
    51    labels:
    52      app: wordpress
    53    annotations:
    54      projectId: 'PROJECT_ID' # kpt-set: ${gcloud.core.project}
    55      teamname: 'YOURTEAM' # kpt-set: ${teamname}
    56  spec:
    57    selector:
    58      matchLabels:
    59        app: wordpress
    60        tier: mysql
    61    template:
    62      metadata:
    63        labels:
    64          app: wordpress
    65          tier: mysql
    66      spec:
    67        containers:
    68          - name: mysql
    69            image: mysql:5.6 # kpt-set: ${ms-image}:${ms-tag}
    70            ports:
    71              - name: mysql
    72                containerPort: 3306
    73            env:
    74              - name: MYSQL_ROOT_PASSWORD
    75                valueFrom:
    76                  secretKeyRef:
    77                    name: mysql-pass
    78                    key: password
    79            volumeMounts:
    80              - name: mysql-persistent-storage
    81                mountPath: /var/lib/mysql
    82        volumes:
    83          - name: mysql-persistent-storage
    84            persistentVolumeClaim:
    85              claimName: mysql-pv-claim
    86    strategy:
    87      type: Recreate