Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-7373

[SW] Add custom function knative

    XMLWordPrintable

Details

    • 2022 Week 44-46 (from Oct 31), 2022 Week 47-49 (from Nov 21), 2022 Week 50-02 (from Dec 12), 2023 Week 03-05 (from Jan 16), 2023 Week 06-08 (from Feb 6), 2023 Week 09-11 (from Feb 27)

    Description

      Knative/Kubernetes resources such as KN Service, Service, Ingress, Deployment, Pods, and so on (see: https://github.com/knative/specs/blob/main/specs/eventing/overview.md#addressable) can be called by a regular HTTP POST request.

      This means that SW could support this feature out of the box, not needing an OpenAPI interface to do so.

      Image this example:

      {
        "id": "myworkflow",
        "specVersion": "0.8",
        "version": "1.0",
        "start": "State1",
        "functions": [
          {
            "name": "function1",
            "type": "custom",
            "operation": "knative:mynamespace/func1",
            "metadata": {
              "path": "/my_path"
            }
          },
          {
            "name": "func2",
            "operation": "knative:func2"
          }
        ],
        "states": [
          {
            "name": "State1",
            "type": "operation",
            "actions": [
              {
                "functionRef": {
                  "refName": "function1",
                  "arguments": {
                    "data": "${ .data }"
                  }
                }
              }
            ],
            "end": true
          }
        ]
      }
      

      The engine would make POST requests to these endpoints with the given payload manipulated by the workflow. For example:

      1. knative:mynamespace/func1 -> the func1 Knative Service in mynamespace
      2. knative:func2 -> the func2 Knative Service in the same namespace
      3. kubernetes:serving.knative.dev/v1/mynamespace/myservice -> the explicitly kubernetes resource at mynamespace

      This will make the integration with the platform way easier and enhance the dev experience.

      This feature can leverage our custom legacy function REST already implemented in the engine.

      Attachments

        Issue Links

          Activity

            People

              hbelmiro@redhat.com Helber Belmiro
              rhn-support-zanini Ricardo Zanini Fernandes
              Tristan Radisson Tristan Radisson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: