From 9d4c4cb54b85bf2dfd4e45c3069378ce73865c0b Mon Sep 17 00:00:00 2001 From: Shijie Sheng Date: Tue, 28 Oct 2025 09:27:15 -0700 Subject: [PATCH 01/24] fix: schema job fail open and add example (#58) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description of this PR schema upgrade job should fail open on db creation to handle already exist errors add example of cadence with postgres Local Test namespace and release name is still fixed unfortunately. cd charts/cadence helm install cadence-release . -n cadence-postgres --values examples/values.postgres.yaml Signed-off-by: “Kevin” --- charts/cadence/Chart.yaml | 6 +- charts/cadence/README.md | 2 +- charts/cadence/examples/values.postgres.yaml | 50 ++++++++++ .../cadence/templates/schema-server-job.yaml | 96 +++++++++---------- 4 files changed, 102 insertions(+), 52 deletions(-) create mode 100644 charts/cadence/examples/values.postgres.yaml diff --git a/charts/cadence/Chart.yaml b/charts/cadence/Chart.yaml index 846c1ef..e517c24 100644 --- a/charts/cadence/Chart.yaml +++ b/charts/cadence/Chart.yaml @@ -1,10 +1,10 @@ apiVersion: v2 name: cadence -version: 1.0.8 +version: 1.0.9 appVersion: v1.3.5 description: | - Cadence is a distributed, scalable, durable, and highly available orchestration engine + Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way. This chart deploys Uber Cadence server components and web UI. @@ -39,4 +39,4 @@ dependencies: - name: mysql version: 12.x.x repository: oci://registry-1.docker.io/bitnamicharts - condition: mysql.enabled \ No newline at end of file + condition: mysql.enabled diff --git a/charts/cadence/README.md b/charts/cadence/README.md index a96e2ab..4323a33 100644 --- a/charts/cadence/README.md +++ b/charts/cadence/README.md @@ -1,6 +1,6 @@ # cadence -![Version: 1.0.8](https://img.shields.io/badge/Version-1.0.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.5](https://img.shields.io/badge/AppVersion-v1.3.5-informational?style=flat-square) +![Version: 1.0.9](https://img.shields.io/badge/Version-1.0.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.5](https://img.shields.io/badge/AppVersion-v1.3.5-informational?style=flat-square) Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way. diff --git a/charts/cadence/examples/values.postgres.yaml b/charts/cadence/examples/values.postgres.yaml new file mode 100644 index 0000000..eb13fc6 --- /dev/null +++ b/charts/cadence/examples/values.postgres.yaml @@ -0,0 +1,50 @@ +# Allow Bitnami charts to use legacy repository images +global: + security: + allowInsecureImages: true + +# Force Cadence to use PostgreSQL for main DB +config: + persistence: + database: + driver: "postgres" + sql: + hosts: "cadence-release-postgresql.cadence-postgres.svc.cluster.local" + port: 5432 + dbname: "cadence" + visibilityDbname: "cadence_visibility" + user: "cadence" + password: "changeme-strong" + tls: + enabled: false + sslMode: "" + +# Enable Cadence schema jobs +schema: + serverJob: + enabled: true + +# Deploy Postgres within the same release (Bitnami subchart) +postgresql: + enabled: true + image: + registry: docker.io + repository: bitnamilegacy/postgresql + tag: "16.4.0" + pullPolicy: IfNotPresent + auth: + username: cadence + password: "changeme-strong" + database: cadence + primary: + persistence: + enabled: true + size: 8Gi + +# Do NOT deploy ES, Cassandra or MySQL +elasticsearch: + enabled: false +cassandra: + enabled: false +mysql: + enabled: false diff --git a/charts/cadence/templates/schema-server-job.yaml b/charts/cadence/templates/schema-server-job.yaml index 64d4dcc..100cccb 100644 --- a/charts/cadence/templates/schema-server-job.yaml +++ b/charts/cadence/templates/schema-server-job.yaml @@ -91,21 +91,21 @@ spec: certfile = $SSL_CERTFILE EOF fi - + # Add client certificate for mutual TLS if [ -n "$SSL_CLIENT_CERT" ] && [ "$SSL_CLIENT_CERT" != "" ]; then cat >> ~/.cassandra/cqlshrc << EOF usercert = $SSL_CLIENT_CERT EOF fi - + # Add client private key for mutual TLS if [ -n "$SSL_CLIENT_KEY" ] && [ "$SSL_CLIENT_KEY" != "" ]; then cat >> ~/.cassandra/cqlshrc << EOF userkey = $SSL_CLIENT_KEY EOF fi - + # Add validate setting if [ -n "$SSL_VALIDATE" ] && [ "$SSL_VALIDATE" != "" ]; then cat >> ~/.cassandra/cqlshrc << EOF @@ -126,12 +126,12 @@ spec: # Build cqlsh command build_cqlsh_cmd() { local cmd="cqlsh" - + # Add SSL option if enabled if [ "$TLS_ENABLED" = "true" ]; then cmd="$cmd --ssl" fi - + echo "$cmd" } @@ -207,16 +207,16 @@ spec: if [ "$TLS_ENABLED" = "true" ] && [ -n "$SSL_MODE" ]; then # Set SSL mode as environment variable (psql reads PGSSLMODE) export PGSSLMODE="$SSL_MODE" - + # Add SSL certificate parameters as environment variables if provided if [ -n "$SSL_CERTFILE" ]; then export PGSSLROOTCERT="$SSL_CERTFILE" fi - + if [ -n "$SSL_CLIENT_CERT" ]; then export PGSSLCERT="$SSL_CLIENT_CERT" fi - + if [ -n "$SSL_CLIENT_KEY" ]; then export PGSSLKEY="$SSL_CLIENT_KEY" fi @@ -288,7 +288,7 @@ spec: # Build connection string based on TLS configuration build_mysql_cmd() { local cmd="mariadb -h $DB_HOST -P $DB_PORT -u $DB_USER -p$MYSQL_PWD" - + # Add SSL parameters if TLS is enabled if [ "$TLS_ENABLED" = "true" ]; then case "$SSL_MODE" in @@ -310,23 +310,23 @@ spec: cmd="$cmd --ssl" ;; esac - + # Add SSL certificate parameters if provided if [ -n "$SSL_CERTFILE" ]; then cmd="$cmd --ssl-ca=$SSL_CERTFILE" fi - + if [ -n "$SSL_CLIENT_CERT" ]; then cmd="$cmd --ssl-cert=$SSL_CLIENT_CERT" fi - + if [ -n "$SSL_CLIENT_KEY" ]; then cmd="$cmd --ssl-key=$SSL_CLIENT_KEY" fi else cmd="$cmd --skip-ssl" fi - + echo "$cmd" } @@ -406,11 +406,11 @@ spec: set -e echo "Starting Cadence schema setup for driver: $DB_DRIVER" echo "=== Setting up Cassandra Schema ===" - + # Build cassandra-tool command with TLS options build_cassandra_cmd() { local cmd="cadence-cassandra-tool --ep $DB_HOST" - + # Add authentication if [ -n "$DB_USER" ]; then cmd="$cmd -u $DB_USER" @@ -426,7 +426,7 @@ spec: if [ -n "$ALLOWED_AUTHENTICATORS" ]; then cmd="$cmd $ALLOWED_AUTHENTICATORS" fi - + # Add TLS options if enabled if [ "$TLS_ENABLED" = "true" ]; then cmd="$cmd --tls" @@ -440,36 +440,36 @@ spec: cmd="$cmd --tls-key-file $SSL_CLIENT_KEY" fi fi - + echo "$cmd" } - + # Setup main database schema echo "Creating main keyspace: $DB_NAME" if [ "$DATA_CENTER" = "" ]; then - $(build_cassandra_cmd) create -k $DB_NAME --rf $REPLICATION_FACTOR + $(build_cassandra_cmd) create -k $DB_NAME --rf $REPLICATION_FACTOR || echo "Keyspace already exists" else - $(build_cassandra_cmd) create -k $DB_NAME --rf $REPLICATION_FACTOR -dc $DATA_CENTER + $(build_cassandra_cmd) create -k $DB_NAME --rf $REPLICATION_FACTOR -dc $DATA_CENTER || echo "Keyspace already exists" fi echo "Setting up main schema version 0.0" $(build_cassandra_cmd) -k $DB_NAME setup-schema -v 0.0 || echo "Schema already exists" - + echo "Updating main schema to latest version" $(build_cassandra_cmd) -k $DB_NAME update-schema -d $CADENCE_HOME/schema/cassandra/cadence/versioned || echo "Rollback is not allowed" - + # Setup visibility database schema (only if ES is not enabled) if [ "$ES_ENABLED" = "false" ]; then echo "Creating visibility keyspace: $DB_VISIBILITY_NAME" if [ "$DATA_CENTER" = "" ]; then - $(build_cassandra_cmd) create -k $DB_VISIBILITY_NAME --rf $REPLICATION_FACTOR + $(build_cassandra_cmd) create -k $DB_VISIBILITY_NAME --rf $REPLICATION_FACTOR || echo "Keyspace already exists" else - $(build_cassandra_cmd) create -k $DB_VISIBILITY_NAME --rf $REPLICATION_FACTOR -dc $DATA_CENTER + $(build_cassandra_cmd) create -k $DB_VISIBILITY_NAME --rf $REPLICATION_FACTOR -dc $DATA_CENTER || echo "Keyspace already exists" fi echo "Setting up visibility schema version 0.0" $(build_cassandra_cmd) -k $DB_VISIBILITY_NAME setup-schema -v 0.0 || echo "Schema already exists" - + echo "Updating visibility schema to latest version" $(build_cassandra_cmd) -k $DB_VISIBILITY_NAME update-schema -d $CADENCE_HOME/schema/cassandra/visibility/versioned || echo "Rollback is not allowed" else @@ -538,7 +538,7 @@ spec: - name: CASSANDRA_TLS_SERVER_NAME value: {{ .Values.config.persistence.database.cassandra.tls.serverName | quote }} {{- end }} - + {{- else if eq $dbDriver "postgres" }} # PostgreSQL Schema Setup command: @@ -548,11 +548,11 @@ spec: set -e echo "Starting Cadence schema setup for driver: $DB_DRIVER" echo "=== Setting up PostgreSQL Schema ===" - + # Build sql-tool command with TLS options build_postgres_cmd() { local cmd="cadence-sql-tool --ep $DB_HOST -p $DB_PORT -u $DB_USER -pw $POSTGRES_PWD --plugin postgres" - + # Add TLS options if enabled if [ "$TLS_ENABLED" = "true" ]; then cmd="$cmd --tls" @@ -566,28 +566,28 @@ spec: cmd="$cmd --tls-key-file $SSL_CLIENT_KEY" fi fi - + echo "$cmd" } - + # Create main database echo "Creating main database: $DB_NAME" - $(build_postgres_cmd) create-database --db $DB_NAME - + $(build_postgres_cmd) create-database --db $DB_NAME || echo "Database already exists" + echo "Setting up main schema version 0.0" $(build_postgres_cmd) --db $DB_NAME setup-schema -v 0.0 || echo "Schema already exists" - + echo "Updating main schema to latest version" $(build_postgres_cmd) --db $DB_NAME update-schema -d $CADENCE_HOME/schema/postgres/cadence/versioned || echo "Rollback is not allowed" - + # Setup visibility database (only if ES is not enabled) if [ "$ES_ENABLED" = "false" ]; then echo "Creating visibility database: $DB_VISIBILITY_NAME" - $(build_postgres_cmd) create-database --db $DB_VISIBILITY_NAME - + $(build_postgres_cmd) create-database --db $DB_VISIBILITY_NAME || echo "Database already exists" + echo "Setting up visibility schema version 0.0" $(build_postgres_cmd) --db $DB_VISIBILITY_NAME setup-schema -v 0.0 || echo "Schema already exists" - + echo "Updating visibility schema to latest version" $(build_postgres_cmd) --db $DB_VISIBILITY_NAME update-schema -d $CADENCE_HOME/schema/postgres/visibility/versioned || echo "Rollback is not allowed" else @@ -653,11 +653,11 @@ spec: set -e echo "Starting Cadence schema setup for driver: $DB_DRIVER" echo "=== Setting up MySQL Schema ===" - + # Build sql-tool command with TLS options build_mysql_cmd() { local cmd="cadence-sql-tool --ep $DB_HOST -p $DB_PORT -u $DB_USER -pw $MYSQL_PWD --plugin mysql" - + # Add TLS options if enabled if [ "$TLS_ENABLED" = "true" ]; then cmd="$cmd --tls" @@ -671,34 +671,34 @@ spec: cmd="$cmd --tls-key-file $SSL_CLIENT_KEY" fi fi - + echo "$cmd" } - + # Create main database echo "Creating main database: $DB_NAME" $(build_mysql_cmd) create-database --db $DB_NAME || echo "Database already exists" - + echo "Setting up main schema version 0.0" $(build_mysql_cmd) --db $DB_NAME setup-schema -v 0.0 || echo "Schema already exists" - + echo "Updating main schema to latest version" $(build_mysql_cmd) --db $DB_NAME update-schema -d $CADENCE_HOME/schema/mysql/v8/cadence/versioned || echo "Rollback is not allowed" - + # Setup visibility database (only if ES is not enabled) if [ "$ES_ENABLED" = "false" ]; then echo "Creating visibility database: $DB_VISIBILITY_NAME" $(build_mysql_cmd) create-database --db $DB_VISIBILITY_NAME || echo "Database already exists" - + echo "Setting up visibility schema version 0.0" $(build_mysql_cmd) --db $DB_VISIBILITY_NAME setup-schema -v 0.0 || echo "Schema already exists" - + echo "Updating visibility schema to latest version" $(build_mysql_cmd) --db $DB_VISIBILITY_NAME update-schema -d $CADENCE_HOME/schema/mysql/v8/visibility/versioned || echo "Rollback is not allowed" else echo "Skipping visibility schema setup (Elasticsearch enabled)" fi - + echo "Schema setup completed successfully!" env: # Common environment variables @@ -761,4 +761,4 @@ spec: {{- with .Values.global.tls.volumes }} {{- toYaml . | nindent 6 }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} From 502a562ac4025fe862f1b84cb47ea47b6b4e2c6f Mon Sep 17 00:00:00 2001 From: Vishwa Patil Date: Thu, 30 Oct 2025 14:05:49 -0700 Subject: [PATCH 02/24] docs: Convert slack links to CNCF, add link to contributing guide (#57) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Convert slack links to CNCF, add link to contributing guide Signed-off-by: vpatil16@ext.uber.com Signed-off-by: “Kevin” --- CONTRIBUTING.md | 4 ++++ README.md | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4bba36c..c4ad7d0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,9 @@ # CONTRIBUTING +For general contributing guidelines and processes shared across all Cadence repositories, please see the [Cadence Contributing Guide](https://github.com/cadence-workflow/cadence/blob/master/CONTRIBUTING.md). + +This document contains specific instructions for contributing to the Cadence Helm Charts repository. + ## Build and generate template yml locally ```bash diff --git a/README.md b/README.md index fcab1b5..357a857 100644 --- a/README.md +++ b/README.md @@ -211,7 +211,10 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute, ru ## Support -For issues, questions, or contributions, please visit: -- [GitHub Issues](https://github.com/uber/cadence-charts/issues) -- [Cadence Documentation](https://cadenceworkflow.io/docs/get-started) -- [Cadence Community](https://github.com/cadence-workflow/cadence) \ No newline at end of file +## Community & Support + +- **Documentation**: [Cadence Documentation](https://cadenceworkflow.io/docs/) +- **Community Chat**: Join our [CNCF Slack](https://communityinviter.com/apps/cloud-native/cncf) and find us in the `#cadence` channel +- **Contributing**: See [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute, run samples etc. +- **Issues**: Report bugs and request features via [GitHub Issues](https://github.com/cadence-workflow/cadence-charts/issues) + From e63fb491ff265c0267fdd0319d42baef21e9618a Mon Sep 17 00:00:00 2001 From: Cosmin Lungu <82363564+CosminL-DEV@users.noreply.github.com> Date: Thu, 6 Nov 2025 19:15:30 +0100 Subject: [PATCH 03/24] Bump Web v4.0.11 (#60) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: CosminL-DEV <82363564+CosminL-DEV@users.noreply.github.com> Signed-off-by: “Kevin” --- charts/cadence/Chart.yaml | 4 ++-- charts/cadence/README.md | 4 ++-- charts/cadence/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/cadence/Chart.yaml b/charts/cadence/Chart.yaml index e517c24..1a612b7 100644 --- a/charts/cadence/Chart.yaml +++ b/charts/cadence/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: cadence -version: 1.0.9 -appVersion: v1.3.5 +version: 1.0.10 +appVersion: v1.3.6 description: | Cadence is a distributed, scalable, durable, and highly available orchestration engine diff --git a/charts/cadence/README.md b/charts/cadence/README.md index 4323a33..dc8869e 100644 --- a/charts/cadence/README.md +++ b/charts/cadence/README.md @@ -1,6 +1,6 @@ # cadence -![Version: 1.0.9](https://img.shields.io/badge/Version-1.0.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.5](https://img.shields.io/badge/AppVersion-v1.3.5-informational?style=flat-square) +![Version: 1.0.10](https://img.shields.io/badge/Version-1.0.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.6](https://img.shields.io/badge/AppVersion-v1.3.6-informational?style=flat-square) Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way. @@ -403,7 +403,7 @@ This chart deploys Uber Cadence server components and web UI. | web.busybox | object | `{"enabled":true,"image":{"imagePullSecrets":[],"pullPolicy":"IfNotPresent","repository":"busybox","tag":"latest"}}` | Image configuration for BusyBox to check frontend service | | web.containerSecurityContext | object | `{}` | Container security context (inherits from global if not specified) | | web.env | list | `[{"name":"CADENCE_WEB_PORT","value":"8088"}]` | Environment variables for web UI | -| web.image | object | `{"imagePullSecrets":[],"pullPolicy":"IfNotPresent","repository":"docker.io/ubercadence/web","tag":"v4.0.10"}` | Image configuration for Web UI | +| web.image | object | `{"imagePullSecrets":[],"pullPolicy":"IfNotPresent","repository":"docker.io/ubercadence/web","tag":"v4.0.11"}` | Image configuration for Web UI | | web.ingress.annotations | object | `{}` | Ingress annotations | | web.ingress.className | string | `""` | Ingress class name | | web.ingress.enabled | bool | `false` | Enable ingress | diff --git a/charts/cadence/values.yaml b/charts/cadence/values.yaml index b8cebca..7a5f71c 100644 --- a/charts/cadence/values.yaml +++ b/charts/cadence/values.yaml @@ -446,7 +446,7 @@ web: # -- Image configuration for Web UI image: repository: "docker.io/ubercadence/web" - tag: "v4.0.10" + tag: "v4.0.11" pullPolicy: IfNotPresent imagePullSecrets: [] # - name: myregistrykey From ecc3e4e2ec35e0ea1094a38a2a82e12925de2335 Mon Sep 17 00:00:00 2001 From: Shijie Sheng Date: Fri, 31 Oct 2025 13:00:14 -0700 Subject: [PATCH 04/24] add es examples and add to chart dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “Kevin” --- charts/cadence/Chart.lock | 7 +- charts/cadence/Chart.yaml | 8 +- .../cadence/examples/values.postgres-es7.yaml | 119 ++++++++++++++++++ 3 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 charts/cadence/examples/values.postgres-es7.yaml diff --git a/charts/cadence/Chart.lock b/charts/cadence/Chart.lock index 6c84e55..e8c3b71 100644 --- a/charts/cadence/Chart.lock +++ b/charts/cadence/Chart.lock @@ -8,5 +8,8 @@ dependencies: - name: mysql repository: oci://registry-1.docker.io/bitnamicharts version: 12.3.5 -digest: sha256:9d2bdf5e27b9fedc3a32d7abcf6c3ff569818e2756240f94977b1047efafe4b0 -generated: "2025-09-17T16:04:57.7251556+02:00" +- name: elasticsearch + repository: oci://registry-1.docker.io/bitnamicharts + version: 21.6.3 +digest: sha256:75cdbb934145cb057a735f415dbf854fcbd1e3218cdbf2d91f05aa1c5c240dc1 +generated: "2025-10-27T12:47:15.596657-07:00" diff --git a/charts/cadence/Chart.yaml b/charts/cadence/Chart.yaml index 1a612b7..075c0db 100644 --- a/charts/cadence/Chart.yaml +++ b/charts/cadence/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: cadence -version: 1.0.10 -appVersion: v1.3.6 +version: 1.1.0 +appVersion: v1.3.5 description: | Cadence is a distributed, scalable, durable, and highly available orchestration engine @@ -40,3 +40,7 @@ dependencies: version: 12.x.x repository: oci://registry-1.docker.io/bitnamicharts condition: mysql.enabled + - name: elasticsearch + version: 21.6.x + repository: oci://registry-1.docker.io/bitnamicharts + condition: elasticsearch.enabled diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml new file mode 100644 index 0000000..44c1e6a --- /dev/null +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -0,0 +1,119 @@ +# Namespace note: install into namespace: cadence-codelab + +# Allow Bitnami charts to use legacy repository images +global: + security: + allowInsecureImages: true + +# Force Cadence to use PostgreSQL for main DB +config: + persistence: + database: + driver: "postgres" + sql: + hosts: "cadence-release-postgresql.cadence-postgres-es7.svc.cluster.local" + port: 5432 + dbname: "cadence" + visibilityDbname: "cadence_visibility" + user: "cadence" + password: "changeme-strong" + tls: + enabled: false + sslMode: "" + elasticsearch: + enabled: true + version: "v7" + user: "" + password: "" + protocol: "http" + hosts: "cadence-release-elasticsearch.cadence-postgres-es7.svc.cluster.local" + port: 9200 + visibilityIndex: "cadence-visibility" + tls: + enabled: false + kafka: # needed by elasticsearch integration + enabled: true + brokers: "cadence-release-kafka.cadence-postgres-es7.svc.cluster.local" +# | config.kafka.brokers | string | `"kafka-service.kafka-namespace.svc.cluster.local"` | Kafka broker service. Can reference Kubernetes services | +# | config.kafka.enabled | bool | `false` | Enable Kafka for async workflows | +# | config.kafka.port | int | `9092` | Kafka port | +# | config.kafka.sasl.enabled | bool | `false` | Enable SASL authentication | +# | config.kafka.sasl.mechanism | string | `"PLAIN"` | SASL mechanism: plain, sha512 or sha256 | +# | config.kafka.sasl.password | string | `""` | SASL password | +# | config.kafka.sasl.username | string | `""` | SASL username | +# | config.kafka.tls.caFile | string | `""` | CA certificate file to verify server certificates | +# | config.kafka.tls.caFiles | list | `[]` | Multiple CA certificate files (alternative to caFile) | +# | config.kafka.tls.certFile | string | `""` | Client certificate file for mutual TLS | +# | config.kafka.tls.enableHostVerification | bool | `true` | Verify server hostname matches certificate | +# | config.kafka.tls.enabled | bool | `false` | Enable TLS | +# | config.kafka.tls.keyFile | string | `""` | Client private key file for mutual TLS | +# | config.kafka.tls.requireClientAuth | bool | `false` | Require client certificate authentication | +# | config.kafka.tls.serverName | string | `""` | Override server name for certificate verification | +# | config.kafka.topicProperties | object | `{}` | Topic properties (optional) | +# | config.kafka.visibilityDLQTopic | string | `"cadence-visibility-dlq"` | Kafka visibility DLQ topic name | +# | config.kafka.visibilityTopic | string | `"cadence-visibility"` | Kafka visibility topic name | + + +# Enable Cadence schema jobs +schema: + serverJob: + enabled: true + elasticSearchJob: + enabled: true + +# Ensure Cadence uses Elasticsearch for advanced visibility +# See values.yaml dynamicConfig keys in the chart +dynamicConfig: + values: + system.writeVisibilityStoreName: + - value: "es-visibility" + system.readVisibilityStoreName: + - value: "es-visibility" + +# Deploy Postgres within the same release (Bitnami subchart) +postgresql: + enabled: true + image: + registry: docker.io + repository: bitnamilegacy/postgresql + tag: "16.4.0" + pullPolicy: IfNotPresent + auth: + username: cadence + password: "changeme-strong" + database: cadence + primary: + persistence: + enabled: true + size: 8Gi + +# Deploy Elasticsearch with single node mode +elasticsearch: + enabled: true + master: + masterOnly: false + replicaCount: 1 + resources: + requests: + cpu: 1 + memory: 1024Mi + limits: + cpu: 2 + memory: 2048Mi + data: + replicaCount: 0 + coordinating: + replicaCount: 0 + ingest: + replicaCount: 0 + sysctlImage: + enabled: false + image: + tag: 7.17.23 + repository: bitnamilegacy/elasticsearch + +# Do NOT deploy Cassandra or MySQL +cassandra: + enabled: false +mysql: + enabled: false From 4d1be7406a36cd9b57f1abd2463f6fac73220dbd Mon Sep 17 00:00:00 2001 From: Shijie Sheng Date: Fri, 31 Oct 2025 13:08:31 -0700 Subject: [PATCH 05/24] add additional comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “Kevin” --- charts/cadence/Chart.yaml | 4 ++++ charts/cadence/examples/values.postgres-es7.yaml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/charts/cadence/Chart.yaml b/charts/cadence/Chart.yaml index 075c0db..2652e9a 100644 --- a/charts/cadence/Chart.yaml +++ b/charts/cadence/Chart.yaml @@ -44,3 +44,7 @@ dependencies: version: 21.6.x repository: oci://registry-1.docker.io/bitnamicharts condition: elasticsearch.enabled + - name: kafka + version: ? + repository: ? + condition: kafka.enabled diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index 44c1e6a..baf63e8 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -70,6 +70,8 @@ dynamicConfig: system.readVisibilityStoreName: - value: "es-visibility" +### subcharts values which can be omited if user has their own deployment + # Deploy Postgres within the same release (Bitnami subchart) postgresql: enabled: true @@ -112,6 +114,10 @@ elasticsearch: tag: 7.17.23 repository: bitnamilegacy/elasticsearch +kafka: + enabled: true + ??? TODO: add values + # Do NOT deploy Cassandra or MySQL cassandra: enabled: false From 45a7f51d2ca1cdc946c08bfbb99a21896f1c9ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Wed, 12 Nov 2025 10:48:38 -0800 Subject: [PATCH 06/24] add kafka values to elasticsearch example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “Kevin” --- charts/cadence/Chart.lock | 7 +- charts/cadence/Chart.yaml | 4 +- .../cadence/examples/values.postgres-es7.yaml | 97 +++++++++++++++---- .../cadence/templates/server-configmap.yaml | 2 +- 4 files changed, 84 insertions(+), 26 deletions(-) diff --git a/charts/cadence/Chart.lock b/charts/cadence/Chart.lock index e8c3b71..1b73625 100644 --- a/charts/cadence/Chart.lock +++ b/charts/cadence/Chart.lock @@ -11,5 +11,8 @@ dependencies: - name: elasticsearch repository: oci://registry-1.docker.io/bitnamicharts version: 21.6.3 -digest: sha256:75cdbb934145cb057a735f415dbf854fcbd1e3218cdbf2d91f05aa1c5c240dc1 -generated: "2025-10-27T12:47:15.596657-07:00" +- name: kafka + repository: oci://registry-1.docker.io/bitnamicharts + version: 30.1.8 +digest: sha256:794d39e9345acfb117730c963e7818fa388613b2cbb2becef8c3ce43d1e15206 +generated: "2025-11-03T14:00:44.205655-08:00" diff --git a/charts/cadence/Chart.yaml b/charts/cadence/Chart.yaml index 2652e9a..2768d9e 100644 --- a/charts/cadence/Chart.yaml +++ b/charts/cadence/Chart.yaml @@ -45,6 +45,6 @@ dependencies: repository: oci://registry-1.docker.io/bitnamicharts condition: elasticsearch.enabled - name: kafka - version: ? - repository: ? + version: 30.x.x + repository: oci://registry-1.docker.io/bitnamicharts condition: kafka.enabled diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index baf63e8..da33206 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -1,4 +1,4 @@ -# Namespace note: install into namespace: cadence-codelab +# Namespace note: install into namespace: cadence-postgres-es7 # Allow Bitnami charts to use legacy repository images global: @@ -20,6 +20,7 @@ config: tls: enabled: false sslMode: "" + visibilityStore: "default" elasticsearch: enabled: true version: "v7" @@ -34,25 +35,6 @@ config: kafka: # needed by elasticsearch integration enabled: true brokers: "cadence-release-kafka.cadence-postgres-es7.svc.cluster.local" -# | config.kafka.brokers | string | `"kafka-service.kafka-namespace.svc.cluster.local"` | Kafka broker service. Can reference Kubernetes services | -# | config.kafka.enabled | bool | `false` | Enable Kafka for async workflows | -# | config.kafka.port | int | `9092` | Kafka port | -# | config.kafka.sasl.enabled | bool | `false` | Enable SASL authentication | -# | config.kafka.sasl.mechanism | string | `"PLAIN"` | SASL mechanism: plain, sha512 or sha256 | -# | config.kafka.sasl.password | string | `""` | SASL password | -# | config.kafka.sasl.username | string | `""` | SASL username | -# | config.kafka.tls.caFile | string | `""` | CA certificate file to verify server certificates | -# | config.kafka.tls.caFiles | list | `[]` | Multiple CA certificate files (alternative to caFile) | -# | config.kafka.tls.certFile | string | `""` | Client certificate file for mutual TLS | -# | config.kafka.tls.enableHostVerification | bool | `true` | Verify server hostname matches certificate | -# | config.kafka.tls.enabled | bool | `false` | Enable TLS | -# | config.kafka.tls.keyFile | string | `""` | Client private key file for mutual TLS | -# | config.kafka.tls.requireClientAuth | bool | `false` | Require client certificate authentication | -# | config.kafka.tls.serverName | string | `""` | Override server name for certificate verification | -# | config.kafka.topicProperties | object | `{}` | Topic properties (optional) | -# | config.kafka.visibilityDLQTopic | string | `"cadence-visibility-dlq"` | Kafka visibility DLQ topic name | -# | config.kafka.visibilityTopic | string | `"cadence-visibility"` | Kafka visibility topic name | - # Enable Cadence schema jobs schema: @@ -116,7 +98,80 @@ elasticsearch: kafka: enabled: true - ??? TODO: add values + image: + registry: docker.io + repository: bitnamilegacy/kafka + tag: "3.8.0" + pullPolicy: IfNotPresent + # KRaft mode configuration (Kafka without ZooKeeper) + kraft: + enabled: true + # Disable ZooKeeper since we're using KRaft + zookeeper: + enabled: false + # Controller and broker configuration for KRaft + controller: + replicaCount: 1 + persistence: + enabled: true + size: 8Gi + resources: + requests: + cpu: 500m + memory: 1Gi + limits: + cpu: 1 + memory: 2Gi + # GKE Autopilot compatibility + podSecurityContext: + fsGroup: 1001 + runAsUser: 1001 + containerSecurityContext: + runAsNonRoot: true + allowPrivilegeEscalation: false + broker: + replicaCount: 1 + persistence: + enabled: true + size: 8Gi + resources: + requests: + cpu: 500m + memory: 1Gi + limits: + cpu: 1 + memory: 2Gi + # GKE Autopilot compatibility + podSecurityContext: + fsGroup: 1001 + runAsUser: 1001 + containerSecurityContext: + runAsNonRoot: true + allowPrivilegeEscalation: false + # GKE Autopilot compatibility: disable privileged init container + sysctlImage: + enabled: false + # Kafka topic configuration for Cadence visibility + autoCreateTopicsEnable: true + numPartitions: 4 + defaultReplicationFactor: 1 + # Configure replication factors for internal topics (demo/single-node setup) + offsetsTopicReplicationFactor: 1 + transactionStateLogReplicationFactor: 1 + transactionStateLogMinIsr: 1 + # Listener configuration + listeners: + client: + protocol: PLAINTEXT + controller: + protocol: PLAINTEXT + interbroker: + protocol: PLAINTEXT + # Service configuration + service: + type: ClusterIP + ports: + client: 9092 # Do NOT deploy Cassandra or MySQL cassandra: diff --git a/charts/cadence/templates/server-configmap.yaml b/charts/cadence/templates/server-configmap.yaml index b74e765..11ebf4b 100644 --- a/charts/cadence/templates/server-configmap.yaml +++ b/charts/cadence/templates/server-configmap.yaml @@ -42,7 +42,7 @@ data: persistence: numHistoryShards: {{ .Values.config.persistence.numHistoryShards | default 4 }} defaultStore: {{ .Values.config.persistence.defaultStore | default "default" | quote }} - {{- if and .Values.config.persistence.visibilityStore (not .Values.config.persistence.elasticsearch.enabled) }} + {{- if .Values.config.persistence.visibilityStore }} visibilityStore: {{ .Values.config.persistence.visibilityStore | quote }} {{- end }} {{- if and .Values.config.persistence.advancedVisibilityStore .Values.config.persistence.elasticsearch.enabled }} From 9122e559be640c061d46471fb94b17235c44c27b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Thu, 13 Nov 2025 07:29:39 -0800 Subject: [PATCH 07/24] fix configmap so visibility datastore is created MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres-es7.yaml | 9 ++++++++- charts/cadence/templates/server-configmap.yaml | 6 ++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index da33206..b2d2e85 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -2,12 +2,20 @@ # Allow Bitnami charts to use legacy repository images global: + image: + tag: "v1.3.6" # Set cadence version security: allowInsecureImages: true # Force Cadence to use PostgreSQL for main DB config: persistence: + # Name of the default datastore (PostgreSQL) + defaultStore: "default" + # Name of the basic visibility datastore (PostgreSQL) + visibilityStore: "visibility" + # Name of the advanced visibility datastore (Elasticsearch) + advancedVisibilityStore: "es-visibility" database: driver: "postgres" sql: @@ -20,7 +28,6 @@ config: tls: enabled: false sslMode: "" - visibilityStore: "default" elasticsearch: enabled: true version: "v7" diff --git a/charts/cadence/templates/server-configmap.yaml b/charts/cadence/templates/server-configmap.yaml index 11ebf4b..bb45ee3 100644 --- a/charts/cadence/templates/server-configmap.yaml +++ b/charts/cadence/templates/server-configmap.yaml @@ -219,10 +219,9 @@ data: {{- end }} {{- end }} {{- end }} - {{- if ne .Values.config.persistence.elasticsearch.enabled true }} + {{- if .Values.config.persistence.visibilityStore }} # Visibility datastore - {{ if .Values.config.persistence.visibilityStore -}} - {{ .Values.config.persistence.visibilityStore | default "visibility" }}: + {{ .Values.config.persistence.visibilityStore }}: {{- if eq .Values.config.persistence.database.driver "cassandra" }} nosql: pluginName: "cassandra" @@ -385,7 +384,6 @@ data: {{- end }} {{- if .Values.config.persistence.database.sql.tls.serverName }} serverName: {{ .Values.config.persistence.database.sql.tls.serverName | quote }} - {{- end }} {{- end }} {{- end }} {{- end }} From 481cf7939b9e378ebf54e37332e37fdfdd065769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Thu, 13 Nov 2025 08:35:01 -0800 Subject: [PATCH 08/24] change cadence verion to 1.3.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres-es7.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index b2d2e85..dd3f59e 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -3,7 +3,7 @@ # Allow Bitnami charts to use legacy repository images global: image: - tag: "v1.3.6" # Set cadence version + tag: "v1.3.7" # Set cadence version security: allowInsecureImages: true From be5335d5d48e94a934c6a60421e45269b0eb047a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Fri, 14 Nov 2025 06:21:59 -0800 Subject: [PATCH 09/24] Set cadence version to v1.3.6 in chart and values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “Kevin” --- charts/cadence/Chart.yaml | 2 +- charts/cadence/examples/values.postgres-es7.yaml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/cadence/Chart.yaml b/charts/cadence/Chart.yaml index 2768d9e..1f85423 100644 --- a/charts/cadence/Chart.yaml +++ b/charts/cadence/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: cadence version: 1.1.0 -appVersion: v1.3.5 +appVersion: v1.3.6 description: | Cadence is a distributed, scalable, durable, and highly available orchestration engine diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index dd3f59e..e0fde8b 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -3,7 +3,7 @@ # Allow Bitnami charts to use legacy repository images global: image: - tag: "v1.3.7" # Set cadence version + tag: "v1.3.6" # Default version - has known schema validation bug security: allowInsecureImages: true @@ -77,6 +77,10 @@ postgresql: persistence: enabled: true size: 8Gi + initdb: + scripts: + create-visibility-db.sql: | + CREATE DATABASE cadence_visibility OWNER cadence; # Deploy Elasticsearch with single node mode elasticsearch: From d8bb312424116828ddde649506833dd371b97d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Fri, 14 Nov 2025 06:42:28 -0800 Subject: [PATCH 10/24] fix: always create visibility database when configured MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “Kevin” --- .../cadence/templates/schema-server-job.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/cadence/templates/schema-server-job.yaml b/charts/cadence/templates/schema-server-job.yaml index 100cccb..52a3c3d 100644 --- a/charts/cadence/templates/schema-server-job.yaml +++ b/charts/cadence/templates/schema-server-job.yaml @@ -458,8 +458,8 @@ spec: echo "Updating main schema to latest version" $(build_cassandra_cmd) -k $DB_NAME update-schema -d $CADENCE_HOME/schema/cassandra/cadence/versioned || echo "Rollback is not allowed" - # Setup visibility database schema (only if ES is not enabled) - if [ "$ES_ENABLED" = "false" ]; then + # Setup visibility database schema (if configured) + if [ -n "$DB_VISIBILITY_NAME" ]; then echo "Creating visibility keyspace: $DB_VISIBILITY_NAME" if [ "$DATA_CENTER" = "" ]; then $(build_cassandra_cmd) create -k $DB_VISIBILITY_NAME --rf $REPLICATION_FACTOR || echo "Keyspace already exists" @@ -473,7 +473,7 @@ spec: echo "Updating visibility schema to latest version" $(build_cassandra_cmd) -k $DB_VISIBILITY_NAME update-schema -d $CADENCE_HOME/schema/cassandra/visibility/versioned || echo "Rollback is not allowed" else - echo "Skipping visibility schema setup (Elasticsearch enabled)" + echo "Skipping visibility schema setup (no visibility keyspace configured)" fi echo "Schema setup completed successfully!" @@ -580,8 +580,8 @@ spec: echo "Updating main schema to latest version" $(build_postgres_cmd) --db $DB_NAME update-schema -d $CADENCE_HOME/schema/postgres/cadence/versioned || echo "Rollback is not allowed" - # Setup visibility database (only if ES is not enabled) - if [ "$ES_ENABLED" = "false" ]; then + # Setup visibility database (if configured) + if [ -n "$DB_VISIBILITY_NAME" ]; then echo "Creating visibility database: $DB_VISIBILITY_NAME" $(build_postgres_cmd) create-database --db $DB_VISIBILITY_NAME || echo "Database already exists" @@ -591,7 +591,7 @@ spec: echo "Updating visibility schema to latest version" $(build_postgres_cmd) --db $DB_VISIBILITY_NAME update-schema -d $CADENCE_HOME/schema/postgres/visibility/versioned || echo "Rollback is not allowed" else - echo "Skipping visibility schema setup (Elasticsearch enabled)" + echo "Skipping visibility schema setup (no visibility database configured)" fi echo "Schema setup completed successfully!" @@ -685,8 +685,8 @@ spec: echo "Updating main schema to latest version" $(build_mysql_cmd) --db $DB_NAME update-schema -d $CADENCE_HOME/schema/mysql/v8/cadence/versioned || echo "Rollback is not allowed" - # Setup visibility database (only if ES is not enabled) - if [ "$ES_ENABLED" = "false" ]; then + # Setup visibility database (if configured) + if [ -n "$DB_VISIBILITY_NAME" ]; then echo "Creating visibility database: $DB_VISIBILITY_NAME" $(build_mysql_cmd) create-database --db $DB_VISIBILITY_NAME || echo "Database already exists" @@ -696,7 +696,7 @@ spec: echo "Updating visibility schema to latest version" $(build_mysql_cmd) --db $DB_VISIBILITY_NAME update-schema -d $CADENCE_HOME/schema/mysql/v8/visibility/versioned || echo "Rollback is not allowed" else - echo "Skipping visibility schema setup (Elasticsearch enabled)" + echo "Skipping visibility schema setup (no visibility database configured)" fi echo "Schema setup completed successfully!" From c85e226686b34cfcfb7de0048f29b0857185d60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Fri, 14 Nov 2025 07:14:40 -0800 Subject: [PATCH 11/24] run helm-docs to update Readme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “Kevin” --- charts/cadence/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/cadence/README.md b/charts/cadence/README.md index dc8869e..d6f27d1 100644 --- a/charts/cadence/README.md +++ b/charts/cadence/README.md @@ -1,7 +1,8 @@ # cadence -![Version: 1.0.10](https://img.shields.io/badge/Version-1.0.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.6](https://img.shields.io/badge/AppVersion-v1.3.6-informational?style=flat-square) +![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.6](https://img.shields.io/badge/AppVersion-v1.3.6-informational?style=flat-square) +Cadence is a distributed, scalable, durable, and highly available orchestration engine Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way. This chart deploys Uber Cadence server components and web UI. @@ -24,6 +25,8 @@ This chart deploys Uber Cadence server components and web UI. | Repository | Name | Version | |------------|------|---------| | oci://registry-1.docker.io/bitnamicharts | cassandra | 11.x.x | +| oci://registry-1.docker.io/bitnamicharts | elasticsearch | 21.6.x | +| oci://registry-1.docker.io/bitnamicharts | kafka | 30.x.x | | oci://registry-1.docker.io/bitnamicharts | mysql | 12.x.x | | oci://registry-1.docker.io/bitnamicharts | postgresql | 16.x.x | From e9f653aa5497cf660f9df0a48fced707945e5ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Mon, 17 Nov 2025 14:22:03 -0800 Subject: [PATCH 12/24] chore: remove unused visibility DB config from ES example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using Elasticsearch for visibility, the PostgreSQL visibility database is not needed. Removed visibilityDbname and initdb script that were creating an unused database. Also updated dynamic config to use es instead of es-visibility to match Cadence's internal visibility store naming convention. Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres-es7.yaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index e0fde8b..effd8ea 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -12,8 +12,6 @@ config: persistence: # Name of the default datastore (PostgreSQL) defaultStore: "default" - # Name of the basic visibility datastore (PostgreSQL) - visibilityStore: "visibility" # Name of the advanced visibility datastore (Elasticsearch) advancedVisibilityStore: "es-visibility" database: @@ -22,7 +20,6 @@ config: hosts: "cadence-release-postgresql.cadence-postgres-es7.svc.cluster.local" port: 5432 dbname: "cadence" - visibilityDbname: "cadence_visibility" user: "cadence" password: "changeme-strong" tls: @@ -55,9 +52,9 @@ schema: dynamicConfig: values: system.writeVisibilityStoreName: - - value: "es-visibility" + - value: "es" system.readVisibilityStoreName: - - value: "es-visibility" + - value: "es" ### subcharts values which can be omited if user has their own deployment @@ -77,10 +74,6 @@ postgresql: persistence: enabled: true size: 8Gi - initdb: - scripts: - create-visibility-db.sql: | - CREATE DATABASE cadence_visibility OWNER cadence; # Deploy Elasticsearch with single node mode elasticsearch: From 705122815815ed79eaf228e93cc584bd9cd977e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Mon, 17 Nov 2025 14:22:41 -0800 Subject: [PATCH 13/24] fix: skip visibility DB creation when Elasticsearch is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The schema job should only create the SQL/Cassandra visibility database when Elasticsearch is disabled. When using Elasticsearch for advanced visibility, the SQL visibility database is not needed. Changed condition from checking if visibilityDbname is set to checking if ES_ENABLED is false, allowing ES-only deployments to skip unnecessary database creation. Signed-off-by: “Kevin” --- .../cadence/templates/schema-server-job.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/cadence/templates/schema-server-job.yaml b/charts/cadence/templates/schema-server-job.yaml index 52a3c3d..100cccb 100644 --- a/charts/cadence/templates/schema-server-job.yaml +++ b/charts/cadence/templates/schema-server-job.yaml @@ -458,8 +458,8 @@ spec: echo "Updating main schema to latest version" $(build_cassandra_cmd) -k $DB_NAME update-schema -d $CADENCE_HOME/schema/cassandra/cadence/versioned || echo "Rollback is not allowed" - # Setup visibility database schema (if configured) - if [ -n "$DB_VISIBILITY_NAME" ]; then + # Setup visibility database schema (only if ES is not enabled) + if [ "$ES_ENABLED" = "false" ]; then echo "Creating visibility keyspace: $DB_VISIBILITY_NAME" if [ "$DATA_CENTER" = "" ]; then $(build_cassandra_cmd) create -k $DB_VISIBILITY_NAME --rf $REPLICATION_FACTOR || echo "Keyspace already exists" @@ -473,7 +473,7 @@ spec: echo "Updating visibility schema to latest version" $(build_cassandra_cmd) -k $DB_VISIBILITY_NAME update-schema -d $CADENCE_HOME/schema/cassandra/visibility/versioned || echo "Rollback is not allowed" else - echo "Skipping visibility schema setup (no visibility keyspace configured)" + echo "Skipping visibility schema setup (Elasticsearch enabled)" fi echo "Schema setup completed successfully!" @@ -580,8 +580,8 @@ spec: echo "Updating main schema to latest version" $(build_postgres_cmd) --db $DB_NAME update-schema -d $CADENCE_HOME/schema/postgres/cadence/versioned || echo "Rollback is not allowed" - # Setup visibility database (if configured) - if [ -n "$DB_VISIBILITY_NAME" ]; then + # Setup visibility database (only if ES is not enabled) + if [ "$ES_ENABLED" = "false" ]; then echo "Creating visibility database: $DB_VISIBILITY_NAME" $(build_postgres_cmd) create-database --db $DB_VISIBILITY_NAME || echo "Database already exists" @@ -591,7 +591,7 @@ spec: echo "Updating visibility schema to latest version" $(build_postgres_cmd) --db $DB_VISIBILITY_NAME update-schema -d $CADENCE_HOME/schema/postgres/visibility/versioned || echo "Rollback is not allowed" else - echo "Skipping visibility schema setup (no visibility database configured)" + echo "Skipping visibility schema setup (Elasticsearch enabled)" fi echo "Schema setup completed successfully!" @@ -685,8 +685,8 @@ spec: echo "Updating main schema to latest version" $(build_mysql_cmd) --db $DB_NAME update-schema -d $CADENCE_HOME/schema/mysql/v8/cadence/versioned || echo "Rollback is not allowed" - # Setup visibility database (if configured) - if [ -n "$DB_VISIBILITY_NAME" ]; then + # Setup visibility database (only if ES is not enabled) + if [ "$ES_ENABLED" = "false" ]; then echo "Creating visibility database: $DB_VISIBILITY_NAME" $(build_mysql_cmd) create-database --db $DB_VISIBILITY_NAME || echo "Database already exists" @@ -696,7 +696,7 @@ spec: echo "Updating visibility schema to latest version" $(build_mysql_cmd) --db $DB_VISIBILITY_NAME update-schema -d $CADENCE_HOME/schema/mysql/v8/visibility/versioned || echo "Rollback is not allowed" else - echo "Skipping visibility schema setup (no visibility database configured)" + echo "Skipping visibility schema setup (Elasticsearch enabled)" fi echo "Schema setup completed successfully!" From 7f8c5c4631131a6f8665127abb1e263dd0705e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Wed, 19 Nov 2025 10:06:50 -0800 Subject: [PATCH 14/24] fix: use ES index name matching template pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed visibilityIndex from 'cadence-visibility' to 'cadence-visibility-v1' to match the Elasticsearch template pattern 'cadence-visibility-*'. This ensures the template with proper keyword field mappings is applied to the index, fixing visibility queries that require exact term matching on fields like DomainID. Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres-es7.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index effd8ea..5f7d6a7 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -33,7 +33,7 @@ config: protocol: "http" hosts: "cadence-release-elasticsearch.cadence-postgres-es7.svc.cluster.local" port: 9200 - visibilityIndex: "cadence-visibility" + visibilityIndex: "cadence-visibility-v1" tls: enabled: false kafka: # needed by elasticsearch integration @@ -52,9 +52,9 @@ schema: dynamicConfig: values: system.writeVisibilityStoreName: - - value: "es" + - value: "es-visibility" system.readVisibilityStoreName: - - value: "es" + - value: "es-visibility" ### subcharts values which can be omited if user has their own deployment From 9cc4bc777acd8a9d3ed411b3ae37b99a072b6eaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Wed, 19 Nov 2025 10:31:56 -0800 Subject: [PATCH 15/24] fix: disable SQL visibility store for ES-only mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set visibilityStore to empty string to prevent dual-write mode when using Elasticsearch-only advanced visibility. This fixes 'Operation is not supported' errors when Cadence tries to write to a non-existent SQL visibility database. Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres-es7.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index 5f7d6a7..81cf872 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -12,6 +12,8 @@ config: persistence: # Name of the default datastore (PostgreSQL) defaultStore: "default" + # Disable basic SQL visibility (we're using ES-only) + visibilityStore: "" # Name of the advanced visibility datastore (Elasticsearch) advancedVisibilityStore: "es-visibility" database: From 37e37283ff33cbf63891f5c92621cd7dd39b58b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Wed, 19 Nov 2025 10:40:38 -0800 Subject: [PATCH 16/24] fix: use 'es' keyword for visibility store name in dynamic config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The visibility store name in dynamic config should be 'es' (a special keyword for advanced visibility), not the datastore name 'es-visibility'. This matches the Cadence upstream configuration pattern where advancedVisibilityStore is 'es-visibility' but system.writeVisibilityStoreName is 'es'. Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres-es7.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index 81cf872..3743cd1 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -50,13 +50,13 @@ schema: enabled: true # Ensure Cadence uses Elasticsearch for advanced visibility -# See values.yaml dynamicConfig keys in the chart +# Note: "es" is a special keyword for advanced visibility, not the datastore name dynamicConfig: values: system.writeVisibilityStoreName: - - value: "es-visibility" + - value: "es" system.readVisibilityStoreName: - - value: "es-visibility" + - value: "es" ### subcharts values which can be omited if user has their own deployment From ffee53e4a93edf0b99d16f01fa52d4a7ae75dbb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Wed, 19 Nov 2025 10:52:41 -0800 Subject: [PATCH 17/24] fix: remove advancedVisibilityStore for Kafka-based async visibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed advancedVisibilityStore from persistence config to enable Kafka-based async visibility mode. When advancedVisibilityStore is set, Cadence tries to use dual-write mode (SQL + ES) which fails without a SQL visibility database. With Kafka mode, the history service writes to Kafka, and the worker service reads from Kafka and writes to ES. Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres-es7.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index 3743cd1..c53cfaf 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -12,10 +12,11 @@ config: persistence: # Name of the default datastore (PostgreSQL) defaultStore: "default" - # Disable basic SQL visibility (we're using ES-only) + # Disable basic SQL visibility (we're using ES-only via Kafka) visibilityStore: "" - # Name of the advanced visibility datastore (Elasticsearch) - advancedVisibilityStore: "es-visibility" + # Note: advancedVisibilityStore is NOT set here because we're using + # Kafka-based async visibility. The ES datastore is still defined below + # and referenced by the worker service for indexing. database: driver: "postgres" sql: From 297dcad85016217084fb68f2950613c3c20d666c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Wed, 19 Nov 2025 10:57:14 -0800 Subject: [PATCH 18/24] fix: explicitly set advancedVisibilityStore to empty string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Must explicitly override the default value of 'es-visibility' with an empty string to disable direct ES writes and enable Kafka-based async visibility. Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres-es7.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index c53cfaf..34b4ae9 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -14,9 +14,8 @@ config: defaultStore: "default" # Disable basic SQL visibility (we're using ES-only via Kafka) visibilityStore: "" - # Note: advancedVisibilityStore is NOT set here because we're using - # Kafka-based async visibility. The ES datastore is still defined below - # and referenced by the worker service for indexing. + # Disable direct ES writes (we're using Kafka-based async visibility) + advancedVisibilityStore: "" database: driver: "postgres" sql: From 805cd4b6dabbef4140e276721df4e1baef9ad5be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Wed, 19 Nov 2025 15:16:49 -0800 Subject: [PATCH 19/24] fix: restore advancedVisibilityStore (required by Cadence) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cadence requires at least one of visibilityStore or advancedVisibilityStore to be set. We keep advancedVisibilityStore='es-visibility' to define the datastore, and use dynamic config system.writeVisibilityStoreName='es' to enable Kafka-based async visibility instead of direct ES writes. Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres-es7.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index 34b4ae9..4e601ec 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -14,8 +14,9 @@ config: defaultStore: "default" # Disable basic SQL visibility (we're using ES-only via Kafka) visibilityStore: "" - # Disable direct ES writes (we're using Kafka-based async visibility) - advancedVisibilityStore: "" + # Name of the advanced visibility datastore (Elasticsearch) + # Note: This defines the datastore, but dynamic config controls how it's used + advancedVisibilityStore: "es-visibility" database: driver: "postgres" sql: From 6b2ec55fd241ba87432f40a5302e6df8247217d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Thu, 20 Nov 2025 09:27:31 -0800 Subject: [PATCH 20/24] fix: provision Kafka topics at startup to avoid race conditions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added Kafka provisioning configuration to pre-create required topics: - __consumer_offsets: Internal Kafka topic for consumer offset tracking - cadence-visibility: Main visibility events topic - cadence-visibility-dlq: Dead letter queue for failed visibility events This prevents race conditions where topics get auto-created with incorrect replication factors before the broker config is fully loaded. All topics are created with replication-factor: 1 to match our single-broker setup. Signed-off-by: “Kevin” --- .../cadence/examples/values.postgres-es7.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index 4e601ec..ca9f8bf 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -3,7 +3,7 @@ # Allow Bitnami charts to use legacy repository images global: image: - tag: "v1.3.6" # Default version - has known schema validation bug + tag: "v1.3.6" # Default version security: allowInsecureImages: true @@ -166,6 +166,22 @@ kafka: offsetsTopicReplicationFactor: 1 transactionStateLogReplicationFactor: 1 transactionStateLogMinIsr: 1 + # Provision topics at startup to avoid race conditions + provisioning: + enabled: true + topics: + - name: __consumer_offsets + partitions: 50 + replicationFactor: 1 + config: + cleanup.policy: compact + compression.type: producer + - name: cadence-visibility + partitions: 4 + replicationFactor: 1 + - name: cadence-visibility-dlq + partitions: 4 + replicationFactor: 1 # Listener configuration listeners: client: From 4ad9d9db1c1b1d2015e1de8327447d00fb157127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Thu, 20 Nov 2025 09:34:05 -0800 Subject: [PATCH 21/24] Ran helm-docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “Kevin” --- charts/cadence/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/cadence/README.md b/charts/cadence/README.md index d6f27d1..0d2eebf 100644 --- a/charts/cadence/README.md +++ b/charts/cadence/README.md @@ -2,7 +2,6 @@ ![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.6](https://img.shields.io/badge/AppVersion-v1.3.6-informational?style=flat-square) -Cadence is a distributed, scalable, durable, and highly available orchestration engine Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way. This chart deploys Uber Cadence server components and web UI. From 15d3d14504cb0aae0c0c7fa66615bb4c67a413fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Thu, 20 Nov 2025 13:18:53 -0800 Subject: [PATCH 22/24] fix: change visibility index name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres-es7.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cadence/examples/values.postgres-es7.yaml b/charts/cadence/examples/values.postgres-es7.yaml index ca9f8bf..6bb48e8 100644 --- a/charts/cadence/examples/values.postgres-es7.yaml +++ b/charts/cadence/examples/values.postgres-es7.yaml @@ -36,7 +36,7 @@ config: protocol: "http" hosts: "cadence-release-elasticsearch.cadence-postgres-es7.svc.cluster.local" port: 9200 - visibilityIndex: "cadence-visibility-v1" + visibilityIndex: "cadence-visibility-es7" tls: enabled: false kafka: # needed by elasticsearch integration From f7e13ac9226f2b3d8514ea569bcde6940417ae01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Tue, 25 Nov 2025 08:33:38 -0800 Subject: [PATCH 23/24] fix: restore elasticsearch check for visibility store config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverts the visibility store conditional logic to include the elasticsearch enabled check. This prevents creating an unnecessary SQL visibility datastore when users enable Elasticsearch without explicitly disabling visibilityStore. Without this check, the default visibilityStore value from values.yaml would be used even when Elasticsearch is enabled, creating both SQL and ES visibility stores unintentionally. Signed-off-by: “Kevin” --- charts/cadence/templates/server-configmap.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cadence/templates/server-configmap.yaml b/charts/cadence/templates/server-configmap.yaml index bb45ee3..5e2a615 100644 --- a/charts/cadence/templates/server-configmap.yaml +++ b/charts/cadence/templates/server-configmap.yaml @@ -42,7 +42,7 @@ data: persistence: numHistoryShards: {{ .Values.config.persistence.numHistoryShards | default 4 }} defaultStore: {{ .Values.config.persistence.defaultStore | default "default" | quote }} - {{- if .Values.config.persistence.visibilityStore }} + {{- if and .Values.config.persistence.visibilityStore (not .Values.config.persistence.elasticsearch.enabled) }} visibilityStore: {{ .Values.config.persistence.visibilityStore | quote }} {{- end }} {{- if and .Values.config.persistence.advancedVisibilityStore .Values.config.persistence.elasticsearch.enabled }} @@ -219,7 +219,7 @@ data: {{- end }} {{- end }} {{- end }} - {{- if .Values.config.persistence.visibilityStore }} + {{- if and .Values.config.persistence.visibilityStore (not .Values.config.persistence.elasticsearch.enabled) }} # Visibility datastore {{ .Values.config.persistence.visibilityStore }}: {{- if eq .Values.config.persistence.database.driver "cassandra" }} From 8a66709d569ea508490e96f5092eb9ddf814b045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKevin=E2=80=9D?= Date: Tue, 25 Nov 2025 09:07:31 -0800 Subject: [PATCH 24/24] fix: explicitly disable Kafka in postgres-only example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added kafka.enabled: false to values.postgres.yaml to prevent unnecessary Kafka deployment when using SQL-only visibility. Kafka is only needed for async visibility processing with Elasticsearch. Signed-off-by: “Kevin” --- charts/cadence/examples/values.postgres.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/cadence/examples/values.postgres.yaml b/charts/cadence/examples/values.postgres.yaml index eb13fc6..296734a 100644 --- a/charts/cadence/examples/values.postgres.yaml +++ b/charts/cadence/examples/values.postgres.yaml @@ -41,9 +41,11 @@ postgresql: enabled: true size: 8Gi -# Do NOT deploy ES, Cassandra or MySQL +# Do NOT deploy ES, Kafka, Cassandra or MySQL elasticsearch: enabled: false +kafka: + enabled: false cassandra: enabled: false mysql: