apiVersion: apps/v1
kind: Deployment
metadata:
  name: perceptiaone-deployment
  labels:
    label.perceptia.info/name: perceptiaone
    label.perceptia.info/instance: perceptiaone-1
    label.perceptia.info/version: "0.2.0"
    label.perceptia.info/managed-by: kubectl
    label.perceptia.info/component: server
    label.perceptia.info/type: frontend
    label.perceptia.info/release: '0.3.1'
    label.perceptia.info/part-of: perceptia-web
spec:
  replicas: 1
  selector:
    matchLabels:
      app: perceptiaone
  template:
    metadata:
      labels:
        app: perceptiaone
        label.perceptia.info/name: perceptiaone
        label.perceptia.info/instance: perceptiaone-1
        label.perceptia.info/version: "0.2.0"
        label.perceptia.info/managed-by: kubectl
        label.perceptia.info/component: server
        label.perceptia.info/type: frontend
        label.perceptia.info/release: '0.3.1'
        label.perceptia.info/part-of: perceptia-web
    spec:
      containers:
      - name: perceptiaone
        image: uwthalesians/perceptiaone:0.2.0-build-477-branch-master
        ports:
        - name: https
          containerPort: 443
        - name: http
          containerPort: 80
        env:
          - name: PONE_TLS_CERT
            value: "tls.crt"
          - name: PONE_TLS_KEY
            value: "tls.key"
          - name: PONE_SERVER_HOST
            valueFrom:
              secretKeyRef:
                name: perceptiaone
                key: server-host
        volumeMounts:
          - name: "encrypt"
            mountPath: "/etc/sitecert"
            readOnly: true
        resources:
          limits:
            cpu: 200m
            memory: 1Gi
      volumes:
        - name: "encrypt"
          secret:
            secretName: web-tls  