kind: Deployment
apiVersion: apps/v1
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:
      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
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: IfNotPresent
          livenessProbe:
            httpGet:
              path: /healthcheck
              port: 1234
          readinessProbe:
            httpGet:
              path: /healthcheck
              port: 1234
          securityContext:
            privileged: false
      serviceAccountName: component-orchestrator-account
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
