kind: Deployment
apiVersion: apps/v1
metadata:
  name: component-orchestrator
  namespace: oih-dev-ns
  labels:
    app: component-orchestrator
spec:
  replicas: 1
  selector:
    matchLabels:
      app: component-orchestrator
  template:
    metadata:
      name: component-orchestrator
      labels:
        app: component-orchestrator
    spec:
      containers:
        - name: component-orchestrator
          image: "openintegrationhub/component-orchestrator:latest"
          env:
            - name: COMPONENT_REPOSITORY_BASE_URL
              value: "http://component-repository-service.oih-dev-ns.svc.cluster.local:1234"
            - name: SECRETS_SERVICE_BASE_URL
              value: "http://secret-service.oih-dev-ns.svc.cluster.local:3000/api/v1"
            - name: "INTROSPECT_ENDPOINT_BASIC"
              value: "http://iam.oih-dev-ns.svc.cluster.local:3099/api/v1/tokens/introspect"
            - name: IAM_TOKEN
              valueFrom:
                secretKeyRef:
                  name: shared-secret
                  key: iamtoken
            - name: LISTEN_PORT
              value: "1234"
            - name: LOG_LEVEL
              value: trace
            - name: MONGODB_URI
              valueFrom:
                secretKeyRef:
                  name: shared-secret
                  key: componentOrchestratorMongourl
            - name: RABBITMQ_URI
              value: >-
                amqp://guest:guest@rabbitmq-service.oih-dev-ns.svc.cluster.local
            - name: RABBITMQ_URI_FLOWS
              value: >-
                amqp://rabbitmq-service.oih-dev-ns.svc.cluster.local
            - name: RABBITMQ_MANAGEMENT_URI
              value: >-
                http://guest:guest@rabbitmq-service.oih-dev-ns.svc.cluster.local:15672/
            - name: SELF_URL
              value: "http://api-service.oih-dev-ns.svc.cluster.local"
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
          securityContext:
            privileged: false
          livenessProbe:
            httpGet:
              path: /healthcheck
              port: 1234
          readinessProbe:
            httpGet:
              path: /healthcheck
              port: 1234
      serviceAccountName: component-orchestrator-account
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
