Skip to content

Commit 03c93ab

Browse files
authored
support schema upgrade (#18)
Why Existing schema-job only runs once. It means that version upgrade won't work if there is a schema change. To support it, we can put version name into the schema-job so k8s cluster would create a new job that upgrades the schema. Changes add version into schema job name. Test Tested in GCP
1 parent fbe68b8 commit 03c93ab

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

charts/cadence/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.1
18+
version: 0.1.2
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/cadence/templates/schema-job.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: batch/v1
22
kind: Job
33
metadata:
4-
name: cadence-schema-setup
4+
name: cadence-schema-setup-v{{ .Values.cassandra.schema.version | replace "." "-" }}
55
labels:
66
{{- include "cadence.commonlabels" . | nindent 4 }}
77
spec:

charts/cadence/values.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ cassandra:
88
endpoint: ""
99
schema:
1010
# -- Cassandra schema version of the Cadence keyspace to use. Latest value can be found at https://github.com/uber/cadence/blob/master/schema/cassandra/version.go
11-
version: 0.40
11+
version: "0.40"
1212
# -- Cassandra schema version of the Cadence visibility keyspace to use. Latest value can be found at https://github.com/uber/cadence/blob/master/schema/cassandra/version.go
13-
visibility_version: 0.9
13+
visibility_version: "0.9"
1414
deployment:
1515
# -- When enabled, a single instance Cassandra will be deployed as part of the Helm chart
1616
# -- When disabled, the Cassandra deployment is expected to be provided externally. For production use cases, it is recommended to use an external Cassandra deployment.

0 commit comments

Comments
 (0)