camunda / camunda-platform-helm

Camunda Platform 8 Self-Managed Helm charts
https://docs.camunda.io/docs/self-managed/overview/
Apache License 2.0
69 stars 127 forks source link

feat: configure Webapps with REST v2 Api #1995

Closed Zelldon closed 1 week ago

Zelldon commented 2 weeks ago

Which problem does the PR fix?

See the related PR that makes this refactoring and the gateway-rest API available for all components https://github.com/camunda/camunda/pull/1919

What's in this PR?

This PR adds some new values to configure a new port of the Operate deployment. Furthermore, it adds new environment variables to the deployment, such that we can join the related Zeebe cluster (via SWIM).

Test

I tested the changes together with the changes of:

I used the following extra values file:

$ cat values-patch.yaml 
global:
  identity:
    auth:
      enabled: false

operate:
  image:
     ## @param operate.image.registry can be used to set container image registry.
     registry: "gcr.io"
     ## @param operate.image.repository defines which image repository to use
     repository: zeebe-io/operate
     ## @param operate.image.tag can be set to overwrite the global tag, which should be used in that chart
     tag: ck-rs-dist-shared-modules-rest

identityKeycloak:
  enabled: false
tasklist:
  enabled: false
optimize:
  enabled: false
identity:
  enabled: false
connectors:
  enabled: false

Deployment in zeebe-io via helm install camunda-platform-test charts/camunda-platform -f values-patch.yaml

Running the following:

$ curl -c cookie.txt -X POST 'http://localhost:8080/api/login?username=demo&password=demo'
$ curl -b cookie.txt -X GET 'http://localhost:8080/v2/topology'  | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1023    0  1023    0     0  13460      0 --:--:-- --:--:-- --:--:-- 13640
{
  "brokers": [
    {
      "nodeId": 0,
      "host": "camunda-platform-test-zeebe-0.camunda-platform-test-zeebe.ck-test-helm.svc",
      "port": 26501,
      "partitions": [
        {
          "partitionId": 1,
          "role": "leader",
          "health": "healthy"
        },
        {
          "partitionId": 3,
          "role": "follower",
          "health": "healthy"
        },
        {
          "partitionId": 2,
          "role": "follower",
          "health": "healthy"
        }
      ],
      "version": "8.5.2"
    },
    {
      "nodeId": 2,
      "host": "camunda-platform-test-zeebe-2.camunda-platform-test-zeebe.ck-test-helm.svc",
      "port": 26501,
      "partitions": [
        {
          "partitionId": 1,
          "role": "follower",
          "health": "healthy"
        },
        {
          "partitionId": 3,
          "role": "leader",
          "health": "healthy"
        },
        {
          "partitionId": 2,
          "role": "leader",
          "health": "healthy"
        }
      ],
      "version": "8.5.2"
    },
    {
      "nodeId": 1,
      "host": "camunda-platform-test-zeebe-1.camunda-platform-test-zeebe.ck-test-helm.svc",
      "port": 26501,
      "partitions": [
        {
          "partitionId": 1,
          "role": "follower",
          "health": "healthy"
        },
        {
          "partitionId": 3,
          "role": "follower",
          "health": "healthy"
        },
        {
          "partitionId": 2,
          "role": "follower",
          "health": "healthy"
        }
      ],
      "version": "8.5.2"
    }
  ],
  "clusterSize": 3,
  "partitionsCount": 3,
  "replicationFactor": 3,
  "gatewayVersion": "8.6.0-SNAPSHOT"
}

Also in the Zeebe gateway logs we can see that Operate was detected as new Member:

2024-06-14 11:28:47.279 [] [atomix-cluster-heartbeat-sender] [] INFO 
      io.atomix.cluster.protocol.swim - camunda-platform-test-zeebe-gateway-6d45d589db-9mml2 - Member added Member{id=camunda-platform-test-operate-57b4db4ff7-4sqj8, address=10.0.60.16:26502, properties={event-service-topics-subscribed=KIIDAGpvYnNBdmFpbGFibOU=}}

Checklist

Please make sure to follow our Contributing Guide.

Before opening the PR:

After opening the PR:

Zelldon commented 1 week ago

~@aabouzaid is there a trick to correctly generate the golde-files for the alpha dir?~

Nevermind I found a way.

$ make go.update-golden-only chartPath=charts/camunda-platform-alpha
Zelldon commented 1 week ago

@aabouzaid i rebased the pr. There are still some things failing it seems