apiVersion: apps/v1
kind: Deployment
metadata:
  name: trips
  labels:
    app: trips
spec:
  replicas: 1
  selector:
    matchLabels:
      app: trips
  template:
    metadata:
      labels:
        app: trips
    spec:
      containers:
      - name: trips-image
        image: registryvxg9504.azurecr.io/trips:1.0
        env:
          - name: SQL_USER
            valueFrom:
             secretKeyRef:
              name: secret-openhack
              key: sql_user
          - name: SQL_SERVER
            value: sqlservervxg9504.database.windows.net
          - name: SQL_DBNAME
            value: mydrivingDB
          - name: SQL_PASSWORD
            valueFrom:
             secretKeyRef:
              name: secret-openhack
              key: sql_password
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
      imagePullSecrets:
       - name: openhack-docker-reg

    