apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    description: BitcoinCash Test
  labels:
    app: bitcoin-cash-test
    environment: Development
    tier: Service
  name: bitcoin-cash-test
  namespace: sirius-integrations
spec:
  revisionHistoryLimit: 1
  minReadySeconds: 10
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
  replicas: 1
  selector:
    matchLabels:
      app: bitcoin-cash-test
  template:
    metadata:
      labels:
        app: bitcoin-cash-test
      name: bitcoin-cash-test
    spec:
      containers:
      - name: bitcoin-cash-test
        image: docker.io/swisschains/sirius-integrations-bitcoin-cash:1.0.0
        imagePullPolicy: Always
        lifecycle:
          postStart:
            exec:
             command:
             - /bin/sh
             - -c 
             - "/bin/echo 'options single-request-reopen' >> /etc/resolv.conf"
        ports:
        - containerPort: 5000
        - containerPort: 5001
        readinessProbe:
          httpGet:
            path: /api/isalive
            port: 5000
          initialDelaySeconds: 40
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /api/isalive
            port: 5000
          initialDelaySeconds: 40
          periodSeconds: 20
        resources:
          requests:
            memory: 128Mi
            cpu: 100m
          limits:
            memory: 512Mi
            cpu: 700m
        env:
        - name: RemoteSettingsUrls__0 
          value: "http://settings.sirius.svc.cluster.local/common"
        - name: RemoteSettingsUrls__1
          value: "http://settings.sirius.svc.cluster.local/sirius-integrations/common"
        - name: RemoteSettingsUrls__2
          value: "http://settings.sirius.svc.cluster.local/sirius-integrations/bitcoin-cash-test"
      tolerations:
       - effect: NoSchedule
         operator: Exists
      nodeSelector:
        agentpool: sirintegrat
