apiVersion: apps/v1
kind: Deployment
metadata:
  name: spring-petclinic
spec:
  replicas: 1
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      app: spring-petclinic
  template:
    metadata:
      labels:
        app: spring-petclinic
    spec:
      containers:
        - name: spring-petclinic
          image: kevinvmware/spring-petclinic:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
          env:
            - name: MYSQL_ROOT_PASSWORD
              value: petclinic
            - name: MYSQL_DATABASE
              value: petclinic
            - name: SPRING_PROFILES_ACTIVE
              value: mysql
