apiVersion: apps/v1
kind: Deployment
metadata:
  name: server-deployment
spec:
  replicas: 1
  revisionHistoryLimit: 2
  selector:
    matchLabels:
     component: server
  template:
    metadata:
      labels:
        component: server
    spec:
      containers:
        - name: server
          image: ogonommo/api:1.0.1
          ports:
            - containerPort: 5000
          env:
            - name: DBUSER
              value: root
            - name: DB_DB
              value: quotes
            - name: DBPASSWORD
              valueFrom:
                secretKeyRef:
                  name: mysqlrootpassword
                  key: MYSQLROOTPASSWORD
            - name: DBPORT
              value: "3306"
            - name: DBHOST
              value: mariadb-service
