apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment
  labels:
    component: server
spec:
  replicas: 1
  selector:
    matchLabels:
      component: server
  template:
    metadata:
      labels:
        component: server
    spec:
      containers:
      - name: container
        envFrom:
          - configMapRef:
              name: metadata-db-parameters
          - secretRef:
              name: metadata-db-secrets
        command: ["./server/server",
                  "--http_port=8080",
                  "--mysql_service_host=$(MYSQL_HOST)",
                  "--mlmd_db_name=$(MYSQL_DATABASE)",
                  "--mysql_service_port=$(MYSQL_PORT)",
                  "--mysql_service_user=$(MYSQL_USERNAME)",
                  "--mysql_service_password=$(MYSQL_PASSWORD)"]