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

---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: hub-router
spec:
  replicas: 1
  selector:
    matchLabels:
      app: router
      group: core
      component: hub-router
  template:
    metadata:
      labels:
        app: router
        group: core
        component: hub-router
    spec:
      imagePullSecrets:
      - name: wallet-github-regcred
      containers:
      - name: router
        envFrom:
          - configMapRef:
              name: router-env
          - secretRef:
              name: router-env-secret
        image: hub-router:latest
        args: ["start"]
        ports:
          - containerPort: 8081
            protocol: TCP
            name: http-port
          - containerPort: 8082
            protocol: TCP
            name: ws-port
          - containerPort: 8083
            protocol: TCP
            name: api-port
        livenessProbe:
          httpGet:
            path: /healthcheck
            port: http-port
          initialDelaySeconds: 30
          periodSeconds: 10
          failureThreshold: 5
