apiVersion: apps/v1
kind: Deployment
metadata:
  name: docker-training-samples-micro-sinatra
  labels:
    app: docker-training-samples-micro-sinatra
spec:
  replicas: 1
  selector:
    matchLabels:
      app: docker-training-samples-micro-sinatra
  template:
    metadata:
      labels:
        app: docker-training-samples-micro-sinatra
    spec:
      containers:
      - name: docker-training-samples-micro-sinatra
        image: 2hog/docker-training-samples-micro-sinatra
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 4567
          protocol: TCP
        env:
        - name: AUTH_USER
          valueFrom:
            secretKeyRef:
              name: docker-training-samples-micro-sinatra-secret
              key: auth_user
        - name: AUTH_PASSWORD
          valueFrom:
            secretKeyRef:
              name: docker-training-samples-micro-sinatra-secret
              key: auth_password
