diff --git a/charts/zeebe-benchmark/test/golden/c8-zeebe-gateway-service-monitor.golden.yaml b/charts/zeebe-benchmark/test/golden/c8-core-service-monitor.golden.yaml similarity index 78% rename from charts/zeebe-benchmark/test/golden/c8-zeebe-gateway-service-monitor.golden.yaml rename to charts/zeebe-benchmark/test/golden/c8-core-service-monitor.golden.yaml index 1d1a947..3e75b1c 100644 --- a/charts/zeebe-benchmark/test/golden/c8-zeebe-gateway-service-monitor.golden.yaml +++ b/charts/zeebe-benchmark/test/golden/c8-core-service-monitor.golden.yaml @@ -1,9 +1,9 @@ --- -# Source: zeebe-benchmark/charts/camunda-platform/templates/service-monitor/zeebe-gateway-service-monitor.yaml +# Source: zeebe-benchmark/charts/camunda-platform/templates/service-monitor/core-service-monitor.yaml apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: - name: benchmark-test-camunda-platform-zeebe-gateway + name: benchmark-test-camunda-platform-core labels: app: camunda-platform app.kubernetes.io/name: camunda-platform @@ -15,7 +15,7 @@ spec: selector: matchLabels: app: camunda-platform - app.kubernetes.io/component: zeebe-gateway + app.kubernetes.io/component: core endpoints: - honorLabels: true path: /actuator/prometheus diff --git a/charts/zeebe-benchmark/test/golden/c8-zeebe-configmap.golden.yaml b/charts/zeebe-benchmark/test/golden/c8-zeebe-configmap.golden.yaml index d03a4a2..345597a 100644 --- a/charts/zeebe-benchmark/test/golden/c8-zeebe-configmap.golden.yaml +++ b/charts/zeebe-benchmark/test/golden/c8-zeebe-configmap.golden.yaml @@ -1,87 +1,192 @@ --- -# Source: zeebe-benchmark/charts/camunda-platform/templates/zeebe/configmap.yaml +# Source: zeebe-benchmark/charts/camunda-platform/templates/core/configmap.yaml kind: ConfigMap metadata: - name: benchmark-test-zeebe-configuration + name: benchmark-test-core-configuration labels: app: camunda-platform app.kubernetes.io/name: camunda-platform app.kubernetes.io/instance: benchmark-test app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: camunda-platform - app.kubernetes.io/component: zeebe-broker - app.kubernetes.io/version: "SNAPSHOT" + app.kubernetes.io/component: core + app.kubernetes.io/version: "8.7.0-alpha1" apiVersion: v1 data: + startup.sh: | + # The Node ID depends on the Pod name so it cannot be templated in the StatefulSet level. + export ZEEBE_BROKER_CLUSTER_NODEID="${ZEEBE_BROKER_CLUSTER_NODEID:-$[${K8S_NAME##*-} * 1 + 0]}" + echo "export ZEEBE_BROKER_CLUSTER_NODEID=${ZEEBE_BROKER_CLUSTER_NODEID}" >> ~/.bashrc + + exec /usr/local/camunda/bin/camunda application.yaml: | + + spring: + profiles: + active: auth + + management: + server: + port: 9600 + + server: + forward-headers-strategy: framework + address: 0.0.0.0 + port: 8080 + zeebe: + host: 0.0.0.0 + log: + level: "info" + broker: - exporters: - elasticsearch: - className: "io.camunda.zeebe.exporter.ElasticsearchExporter" - args: - url: "http://benchmark-test-elasticsearch:9200" - index: - prefix: "zeebe-record" - retention: - enabled: true - minimumAge: "10m" - policyName: "zeebe-record-retention-policy" - CamundaExporter: - className: "io.camunda.exporter.CamundaExporter" - args: - connect: - type: elasticsearch - url: "http://benchmark-test-elasticsearch:9200" - retention: - enabled: true - minimumAge: "10m" - policyName: "zeebe-record-retention-policy" - createSchema: true + # zeebe.broker.experimental + experimental: + engine: + authorization: + enableAuthorization: true + + # zeebe.broker.gateway gateway: enable: true network: + host: 0.0.0.0 port: 26500 - security: - enabled: false - authentication: - mode: none + + # zeebe.broker.network network: + advertisedHost: "${K8S_NAME}.${K8S_SERVICE_NAME}" host: 0.0.0.0 commandApi: port: 26501 internalApi: port: 26502 - monitoringApi: - port: "9600" + + # zeebe.broker.cluster cluster: + initialContactPoints: + - ${K8S_SERVICE_NAME}-0.${K8S_SERVICE_NAME}:26502 + - ${K8S_SERVICE_NAME}-1.${K8S_SERVICE_NAME}:26502 + - ${K8S_SERVICE_NAME}-2.${K8S_SERVICE_NAME}:26502 clusterSize: "3" replicationFactor: "3" partitionsCount: "3" clusterName: benchmark-test-zeebe + + # zeebe.broker.data + data: + snapshotPeriod: 5m + freeSpace: + processing: 2GB + replication: 3GB + + # zeebe.broker.threads threads: cpuThreadCount: "3" ioThreadCount: "3" - # Camunda Database configuration - camunda.database: - type: elasticsearch - # Cluster name - clusterName: elasticsearch - # Elasticsearch full url - url: "http://benchmark-test-elasticsearch:9200" + # zeebe.broker.exporters + exporters: + elasticsearch: + className: "io.camunda.zeebe.exporter.ElasticsearchExporter" + args: + url: "http://benchmark-test-elasticsearch:9200" + index: + prefix: "zeebe-record" + CamundaExporter: + className: "io.camunda.exporter.CamundaExporter" + args: + connect: + type: elasticsearch + url: "http://benchmark-test-elasticsearch:9200" + createSchema: true - startup.sh: | - #!/usr/bin/env bash - set -eux -o pipefail - export ZEEBE_BROKER_CLUSTER_NODEID=${ZEEBE_BROKER_CLUSTER_NODEID:-$[${K8S_NAME##*-} * 1 + 0]} - - if [ "$(ls -A /exporters/)" ]; then - mkdir -p /usr/local/zeebe/exporters/ - cp -a /exporters/*.jar /usr/local/zeebe/exporters/ - else - echo "No exporters available." - fi - exec /usr/local/zeebe/bin/broker - - broker-log4j2.xml: | \ No newline at end of file + camunda: + rest: + query: + enabled: true + + # + # Camunda Database Configuration. + # + database: + type: elasticsearch + # Cluster name + clusterName: elasticsearch + # Elasticsearch full url + url: "http://benchmark-test-elasticsearch:9200" + + # + # Camunda Operate Configuration. + # + operate: + + # ELS instance to store Operate data + elasticsearch: + # Cluster name + clusterName: elasticsearch + # Host + host: benchmark-test-elasticsearch + # Transport port + port: 9200 + # Elasticsearch full url + url: "http://benchmark-test-elasticsearch:9200" + # ELS instance to export Zeebe data to + zeebeElasticsearch: + # Cluster name + clusterName: elasticsearch + # Host + host: benchmark-test-elasticsearch + # Transport port + port: 9200 + # Index prefix, configured in Zeebe Elasticsearch exporter + prefix: zeebe-record + # Elasticsearch full url + url: "http://benchmark-test-elasticsearch:9200" + # Zeebe instance + zeebe: + # Gateway address + gatewayAddress: "benchmark-test-core:26500" + + # + # Camunda Tasklist Configuration. + # + tasklist: + + identity: + redirectRootUrl: "http://localhost:8082/tasklist" + + # Set Tasklist username and password. + # If user with does not exists it will be created. + # Default: demo/demo + #username: + #password: + # ELS instance to store Tasklist data + elasticsearch: + # Cluster name + clusterName: elasticsearch + # Host + host: benchmark-test-elasticsearch + # Transport port + port: 9200 + # Elasticsearch full url + url: "http://benchmark-test-elasticsearch:9200" + # ELS instance to export Zeebe data to + zeebeElasticsearch: + # Cluster name + clusterName: elasticsearch + # Host + host: benchmark-test-elasticsearch + # Transport port + port: 9200 + # Index prefix, configured in Zeebe Elasticsearch exporter + prefix: zeebe-record + # Elasticsearch full url + url: "http://benchmark-test-elasticsearch:9200" + # Zeebe instance + zeebe: + # Gateway address + gatewayAddress: benchmark-test-core:26500 + restAddress: "http://benchmark-test-core:8080" + + log4j2.xml: | \ No newline at end of file diff --git a/charts/zeebe-benchmark/test/golden/c8-zeebe-service.golden.yaml b/charts/zeebe-benchmark/test/golden/c8-zeebe-service.golden.yaml index 2dfa872..295c64f 100644 --- a/charts/zeebe-benchmark/test/golden/c8-zeebe-service.golden.yaml +++ b/charts/zeebe-benchmark/test/golden/c8-zeebe-service.golden.yaml @@ -1,24 +1,24 @@ --- -# Source: zeebe-benchmark/charts/camunda-platform/templates/zeebe/service.yaml +# Source: zeebe-benchmark/charts/camunda-platform/templates/core/service.yaml apiVersion: v1 kind: Service metadata: - name: "benchmark-test-zeebe" + name: benchmark-test-core labels: app: camunda-platform app.kubernetes.io/name: camunda-platform app.kubernetes.io/instance: benchmark-test app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: camunda-platform - app.kubernetes.io/component: zeebe-broker - app.kubernetes.io/version: "SNAPSHOT" + app.kubernetes.io/component: core + app.kubernetes.io/version: "8.7.0-alpha1" annotations: spec: clusterIP: None publishNotReadyAddresses: true type: ClusterIP ports: - - port: 9600 + - port: 8080 protocol: TCP name: http - port: 26502 @@ -27,10 +27,16 @@ spec: - port: 26501 protocol: TCP name: command + - port: 9600 + protocol: TCP + name: server + - port: 26500 + protocol: TCP + name: gateway selector: app: camunda-platform app.kubernetes.io/name: camunda-platform app.kubernetes.io/instance: benchmark-test app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: camunda-platform - app.kubernetes.io/component: zeebe-broker \ No newline at end of file + app.kubernetes.io/component: core \ No newline at end of file diff --git a/charts/zeebe-benchmark/test/golden/c8-zeebe-statefulset.golden.yaml b/charts/zeebe-benchmark/test/golden/c8-zeebe-statefulset.golden.yaml index c46dd16..3ff4c54 100644 --- a/charts/zeebe-benchmark/test/golden/c8-zeebe-statefulset.golden.yaml +++ b/charts/zeebe-benchmark/test/golden/c8-zeebe-statefulset.golden.yaml @@ -1,17 +1,17 @@ --- -# Source: zeebe-benchmark/charts/camunda-platform/templates/zeebe/statefulset.yaml +# Source: zeebe-benchmark/charts/camunda-platform/templates/core/statefulset.yaml apiVersion: apps/v1 kind: StatefulSet metadata: - name: "benchmark-test-zeebe" + name: benchmark-test-core labels: app: camunda-platform app.kubernetes.io/name: camunda-platform app.kubernetes.io/instance: benchmark-test app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: camunda-platform - app.kubernetes.io/component: zeebe-broker - app.kubernetes.io/version: "SNAPSHOT" + app.kubernetes.io/component: core + app.kubernetes.io/version: "8.7.0-alpha1" annotations: spec: replicas: 3 @@ -22,8 +22,8 @@ spec: app.kubernetes.io/instance: benchmark-test app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: camunda-platform - app.kubernetes.io/component: zeebe-broker - serviceName: "benchmark-test-zeebe" + app.kubernetes.io/component: core + serviceName: benchmark-test-core updateStrategy: type: RollingUpdate podManagementPolicy: Parallel @@ -35,41 +35,28 @@ spec: app.kubernetes.io/instance: benchmark-test app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: camunda-platform - app.kubernetes.io/component: zeebe-broker - app.kubernetes.io/version: "SNAPSHOT" + app.kubernetes.io/component: core + app.kubernetes.io/version: "8.7.0-alpha1" annotations: - checksum/config: 4e7d66ef2c5cc5b5153ce41dd3b77c26d1ebea04c443bb81cbb8ec00a96462b1 + checksum/config: 0af99dfd865b4e2b8dcd8ea4defec2b16e5ffee41fa37cedc969f502c6d3824e spec: imagePullSecrets: [] initContainers: - - command: - - wget - - https://github.com/pyroscope-io/pyroscope-java/releases/latest/download/pyroscope.jar - - -O - - /pyroscope/pyroscope.jar - image: alpine - name: pyroscope - securityContext: - allowPrivilegeEscalation: false - privileged: false - readOnlyRootFilesystem: true - runAsUser: 1000 - volumeMounts: - - mountPath: /pyroscope - name: pyroscope + [] containers: - - name: zeebe - image: camunda/zeebe:SNAPSHOT + - name: core + image: camunda/camunda:8.7.0-alpha1 imagePullPolicy: Always securityContext: - allowPrivilegeEscalation: true - privileged: true + allowPrivilegeEscalation: false + privileged: false readOnlyRootFilesystem: true runAsNonRoot: true - runAsUser: 1000 + runAsUser: 1001 seccompProfile: type: RuntimeDefault + command: ["bash", "/usr/local/bin/startup.sh"] env: - name: CAMUNDA_LICENSE_KEY valueFrom: @@ -83,85 +70,33 @@ spec: fieldRef: fieldPath: metadata.name - name: K8S_SERVICE_NAME - value: "benchmark-test-zeebe" + value: benchmark-test-core - name: K8S_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - - name: ZEEBE_BROKER_NETWORK_ADVERTISEDHOST - value: "$(K8S_NAME).$(K8S_SERVICE_NAME)" - - name: ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS - value: - $(K8S_SERVICE_NAME)-0.$(K8S_SERVICE_NAME):26502, - $(K8S_SERVICE_NAME)-1.$(K8S_SERVICE_NAME):26502, - $(K8S_SERVICE_NAME)-2.$(K8S_SERVICE_NAME):26502, - - name: ZEEBE_LOG_LEVEL - value: "info" - - name: ZEEBE_BROKER_GATEWAY_ENABLE - value: "false" - - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_CLASSNAME - value: "io.camunda.zeebe.exporter.ElasticsearchExporter" - - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_URL - value: "http://benchmark-test-elasticsearch:9200" - - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_PREFIX - value: "zeebe-record" + - name: VALUES_CAMUNDA_CORE_CLIENT_SECRET + valueFrom: + secretKeyRef: + name: benchmark-test-core-identity-secret + key: core-secret - name: JAVA_TOOL_OPTIONS - value: "-XX:MaxRAMPercentage=25.0 -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/local/zeebe/data -XX:ErrorFile=/usr/local/zeebe/data/zeebe_error%p.log -Xlog:gc*:file=/usr/local/zeebe/data/gc.log:time:filecount=7,filesize=8M" + value: "-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/local/zeebe/data -XX:ErrorFile=/usr/local/zeebe/data/zeebe_error%p.log -XX:+ExitOnOutOfMemoryError" - name: K8S_POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - - name: K8S_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: K8S_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: ZEEBE_LOG_APPENDER - value: Stackdriver - - name: ZEEBE_LOG_STACKDRIVER_SERVICENAME - value: zeebe - - name: ZEEBE_LOG_STACKDRIVER_SERVICEVERSION - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: ATOMIX_LOG_LEVEL - value: INFO - - name: ZEEBE_LOG_LEVEL - value: DEBUG - - name: PYROSCOPE_SERVER_ADDRESS - value: http://pyroscope.pyroscope.svc.cluster.local:4040 - - name: PYROSCOPE_APPLICATION_NAME - value: io.camunda.zeebe.broker - - name: PYROSCOPE_LOG_LEVEL - value: debug - - name: PYROSCOPE_FORMAT - value: jfr - - name: PYROSCOPE_PROFILER_EVENT - value: cpu - - name: PYROSCOPE_PROFILER_ALLOC - value: "0" - - name: PYROSCOPE_PROFILER_LOCK - value: "0" - - name: PYROSCOPE_LABELS - value: namespace=$(K8S_NAMESPACE), pod=$(K8S_NAME) - - name: SPRING_CONFIG_ADDITIONALLOCATION - value: /usr/local/zeebe/config/benchmark-config.yaml - - name: JAVA_OPTS - valueFrom: - configMapKeyRef: - key: java-opts - name: zeebe-config - optional: true ports: - - containerPort: 9600 + - containerPort: 8080 name: http - containerPort: 26501 name: command - containerPort: 26502 name: internal + - containerPort: 9600 + name: server + - containerPort: 26500 + name: gateway readinessProbe: httpGet: path: /actuator/health/readiness @@ -174,54 +109,39 @@ spec: timeoutSeconds: 1 resources: limits: - cpu: 1700m - memory: 4Gi + cpu: 960m + memory: 1920Mi requests: - cpu: 1350m - memory: 4Gi + cpu: 800m + memory: 1200Mi volumeMounts: - name: config mountPath: /usr/local/bin/startup.sh subPath: startup.sh - name: data - mountPath: /usr/local/zeebe/data + mountPath: /usr/local/camunda/data - name: exporters mountPath: /exporters - mountPath: /tmp name: tmp - name: config - mountPath: /usr/local/zeebe/config/application.yaml + mountPath: /usr/local/camunda/config/application.yaml subPath: application.yaml - - - mountPath: /usr/local/zeebe/config/benchmark-config.yaml - name: benchmark-config - subPath: benchmark-config.yaml - - mountPath: /pyroscope - name: pyroscope volumes: - name: config configMap: - name: benchmark-test-zeebe-configuration + name: benchmark-test-core-configuration defaultMode: 492 - name: exporters emptyDir: {} - name: tmp emptyDir: {} - - - configMap: - defaultMode: 492 - name: benchmark-config - name: benchmark-config - - emptyDir: {} - name: pyroscope - serviceAccountName: benchmark-test-zeebe + serviceAccountName: benchmark-test-core securityContext: fsGroup: 1001 runAsNonRoot: true seccompProfile: type: RuntimeDefault - nodeSelector: - cloud.google.com/gke-nodepool: n2-standard-2 # yamllint disable affinity: podAntiAffinity: @@ -231,7 +151,7 @@ spec: - key: app.kubernetes.io/component operator: In values: - - zeebe-broker + - core topologyKey: kubernetes.io/hostname # yamllint enable volumeClaimTemplates: @@ -241,7 +161,6 @@ spec: {} spec: accessModes: [ReadWriteOnce] - storageClassName: ssd resources: requests: - storage: "48Gi" \ No newline at end of file + storage: "32Gi" \ No newline at end of file diff --git a/charts/zeebe-benchmark/test/golden_camunda_platform_test.go b/charts/zeebe-benchmark/test/golden_camunda_platform_test.go index f1341b2..df59bdd 100644 --- a/charts/zeebe-benchmark/test/golden_camunda_platform_test.go +++ b/charts/zeebe-benchmark/test/golden_camunda_platform_test.go @@ -18,7 +18,7 @@ func TestGoldenCamundaPlatformServiceMonitorDefaults(t *testing.T) { chartPath, err := filepath.Abs("../") require.NoError(t, err) - templateNames := []string{"zeebe-service-monitor", "zeebe-gateway-service-monitor", "operate-service-monitor"} + templateNames := []string{"core-service-monitor"} for _, name := range templateNames { suite.Run(t, &golden.TemplateGoldenTest{ @@ -32,7 +32,7 @@ func TestGoldenCamundaPlatformServiceMonitorDefaults(t *testing.T) { } } -func TestGoldenCamundaPlatformZeebeDefaults(t *testing.T) { +func TestGoldenCamundaPlatformCoreDefaults(t *testing.T) { // Test which allows to verify also parent chart templates // This makes sure that properties are correctly set // OR configurations have been changed @@ -47,49 +47,7 @@ func TestGoldenCamundaPlatformZeebeDefaults(t *testing.T) { Release: "benchmark-test", Namespace: "benchmark-" + strings.ToLower(random.UniqueId()), GoldenFileName: "c8-zeebe-" + name, - Templates: []string{"charts/camunda-platform/templates/zeebe/" + name + ".yaml"}, - SetValues: map[string]string{"camunda-platform.operate.enabled": "true"}, - }) - } -} - -func TestGoldenCamundaPlatformZeebeGatewayDefaults(t *testing.T) { - // Test which allows to verify also parent chart templates - // This makes sure that properties are correctly set - // OR configurations have been changed - - chartPath, err := filepath.Abs("../") - require.NoError(t, err) - templateNames := []string{"service", "deployment", "configmap"} - - for _, name := range templateNames { - suite.Run(t, &golden.TemplateGoldenTest{ - ChartPath: chartPath, - Release: "benchmark-test", - Namespace: "benchmark-" + strings.ToLower(random.UniqueId()), - GoldenFileName: "c8-zeebe-gateway-" + name, - Templates: []string{"charts/camunda-platform/templates/zeebe-gateway/" + name + ".yaml"}, - SetValues: map[string]string{"camunda-platform.operate.enabled": "true"}, - }) - } -} - -func TestGoldenCamundaPlatformOperateDefaults(t *testing.T) { - // Test which allows to verify also parent chart templates - // This makes sure that properties are correctly set - // OR configurations have been changed - - chartPath, err := filepath.Abs("../") - require.NoError(t, err) - templateNames := []string{"deployment", "service", "configmap"} - - for _, name := range templateNames { - suite.Run(t, &golden.TemplateGoldenTest{ - ChartPath: chartPath, - Release: "benchmark-test", - Namespace: "benchmark-" + strings.ToLower(random.UniqueId()), - GoldenFileName: "operate-" + name, - Templates: []string{"charts/camunda-platform/templates/operate/" + name + ".yaml"}, + Templates: []string{"charts/camunda-platform/templates/core/" + name + ".yaml"}, SetValues: map[string]string{"camunda-platform.operate.enabled": "true"}, }) }