apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: webapp
  name: webapp
spec:
  replicas: 1
  selector:
    matchLabels:
      app: webapp
  template:
    metadata:
      labels:
        app: webapp
    spec:
      imagePullSecrets:
        - name: regcred
      containers:
        - image: ${DOCKER_REGISTRY}/${IMAGE_NAME_WEBAPP}:${VERSION}
          imagePullPolicy: 'Always'
          name: webapp
          envFrom:
            - configMapRef:
                name: webapp-config
          ports:
            - containerPort: 80
      restartPolicy: Always
