apiVersion: apps/v1
kind: Deployment
metadata:
  name: webhooks
  namespace: oih-dev-ns
  labels:
    app: webhooks
spec:
  replicas: 1
  selector:
    matchLabels:
      app: webhooks
  template:
    metadata:
      name: webhooks
      labels:
        app: webhooks
    spec:
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      serviceAccountName: component-orchestrator-account
      containers:
      - name: webhooks
        image: "openintegrationhub/webhooks:latest"
        env:
        - name: MONGODB_URI
          valueFrom:
            secretKeyRef:
              name: shared-secret
              key: webhooksMongourl
        - name: RABBITMQ_URI
          value: >-
            amqp://guest:guest@rabbitmq-service.oih-dev-ns.svc.cluster.local
        - name: LISTEN_PORT
          value: "1234"
        - name: LOG_LEVEL
          value: trace
        - name: CORS_ORIGIN_WHITELIST
          value: localoih.com,http://web-ui.localoih.com
        livenessProbe:
          httpGet:
            port: 1234
            path: /healthcheck
        readinessProbe:
          httpGet:
            port: 1234
            path: /healthcheck
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        imagePullPolicy: IfNotPresent
        securityContext:
          privileged: false
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
