apiVersion: apps/v1
kind: Deployment
metadata:
  name: webrandomizer-deployment
  labels:
    app: webrandomizer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: webrandomizer
  template:
    metadata:
      labels:
        app: webrandomizer
    spec:
      containers:
      - name: webrandomizer
        image: tewtal/webrandomizer:latest
        ports:
        - containerPort: 80
        env:
        - name: ConnectionStrings__PostgresConnection
          valueFrom:
            secretKeyRef:
              name: webrandomizer-dbconfig
              key: connectionstring
        imagePullPolicy: Always
