#
# Copyright SecureKey Technologies Inc. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: kms
spec:
  replicas: 2
  selector:
    matchLabels:
      app: kms
  template:
    metadata:
      labels:
        app: kms
    spec:
      containers:
      - name: kms
        envFrom:
          - configMapRef:
              name: kms-env
          - secretRef:
              name: kms-env-secret
        image: kms:latest
        imagePullPolicy: IfNotPresent
        args: ["start"]
        ports:
          - containerPort: 8081
            protocol: TCP
            name: http-port
          - containerPort: 8091
            protocol: TCP
            name: prometheus
        livenessProbe:
          httpGet:
            path: /healthcheck
            port: http-port
          initialDelaySeconds: 30
          periodSeconds: 10
          failureThreshold: 5
