# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sqvs-deployment
  namespace: isecl
  labels:
    env: demo
    app: sqvs
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sqvs
  template:
    metadata:
      labels:
        app: sqvs
    spec:
      securityContext:
        fsGroup: 1001
      containers:
        - name: sqvs
          image: <image-name>:<tag>
          imagePullPolicy: Always
          securityContext:
            runAsUser: 1001
            runAsGroup: 1001
          ports:
            - containerPort: 12000
          envFrom:
            - configMapRef:
                name: sqvs-config
          volumeMounts:
            - name: sqvs-config-volume
              mountPath: /etc/sqvs/
            - name: sqvs-logs-volume
              mountPath: /var/log/sqvs/
            - mountPath: /etc/secret-volume/
              name: sqvs-credentials
              readOnly: true
            - name: trusted-rootca
              mountPath: /tmp/
      volumes:
        - name: sqvs-logs-volume
          persistentVolumeClaim:
            claimName: sqvs-logs-pvc
        - name: sqvs-config-volume
          persistentVolumeClaim:
            claimName: sqvs-config-pvc
        - name: sqvs-credentials
          secret:
              secretName: sqvs-secret
        - name: trusted-rootca
          secret:
              secretName: sqvs-trusted-rootca

