#
# Copyright (c) 2012-2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
#   Red Hat, Inc. - initial API and implementation
#

---
apiVersion: v1
kind: List
items:
  - apiVersion: v1
    kind: Pod
    metadata:
      name: petclinic
      labels:
        app.kubernetes.io/name: petclinic
        app.kubernetes.io/component: webapp
        app.kubernetes.io/part-of: petclinic
    spec:
      containers:
        - name: server
          image: mariolet/petclinic
          ports:
            - containerPort: 8080
              protocol: TCP
          resources:
            limits:
              memory: 512Mi
  - apiVersion: v1
    kind: Pod
    metadata:
      name: mysql
      labels:
        app.kubernetes.io/name: mysql
        app.kubernetes.io/component: database
        app.kubernetes.io/part-of: petclinic
    spec:
      containers:
        - name: mysql
          image: centos/mysql-57-centos7
          env:
            - name: MYSQL_USER
              value: petclinic
            - name: MYSQL_PASSWORD
              value: petclinic
            - name: MYSQL_ROOT_PASSWORD
              value: petclinic
            - name: MYSQL_DATABASE
              value: petclinic
          ports:
            - containerPort: 3306
              protocol: TCP
          resources:
            limits:
              memory: 512Mi
  - apiVersion: v1
    kind: Pod
    metadata:
      name: withoutLabels
    spec:
      containers:
        - name: server
          imagePullPolicy: Always
          image: test/petclinic
          ports:
            - containerPort: 8080
              protocol: TCP
          resources:
            limits:
              memory: 512Mi
