diff --git a/charts/zeebe-benchmark/test/golden/curator-configmap.golden.yaml b/charts/zeebe-benchmark/test/golden/c8-curator-configmap.golden.yaml similarity index 97% rename from charts/zeebe-benchmark/test/golden/curator-configmap.golden.yaml rename to charts/zeebe-benchmark/test/golden/c8-curator-configmap.golden.yaml index e5ec179..adb4521 100644 --- a/charts/zeebe-benchmark/test/golden/curator-configmap.golden.yaml +++ b/charts/zeebe-benchmark/test/golden/c8-curator-configmap.golden.yaml @@ -62,7 +62,7 @@ data: direction: older timestring: '%Y-%m-%d' unit: days - unit_count: 30 + unit_count: 1 field: stats_result: epoch: @@ -85,7 +85,7 @@ data: direction: older timestring: '%Y-%m-%d' unit: days - unit_count: 30 + unit_count: 1 field: stats_result: epoch: @@ -104,7 +104,7 @@ data: kind: prefix value: zeebe- - filtertype: space - disk_space: 1 + disk_space: 30 source: name timestring: '%Y-%m-%d' config.yml: |- diff --git a/charts/zeebe-benchmark/test/golden/curator-cronjob.golden.yaml b/charts/zeebe-benchmark/test/golden/c8-curator-cronjob.golden.yaml similarity index 100% rename from charts/zeebe-benchmark/test/golden/curator-cronjob.golden.yaml rename to charts/zeebe-benchmark/test/golden/c8-curator-cronjob.golden.yaml diff --git a/charts/zeebe-benchmark/test/golden/service-monitor.golden.yaml b/charts/zeebe-benchmark/test/golden/c8-service-monitor.golden.yaml similarity index 100% rename from charts/zeebe-benchmark/test/golden/service-monitor.golden.yaml rename to charts/zeebe-benchmark/test/golden/c8-service-monitor.golden.yaml diff --git a/charts/zeebe-benchmark/test/golden/deployment.golden.yaml b/charts/zeebe-benchmark/test/golden/es-exporter-deployment.golden.yaml similarity index 100% rename from charts/zeebe-benchmark/test/golden/deployment.golden.yaml rename to charts/zeebe-benchmark/test/golden/es-exporter-deployment.golden.yaml diff --git a/charts/zeebe-benchmark/test/golden/servicemonitor.golden.yaml b/charts/zeebe-benchmark/test/golden/es-exporter-servicemonitor.golden.yaml similarity index 100% rename from charts/zeebe-benchmark/test/golden/servicemonitor.golden.yaml rename to charts/zeebe-benchmark/test/golden/es-exporter-servicemonitor.golden.yaml diff --git a/charts/zeebe-benchmark/test/golden/operate-configmap.golden.yaml b/charts/zeebe-benchmark/test/golden/operate-configmap.golden.yaml new file mode 100644 index 0000000..b426c45 --- /dev/null +++ b/charts/zeebe-benchmark/test/golden/operate-configmap.golden.yaml @@ -0,0 +1,46 @@ +--- +# Source: zeebe-benchmark/charts/camunda-platform/charts/operate/templates/configmap.yaml +kind: ConfigMap +metadata: + name: benchmark-test-operate + labels: + app: camunda-platform + app.kubernetes.io/name: operate + app.kubernetes.io/instance: benchmark-test + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: "8.2.8" + app.kubernetes.io/component: operate +apiVersion: v1 +data: + application.yml: | + # Operate configuration file + camunda.operate: + # ELS instance to store Operate data + elasticsearch: + # Cluster name + clusterName: elasticsearch + # Host + host: elasticsearch-master + # Transport port + port: 9200 + # Zeebe instance + zeebe: + # Broker contact point + brokerContactPoint: "benchmark-test-zeebe-gateway:26500" + # ELS instance to export Zeebe data to + zeebeElasticsearch: + # Cluster name + clusterName: elasticsearch + # Host + host: elasticsearch-master + # Transport port + port: 9200 + # Index prefix, configured in Zeebe Elasticsearch exporter + prefix: zeebe-record + logging: + level: + ROOT: INFO + io.camunda.operate: DEBUG + #Spring Boot Actuator endpoints to be exposed + management.endpoints.web.exposure.include: health,info,conditions,configprops,prometheus,loggers,usage-metrics,backups \ No newline at end of file diff --git a/charts/zeebe-benchmark/test/golden/operate-deployment.golden.yaml b/charts/zeebe-benchmark/test/golden/operate-deployment.golden.yaml new file mode 100644 index 0000000..08f7df0 --- /dev/null +++ b/charts/zeebe-benchmark/test/golden/operate-deployment.golden.yaml @@ -0,0 +1,84 @@ +--- +# Source: zeebe-benchmark/charts/camunda-platform/charts/operate/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: benchmark-test-operate + labels: + app: camunda-platform + app.kubernetes.io/name: operate + app.kubernetes.io/instance: benchmark-test + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: "8.2.8" + app.kubernetes.io/component: operate + annotations: + {} +spec: + replicas: 1 + selector: + matchLabels: + app: camunda-platform + app.kubernetes.io/name: operate + app.kubernetes.io/instance: benchmark-test + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/component: operate + template: + metadata: + labels: + app: camunda-platform + app.kubernetes.io/name: operate + app.kubernetes.io/instance: benchmark-test + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: "8.2.8" + app.kubernetes.io/component: operate + spec: + imagePullSecrets: + [] + containers: + - name: operate + image: "camunda/operate:8.2.8" + imagePullPolicy: Always + env: + - name: SPRING_PROFILES_ACTIVE + value: "auth" + - name: OPERATE_LOG_APPENDER + value: Stackdriver + - name: OPERATE_LOG_STACKDRIVER_SERVICENAME + value: operate + - name: OPERATE_LOG_STACKDRIVER_SERVICEVERSION + valueFrom: + fieldRef: + fieldPath: metadata.namespace + resources: + limits: + cpu: 2000m + memory: 2Gi + requests: + cpu: 600m + memory: 400Mi + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + httpGet: + path: /actuator/health/readiness + scheme: HTTP + port: http + initialDelaySeconds: 30 + periodSeconds: 30 + successThreshold: 1 + failureThreshold: 5 + timeoutSeconds: 1 + volumeMounts: + - name: config + mountPath: /usr/local/operate/config/application.yml + subPath: application.yml + volumes: + - name: config + configMap: + name: benchmark-test-operate + defaultMode: 484 \ No newline at end of file diff --git a/charts/zeebe-benchmark/test/golden/operate-service.golden.yaml b/charts/zeebe-benchmark/test/golden/operate-service.golden.yaml new file mode 100644 index 0000000..658839e --- /dev/null +++ b/charts/zeebe-benchmark/test/golden/operate-service.golden.yaml @@ -0,0 +1,29 @@ +--- +# Source: zeebe-benchmark/charts/camunda-platform/charts/operate/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: benchmark-test-operate + labels: + app: camunda-platform + app.kubernetes.io/name: operate + app.kubernetes.io/instance: benchmark-test + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: "8.2.8" + app.kubernetes.io/component: operate + annotations: +spec: + type: ClusterIP + ports: + - port: 80 + name: http + targetPort: 8080 + protocol: TCP + selector: + app: camunda-platform + app.kubernetes.io/name: operate + app.kubernetes.io/instance: benchmark-test + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/component: operate \ 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 8edc2fe..5f37996 100644 --- a/charts/zeebe-benchmark/test/golden_camunda_platform_test.go +++ b/charts/zeebe-benchmark/test/golden_camunda_platform_test.go @@ -25,9 +25,30 @@ func TestGoldenCamundaPlatformDefaults(t *testing.T) { ChartPath: chartPath, Release: "benchmark-test", Namespace: "benchmark-" + strings.ToLower(random.UniqueId()), - GoldenFileName: name, + GoldenFileName: "c8-" + name, Templates: []string{"charts/camunda-platform/templates/" + name + ".yaml"}, SetValues: map[string]string{"retentionPolicy.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/charts/operate/templates/" + name + ".yaml"}, + SetValues: map[string]string{"camunda-platform.operate.enabled": "true"}, + }) + } +} diff --git a/charts/zeebe-benchmark/test/golden_elastic_exporter_test.go b/charts/zeebe-benchmark/test/golden_elastic_exporter_test.go index dc643d4..0071744 100644 --- a/charts/zeebe-benchmark/test/golden_elastic_exporter_test.go +++ b/charts/zeebe-benchmark/test/golden_elastic_exporter_test.go @@ -23,7 +23,7 @@ func TestGoldenElasticExporterDefaults(t *testing.T) { ChartPath: chartPath, Release: "benchmark-test", Namespace: "benchmark-test", - GoldenFileName: name, + GoldenFileName: "es-exporter-" + name, Templates: []string{"charts/prometheus-elasticsearch-exporter/templates/" + name + ".yaml"}, }) } diff --git a/charts/zeebe-benchmark/values.yaml b/charts/zeebe-benchmark/values.yaml index b8047d0..d8a7148 100644 --- a/charts/zeebe-benchmark/values.yaml +++ b/charts/zeebe-benchmark/values.yaml @@ -318,11 +318,11 @@ camunda-platform: # RetentionPolicy.zeebeIndexMaxSize can be set to configure the maximum allowed zeebe index size in gigabytes. # After reaching that size, curator will delete that corresponding index on the next run. # To benefit from that configuration the schedule needs to be configured small enough, like every 15 minutes. - zeebeIndexMaxSize: 1 + zeebeIndexMaxSize: 30 # RetentionPolicy.operateIndexTTL defines after how many days an operate index can be deleted - operateIndexTTL: 30 + operateIndexTTL: 1 # RetentionPolicy.tasklistIndexTTL defines after how many days a tasklist index can be deleted - tasklistIndexTTL: 30 + tasklistIndexTTL: 1 # Image configuration for the elasticsearch curator cronjob # https://hub.docker.com/r/bitnami/elasticsearch-curator-archived/tags @@ -336,6 +336,25 @@ camunda-platform: operate: enabled: false + image: + tag: 8.2.8 + # Resources configuration to set request and limit configuration for the container https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits + resources: + requests: + cpu: 600m + memory: 400Mi + limits: + cpu: 2000m + memory: 2Gi + env: + - name: OPERATE_LOG_APPENDER + value: Stackdriver + - name: OPERATE_LOG_STACKDRIVER_SERVICENAME + value: operate + - name: OPERATE_LOG_STACKDRIVER_SERVICEVERSION + valueFrom: + fieldRef: + fieldPath: metadata.namespace tasklist: enabled: false