Created
February 27, 2024 02:19
-
-
Save sebastian-violet/148afbb4ee63d95e70f322ab7610f881 to your computer and use it in GitHub Desktop.
git diff 947732e...79d3282
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.github/workflows/publish-charts.yml b/.github/workflows/publish-charts.yml | |
new file mode 100644 | |
index 0000000..8f660ff | |
--- /dev/null | |
+++ b/.github/workflows/publish-charts.yml | |
@@ -0,0 +1,75 @@ | |
+name: Release Charts | |
+ | |
+on: | |
+ workflow_dispatch: | |
+ inputs: | |
+ version: | |
+ description: "Temporal version to use for release (for example 1.22.4)" | |
+ required: true | |
+ bump: | |
+ description: "Chart version bump level" | |
+ required: true | |
+ type: choice | |
+ default: minor | |
+ options: | |
+ - minor | |
+ - patch | |
+ | |
+jobs: | |
+ release: | |
+ permissions: | |
+ contents: write | |
+ runs-on: ubuntu-latest | |
+ steps: | |
+ - name: Generate token | |
+ id: generate_token | |
+ uses: actions/create-github-app-token@v1 | |
+ with: | |
+ app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }} | |
+ private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }} | |
+ | |
+ - name: Checkout | |
+ uses: actions/checkout@v4 | |
+ with: | |
+ persist-credentials: true | |
+ token: ${{ steps.generate_token.outputs.token }} | |
+ fetch-depth: 0 | |
+ fetch-tags: true | |
+ | |
+ - name: Configure Git | |
+ run: | | |
+ git config --local user.name 'Temporal Data' | |
+ git config --local user.email 'commander-data@temporal.io' | |
+ | |
+ - name: Update Temporal chart version | |
+ working-directory: charts/temporal | |
+ run: | | |
+ RE='([0-9]+)\.([0-9]+)\.([0-9]+)' | |
+ | |
+ current="$(grep -m 1 '^version:' Chart.yaml | awk '{print $2}')" | |
+ | |
+ MAJOR=`echo $current | sed -E "s#$RE#\1#"` | |
+ MINOR=`echo $current | sed -E "s#$RE#\2#"` | |
+ PATCH=`echo $current | sed -E "s#$RE#\3#"` | |
+ | |
+ if [ "${{ github.event.inputs.bump }}" == "minor" ]; then | |
+ MINOR=$((MINOR+1)) | |
+ PATCH=0 | |
+ else | |
+ PATCH=$((PATCH+1)) | |
+ fi | |
+ NEW_VERSION="$MAJOR.$MINOR.$PATCH" | |
+ | |
+ sed -i -e "s/^version: .*/version: $NEW_VERSION/" Chart.yaml | |
+ sed -i -e "s/^appVersion: .*/appVersion: ${{ github.event.inputs.version }}/" Chart.yaml | |
+ | |
+ git commit -m "Update Chart to $NEW_VERSION, Temporal v${{ github.event.inputs.version }}" Chart.yaml | |
+ git push origin | |
+ | |
+ - name: Install Helm | |
+ uses: azure/setup-helm@v3 | |
+ | |
+ - name: Run chart-releaser | |
+ uses: helm/chart-releaser-action@v1.6.0 | |
+ env: | |
+ CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
diff --git a/README.md b/README.md | |
index 97d798c..ac2200c 100644 | |
--- a/README.md | |
+++ b/README.md | |
@@ -16,17 +16,18 @@ This Helm Chart code is tested by a dedicated test pipeline. It is also used ext | |
This sequence assumes | |
* that your system is configured to access a kubernetes cluster (e. g. [AWS EKS](https://aws.amazon.com/eks/), [kind](https://kind.sigs.k8s.io/), or [minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/)), and | |
* that your machine has | |
- - [AWS CLI V2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html), | |
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/), and | |
- [Helm v3](https://helm.sh) | |
installed and able to access your cluster. | |
+This repo only contains one chart currently, but is structured in the standard helm repo way. This means you will find the chart in the `charts/temporal` directory. All example `helm` commands below should be run from that directory. | |
+ | |
## Download Helm Chart Dependencies | |
Download Helm dependencies: | |
```bash | |
-~/temporal-helm$ helm dependencies update | |
+helm dependencies update | |
``` | |
## Install Temporal with Helm Chart | |
@@ -44,8 +45,8 @@ The sections that follow describe various deployment configurations, from a mini | |
To install Temporal in a limited but working and self-contained configuration (one replica of Cassandra and each of Temporal's services, no metrics or ElasticSearch), you can run the following command | |
-``` | |
-~/temporal-helm$ helm install \ | |
+```bash | |
+helm install \ | |
--set server.replicaCount=1 \ | |
--set cassandra.config.cluster_size=1 \ | |
--set prometheus.enabled=false \ | |
@@ -80,7 +81,7 @@ By default, Temporal Helm Chart configures Temporal to run with a three node Cas | |
To install Temporal with all of its dependencies run this command: | |
```bash | |
-~/temporal-helm$ helm install temporaltest . --timeout 900s | |
+helm install temporaltest . --timeout 900s | |
``` | |
To use your own instance of ElasticSearch, MySQL, PostgreSQL, or Cassandra, please read the "Bring Your Own" sections below. | |
@@ -88,7 +89,7 @@ To use your own instance of ElasticSearch, MySQL, PostgreSQL, or Cassandra, plea | |
Other components (Prometheus, Grafana) can be omitted from the installation by setting their corresponding `enable` flag to `false`: | |
```bash | |
-~/temporal-helm$ helm install \ | |
+helm install \ | |
--set prometheus.enabled=false \ | |
--set grafana.enabled=false \ | |
temporaltest . --timeout 900s | |
@@ -103,7 +104,7 @@ To do so, you may look at the example for Google's `cloud sql proxy` in the `val | |
Example: | |
```bash | |
-~/temporal-helm$ helm install -f values/values.cloudsqlproxy.yaml temporaltest . --timeout 900s | |
+helm install -f values/values.cloudsqlproxy.yaml temporaltest . --timeout 900s | |
``` | |
### Install with your own ElasticSearch | |
@@ -115,7 +116,7 @@ To do so, fill in the relevant configuration values in `values.elasticsearch.yam | |
Example: | |
```bash | |
-~/temporal-helm$ helm install -f values/values.elasticsearch.yaml temporaltest . --timeout 900s | |
+helm install -f values/values.elasticsearch.yaml temporaltest . --timeout 900s | |
``` | |
### Install with your own MySQL | |
@@ -128,7 +129,7 @@ Here are examples of commands you can use to create and initialize the databases | |
```bash | |
# in https://github.com/temporalio/temporal git repo dir | |
-export SQL_PLUGIN=mysql | |
+export SQL_PLUGIN=mysql8 | |
export SQL_HOST=mysql_host | |
export SQL_PORT=3306 | |
export SQL_USER=mysql_user | |
@@ -138,11 +139,11 @@ make temporal-sql-tool | |
./temporal-sql-tool --database temporal create-database | |
SQL_DATABASE=temporal ./temporal-sql-tool setup-schema -v 0.0 | |
-SQL_DATABASE=temporal ./temporal-sql-tool update -schema-dir schema/mysql/v57/temporal/versioned | |
+SQL_DATABASE=temporal ./temporal-sql-tool update -schema-dir schema/mysql/v8/temporal/versioned | |
./temporal-sql-tool --database temporal_visibility create-database | |
SQL_DATABASE=temporal_visibility ./temporal-sql-tool setup-schema -v 0.0 | |
-SQL_DATABASE=temporal_visibility ./temporal-sql-tool update -schema-dir schema/mysql/v57/visibility/versioned | |
+SQL_DATABASE=temporal_visibility ./temporal-sql-tool update -schema-dir schema/mysql/v8/visibility/versioned | |
``` | |
Once you initialized the two databases, fill in the configuration values in `values/values.mysql.yaml`, and run | |
@@ -165,7 +166,7 @@ helm install -f values/values.mysql.yaml temporaltest \ | |
--set server.config.persistence.default.sql.host=mysql_host \ | |
--set server.config.persistence.visibility.sql.host=mysql_host . --timeout 900s | |
``` | |
-*NOTE:* For MYSQL <5.7.20 (e.g AWS Aurora MySQL) use `values/values.aurora-mysql.yaml` | |
+*NOTE:* Requires MySQL 8.0.17+, older versions are not supported. | |
### Install with your own PostgreSQL | |
@@ -177,7 +178,7 @@ Here are examples of commands you can use to create and initialize the databases | |
```bash | |
# in https://github.com/temporalio/temporal git repo dir | |
-export SQL_PLUGIN=postgres | |
+export SQL_PLUGIN=postgres12 | |
export SQL_HOST=postgresql_host | |
export SQL_PORT=5432 | |
export SQL_USER=postgresql_user | |
@@ -187,11 +188,11 @@ make temporal-sql-tool | |
./temporal-sql-tool --database temporal create-database | |
SQL_DATABASE=temporal ./temporal-sql-tool setup-schema -v 0.0 | |
-SQL_DATABASE=temporal ./temporal-sql-tool update -schema-dir schema/postgresql/v96/temporal/versioned | |
+SQL_DATABASE=temporal ./temporal-sql-tool update -schema-dir schema/postgresql/v12/temporal/versioned | |
./temporal-sql-tool --database temporal_visibility create-database | |
SQL_DATABASE=temporal_visibility ./temporal-sql-tool setup-schema -v 0.0 | |
-SQL_DATABASE=temporal_visibility ./temporal-sql-tool update -schema-dir schema/postgresql/v96/visibility/versioned | |
+SQL_DATABASE=temporal_visibility ./temporal-sql-tool update -schema-dir schema/postgresql/v12/visibility/versioned | |
``` | |
Once you initialized the two databases, fill in the configuration values in `values/values.postgresql.yaml`, and run | |
@@ -215,13 +216,14 @@ helm install -f values/values.postgresql.yaml temporaltest \ | |
--set server.config.persistence.visibility.sql.host=postgresql_host . --timeout 900s | |
``` | |
+*NOTE:* Requires PostgreSQL 12+, older versions are not supported. | |
+ | |
### Install with your own Cassandra | |
You might already be operating a Cassandra instance that you want to use with Temporal. | |
In this case, create and setup keyspaces in your Cassandra instance with `temporal-cassandra-tool`. The tool is part of [temporal repo](https://github.com/temporalio/temporal), and it relies on the schema definition, in the same repo. | |
- | |
Here are examples of commands you can use to create and initialize the keyspaces: | |
```bash | |
@@ -234,18 +236,16 @@ export CASSANDRA_PASSWORD=cassandra_user_password | |
./temporal-cassandra-tool create-Keyspace -k temporal | |
CASSANDRA_KEYSPACE=temporal ./temporal-cassandra-tool setup-schema -v 0.0 | |
CASSANDRA_KEYSPACE=temporal ./temporal-cassandra-tool update -schema-dir schema/cassandra/temporal/versioned | |
- | |
-./temporal-cassandra-tool create-Keyspace -k temporal_visibility | |
-CASSANDRA_KEYSPACE=temporal_visibility ./temporal-cassandra-tool setup-schema -v 0.0 | |
-CASSANDRA_KEYSPACE=temporal_visibility ./temporal-cassandra-tool update -schema-dir schema/cassandra/visibility/versioned | |
``` | |
Once you initialized the two keyspaces, fill in the configuration values in `values/values.cassandra.yaml`, and run | |
```bash | |
-~/temporal-helm$ helm install -f values/values.cassandra.yaml temporaltest . --timeout 900s | |
+helm install -f values/values.cassandra.yaml temporaltest . --timeout 900s | |
``` | |
+Note that Temporal cannot run without setting up a store for Visibility, and Cassandra is not a supported database for Visibility. We recommend using Elasticsearch in this case (see below how to setup). | |
+ | |
### Enable Archival | |
By default archival is disabled. You can enable it by picking one of the three provider options: | |
@@ -281,28 +281,22 @@ The example below demonstrates a few things: | |
```bash | |
helm install temporaltest \ | |
- -f values/values.cassandra.yaml \ | |
- -f values/values.elasticsearch.yaml \ | |
- --set grafana.enabled=false \ | |
- --set prometheus.enabled=false \ | |
- --set server.replicaCount=5 \ | |
- --set server.config.persistence.default.cassandra.hosts=cassandra.data.host.example \ | |
- --set server.config.persistence.default.cassandra.user=cassandra_user \ | |
- --set server.config.persistence.default.cassandra.password=cassandra_user_password \ | |
- --set server.config.persistence.default.cassandra.tls.caData=$(base64 --wrap=0 cassandra.ca.pem) \ | |
- --set server.config.persistence.default.cassandra.tls.enabled=true \ | |
- --set server.config.persistence.default.cassandra.replicationFactor=3 \ | |
- --set server.config.persistence.default.cassandra.keyspace=temporal \ | |
- --set server.config.persistence.visibility.cassandra.hosts=cassandra.vis.host.example \ | |
- --set server.config.persistence.visibility.cassandra.user=cassandra_user_vis \ | |
- --set server.config.persistence.visibility.cassandra.password=cassandra_user_vis_password \ | |
- --set server.config.persistence.visibility.cassandra.tls.caData=$(base64 --wrap=0 cassandra.ca.pem) \ | |
- --set server.config.persistence.visibility.cassandra.tls.enabled=true \ | |
- --set server.config.persistence.visibility.cassandra.replicationFactor=3 \ | |
- --set server.config.persistence.visibility.cassandra.keyspace=temporal_visibility \ | |
- . \ | |
- --timeout 15m \ | |
- --wait | |
+ -f values/values.cassandra.yaml \ | |
+ -f values/values.elasticsearch.yaml \ | |
+ --set elasticsearch.enabled=true \ | |
+ --set grafana.enabled=false \ | |
+ --set prometheus.enabled=false \ | |
+ --set server.replicaCount=5 \ | |
+ --set server.config.persistence.default.cassandra.hosts=cassandra.data.host.example \ | |
+ --set server.config.persistence.default.cassandra.user=cassandra_user \ | |
+ --set server.config.persistence.default.cassandra.password=cassandra_user_password \ | |
+ --set server.config.persistence.default.cassandra.tls.caData=$(base64 --wrap=0 cassandra.ca.pem) \ | |
+ --set server.config.persistence.default.cassandra.tls.enabled=true \ | |
+ --set server.config.persistence.default.cassandra.replicationFactor=3 \ | |
+ --set server.config.persistence.default.cassandra.keyspace=temporal \ | |
+ . \ | |
+ --timeout 15m \ | |
+ --wait | |
``` | |
## Play With It | |
@@ -454,11 +448,11 @@ By default dynamic config is empty, if you want to override some properties for | |
2. Populate it with some values under server.dynamicConfig prefix (use the sample provided at `values/values.dynamic_config.yaml` as a starting point) | |
3. Install your helm configuration: | |
```bash | |
-$ helm install -f values/values.dynamic_config.yaml temporaltest . --timeout 900s | |
+helm install -f values/values.dynamic_config.yaml temporaltest . --timeout 900s | |
``` | |
Note that if you already have a running cluster you can use the "helm upgrade" command to change dynamic config values: | |
```bash | |
-$ helm upgrade -f values/values.dynamic_config.yaml temporaltest . --timeout 900s | |
+helm upgrade -f values/values.dynamic_config.yaml temporaltest . --timeout 900s | |
``` | |
WARNING: The "helm upgrade" approach will trigger a rolling upgrade of all the pods. | |
@@ -466,7 +460,7 @@ WARNING: The "helm upgrade" approach will trigger a rolling upgrade of all the p | |
If a rolling upgrade is not desirable, you can also generate the ConfigMap file explicitly and then apply it using the following command: | |
```bash | |
-$ kubectl apply -f dynamicconfigmap.yaml | |
+kubectl apply -f dynamicconfigmap.yaml | |
``` | |
You can use helm upgrade with the "--dry-run" option to generate the content for the dynamicconfigmap.yaml. | |
@@ -480,7 +474,7 @@ the config file `server/config.yml` for the temporal web ui is referenced as a m | |
Note: in this example chart, uninstalling a Temporal instance also removes all the data that might have been created during its lifetime. | |
```bash | |
-~/temporal-helm $ helm uninstall temporaltest | |
+helm uninstall temporaltest | |
``` | |
## Upgrading | |
@@ -495,7 +489,7 @@ Example: | |
### Upgrade Schema | |
-Here are examples of commands you can use to upgrade the "default" and "visibility" schemas in your "bring your own" Cassandra database. | |
+Here are examples of commands you can use to upgrade the "default" schema in your "bring your own" Cassandra database. | |
Upgrade default schema: | |
@@ -512,32 +506,18 @@ temporal_v1.2.1 $ temporal-cassandra-tool \ | |
--schema-dir ./schema/cassandra/temporal/versioned | |
``` | |
-Upgrade visibility schema: | |
- | |
-``` | |
-temporal_v1.2.1 $ temporal-cassandra-tool \ | |
- --tls \ | |
- --tls-ca-file ... \ | |
- --user cassandra-user \ | |
- --password cassandra-password \ | |
- --endpoint cassandra.example.com \ | |
- --keyspace temporal_visibility \ | |
- --timeout 120 \ | |
- update \ | |
- --schema-dir ./schema/cassandra/visibility/versioned | |
-``` | |
- | |
To upgrade your MySQL database, please use `temporal-sql-tool` tool instead of `temporal-cassandra-tool`. | |
### Upgrade Temporal Instance's Docker Images | |
Here is an example of a `helm upgrade` command that can be used to upgrade a cluster: | |
-``` | |
-helm-charts $ helm \ | |
+```bash | |
+helm \ | |
upgrade \ | |
temporaltest \ | |
-f values/values.cassandra.yaml \ | |
+ -f values/values.elasticsearch.yaml \ | |
--set elasticsearch.enabled=true \ | |
--set server.replicaCount=8 \ | |
--set server.config.persistence.default.cassandra.hosts='{c1.example.com,c2.example.com,c3.example.com}' \ | |
@@ -547,13 +527,6 @@ helm-charts $ helm \ | |
--set server.config.persistence.default.cassandra.tls.enabled=true \ | |
--set server.config.persistence.default.cassandra.replicationFactor=3 \ | |
--set server.config.persistence.default.cassandra.keyspace=temporal \ | |
- --set server.config.persistence.visibility.cassandra.hosts='{c1.example.com,c2.example.com,c3.example.com}' \ | |
- --set server.config.persistence.visibility.cassandra.user=cassandra-user \ | |
- --set server.config.persistence.visibility.cassandra.password=cassandra-password \ | |
- --set server.config.persistence.visibility.cassandra.tls.caData=... \ | |
- --set server.config.persistence.visibility.cassandra.tls.enabled=true \ | |
- --set server.config.persistence.visibility.cassandra.replicationFactor=3 \ | |
- --set server.config.persistence.visibility.cassandra.keyspace=temporal_visibility \ | |
--set server.image.tag=1.2.1 \ | |
--set server.image.repository=temporalio/server \ | |
--set admintools.image.tag=1.2.1 \ | |
diff --git a/.gitignore b/charts/temporal/.gitignore | |
similarity index 100% | |
rename from .gitignore | |
rename to charts/temporal/.gitignore | |
diff --git a/.helmignore b/charts/temporal/.helmignore | |
similarity index 100% | |
rename from .helmignore | |
rename to charts/temporal/.helmignore | |
diff --git a/Chart.yaml b/charts/temporal/Chart.yaml | |
similarity index 99% | |
rename from Chart.yaml | |
rename to charts/temporal/Chart.yaml | |
index 0a8dc84..e5361b0 100644 | |
--- a/Chart.yaml | |
+++ b/charts/temporal/Chart.yaml | |
@@ -49,7 +49,7 @@ type: application | |
# This is the chart version. This version number should be incremented each time you make changes | |
# to the chart and its templates, including the app version. | |
-version: 0.32.0 | |
+version: 0.33.0 | |
# This is the version number of the application being deployed. This version number should be | |
# incremented each time you make changes to the application. | |
diff --git a/templates/NOTES.txt b/charts/temporal/templates/NOTES.txt | |
similarity index 100% | |
rename from templates/NOTES.txt | |
rename to charts/temporal/templates/NOTES.txt | |
diff --git a/templates/_helpers.tpl b/charts/temporal/templates/_helpers.tpl | |
similarity index 98% | |
rename from templates/_helpers.tpl | |
rename to charts/temporal/templates/_helpers.tpl | |
index dbf2146..35897f9 100644 | |
--- a/templates/_helpers.tpl | |
+++ b/charts/temporal/templates/_helpers.tpl | |
@@ -238,9 +238,9 @@ Source: https://stackoverflow.com/a/52024583/3027614 | |
{{- $storeConfig := index $global.Values.server.config.persistence $store -}} | |
{{- if $storeConfig.sql.host -}} | |
{{- $storeConfig.sql.host -}} | |
-{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql")) -}} | |
+{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}} | |
{{- include "mysql.host" $global -}} | |
-{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres")) -}} | |
+{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}} | |
{{- include "postgresql.host" $global -}} | |
{{- else -}} | |
{{- required (printf "Please specify sql host for %s store" $store) $storeConfig.sql.host -}} | |
@@ -253,9 +253,9 @@ Source: https://stackoverflow.com/a/52024583/3027614 | |
{{- $storeConfig := index $global.Values.server.config.persistence $store -}} | |
{{- if $storeConfig.sql.port -}} | |
{{- $storeConfig.sql.port -}} | |
-{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql")) -}} | |
+{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}} | |
{{- $global.Values.mysql.service.port -}} | |
-{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres")) -}} | |
+{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}} | |
{{- $global.Values.postgresql.service.port -}} | |
{{- else -}} | |
{{- required (printf "Please specify sql port for %s store" $store) $storeConfig.sql.port -}} | |
@@ -268,9 +268,9 @@ Source: https://stackoverflow.com/a/52024583/3027614 | |
{{- $storeConfig := index $global.Values.server.config.persistence $store -}} | |
{{- if $storeConfig.sql.user -}} | |
{{- $storeConfig.sql.user -}} | |
-{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql")) -}} | |
+{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}} | |
{{- $global.Values.mysql.mysqlUser -}} | |
-{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres")) -}} | |
+{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}} | |
{{- $global.Values.postgresql.postgresqlUser -}} | |
{{- else -}} | |
{{- required (printf "Please specify sql user for %s store" $store) $storeConfig.sql.user -}} | |
@@ -283,13 +283,13 @@ Source: https://stackoverflow.com/a/52024583/3027614 | |
{{- $storeConfig := index $global.Values.server.config.persistence $store -}} | |
{{- if $storeConfig.sql.password -}} | |
{{- $storeConfig.sql.password -}} | |
-{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql")) -}} | |
+{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}} | |
{{- if or $global.Values.schema.setup.enabled $global.Values.schema.update.enabled -}} | |
{{- required "Please specify password for MySQL chart" $global.Values.mysql.mysqlPassword -}} | |
{{- else -}} | |
{{- $global.Values.mysql.mysqlPassword -}} | |
{{- end -}} | |
-{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres")) -}} | |
+{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}} | |
{{- if or $global.Values.schema.setup.enabled $global.Values.schema.update.enabled -}} | |
{{- required "Please specify password for PostgreSQL chart" $global.Values.postgresql.postgresqlPassword -}} | |
{{- else -}} | |
@@ -308,9 +308,9 @@ Source: https://stackoverflow.com/a/52024583/3027614 | |
{{- $storeConfig.sql.existingSecret -}} | |
{{- else if $storeConfig.sql.password -}} | |
{{- include "temporal.componentname" (list $global (printf "%s-store" $store)) -}} | |
-{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql")) -}} | |
+{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}} | |
{{- include "call-nested" (list $global "mysql" "mysql.secretName") -}} | |
-{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres")) -}} | |
+{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}} | |
{{- include "call-nested" (list $global "postgresql" "postgresql.secretName") -}} | |
{{- else -}} | |
{{- required (printf "Please specify sql password or existing secret for %s store" $store) $storeConfig.sql.existingSecret -}} | |
@@ -323,9 +323,9 @@ Source: https://stackoverflow.com/a/52024583/3027614 | |
{{- $storeConfig := index $global.Values.server.config.persistence $store -}} | |
{{- if or $storeConfig.sql.existingSecret $storeConfig.sql.password -}} | |
{{- print "password" -}} | |
-{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql")) -}} | |
+{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}} | |
{{- print "mysql-password" -}} | |
-{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres")) -}} | |
+{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}} | |
{{- print "postgresql-password" -}} | |
{{- else -}} | |
{{- fail (printf "Please specify sql password or existing secret for %s store" $store) -}} | |
diff --git a/templates/admintools-deployment.yaml b/charts/temporal/templates/admintools-deployment.yaml | |
similarity index 100% | |
rename from templates/admintools-deployment.yaml | |
rename to charts/temporal/templates/admintools-deployment.yaml | |
diff --git a/templates/admintools-service.yaml b/charts/temporal/templates/admintools-service.yaml | |
similarity index 100% | |
rename from templates/admintools-service.yaml | |
rename to charts/temporal/templates/admintools-service.yaml | |
diff --git a/templates/server-configmap.yaml b/charts/temporal/templates/server-configmap.yaml | |
similarity index 92% | |
rename from templates/server-configmap.yaml | |
rename to charts/temporal/templates/server-configmap.yaml | |
index 2bfd389..18a19f8 100644 | |
--- a/templates/server-configmap.yaml | |
+++ b/charts/temporal/templates/server-configmap.yaml | |
@@ -57,15 +57,6 @@ data: | |
{{- end }} | |
{{- end }} | |
visibility: | |
- {{- if eq (include "temporal.persistence.driver" (list $ "visibility")) "cassandra" }} | |
- cassandra: | |
- hosts: "{{ include "temporal.persistence.cassandra.hosts" (list $ "visibility") }}" | |
- port: {{ include "temporal.persistence.cassandra.port" (list $ "visibility") }} | |
- password: "{{ `{{ .Env.TEMPORAL_VISIBILITY_STORE_PASSWORD }}` }}" | |
- {{- with (omit $.Values.server.config.persistence.visibility.cassandra "hosts" "port" "password" "existingSecret") }} | |
- {{- toYaml . | nindent 12 }} | |
- {{- end }} | |
- {{- end }} | |
{{- if eq (include "temporal.persistence.driver" (list $ "default")) "sql" }} | |
sql: | |
pluginName: "{{ include "temporal.persistence.sql.driver" (list $ "visibility") }}" | |
diff --git a/templates/server-deployment.yaml b/charts/temporal/templates/server-deployment.yaml | |
similarity index 94% | |
rename from templates/server-deployment.yaml | |
rename to charts/temporal/templates/server-deployment.yaml | |
index 8c23e20..c763c00 100644 | |
--- a/templates/server-deployment.yaml | |
+++ b/charts/temporal/templates/server-deployment.yaml | |
@@ -65,10 +65,6 @@ spec: | |
image: "{{ $.Values.cassandra.image.repo }}:{{ $.Values.cassandra.image.tag }}" | |
imagePullPolicy: {{ $.Values.cassandra.image.pullPolicy }} | |
command: ['sh', '-c', 'until cqlsh {{ include "cassandra.host" $ }} {{ $.Values.cassandra.config.ports.cql }} -e "SELECT keyspace_name FROM system_schema.keyspaces" | grep {{ $.Values.server.config.persistence.default.cassandra.keyspace }}$; do echo waiting for default keyspace to become ready; sleep 1; done;'] | |
- - name: check-cassandra-visibility-schema | |
- image: "{{ $.Values.cassandra.image.repo }}:{{ $.Values.cassandra.image.tag }}" | |
- imagePullPolicy: {{ $.Values.cassandra.image.pullPolicy }} | |
- command: ['sh', '-c', 'until cqlsh {{ include "cassandra.host" $ }} {{ $.Values.cassandra.config.ports.cql }} -e "SELECT keyspace_name FROM system_schema.keyspaces" | grep {{ $.Values.server.config.persistence.visibility.cassandra.keyspace }}$; do echo waiting for visibility keyspace to become ready; sleep 1; done;'] | |
{{- end }} | |
{{- if or $.Values.elasticsearch.enabled $.Values.elasticsearch.external }} | |
- name: check-elasticsearch-index | |
diff --git a/templates/server-dynamicconfigmap.yaml b/charts/temporal/templates/server-dynamicconfigmap.yaml | |
similarity index 100% | |
rename from templates/server-dynamicconfigmap.yaml | |
rename to charts/temporal/templates/server-dynamicconfigmap.yaml | |
diff --git a/templates/server-job.yaml b/charts/temporal/templates/server-job.yaml | |
similarity index 96% | |
rename from templates/server-job.yaml | |
rename to charts/temporal/templates/server-job.yaml | |
index 77c5e9b..16b9ace 100644 | |
--- a/templates/server-job.yaml | |
+++ b/charts/temporal/templates/server-job.yaml | |
@@ -39,7 +39,7 @@ spec: | |
{{ include "temporal.serviceAccount" . }} | |
restartPolicy: "OnFailure" | |
initContainers: | |
- {{- if or .Values.cassandra.enabled (eq (include "temporal.persistence.driver" (list $ "default")) "cassandra") (eq (include "temporal.persistence.driver" (list $ "visibility")) "cassandra") }} | |
+ {{- if or .Values.cassandra.enabled (eq (include "temporal.persistence.driver" (list $ "default")) "cassandra") }} | |
{{- if .Values.cassandra.enabled }} | |
- name: check-cassandra-service | |
image: busybox | |
@@ -254,18 +254,15 @@ spec: | |
{{- end }} | |
containers: | |
{{- range $store := (list "default" "visibility") }} | |
+ {{- if or (eq $store "default") (eq (include "temporal.persistence.driver" (list $ $store)) "sql") }} | |
{{- $storeConfig := index $.Values.server.config.persistence $store }} | |
- name: {{ $store }}-schema | |
image: "{{ $.Values.admintools.image.repository }}:{{ $.Values.admintools.image.tag }}" | |
imagePullPolicy: {{ $.Values.admintools.image.pullPolicy }} | |
{{- if eq (include "temporal.persistence.driver" (list $ $store)) "cassandra" }} | |
command: ['temporal-{{ include "temporal.persistence.driver" (list $ $store) }}-tool', 'update-schema', '--schema-dir', '/etc/temporal/schema/cassandra/{{ include "temporal.persistence.schema" $store }}/versioned'] | |
- {{- else if eq (include "temporal.persistence.sql.driver" (list $ $store)) "mysql" }} | |
- command: ['temporal-{{ include "temporal.persistence.driver" (list $ $store) }}-tool', 'update-schema', '--schema-dir', '/etc/temporal/schema/mysql/v57/{{ include "temporal.persistence.schema" $store }}/versioned'] | |
{{- else if eq (include "temporal.persistence.sql.driver" (list $ $store)) "mysql8" }} | |
command: ['temporal-{{ include "temporal.persistence.driver" (list $ $store) }}-tool', 'update-schema', '--schema-dir', '/etc/temporal/schema/mysql/v8/{{ include "temporal.persistence.schema" $store }}/versioned'] | |
- {{- else if eq (include "temporal.persistence.sql.driver" (list $ $store)) "postgres" }} | |
- command: ['temporal-{{ include "temporal.persistence.driver" (list $ $store) }}-tool', 'update-schema', '--schema-dir', '/etc/temporal/schema/postgresql/v96/{{ include "temporal.persistence.schema" $store }}/versioned'] | |
{{- else if eq (include "temporal.persistence.sql.driver" (list $ $store)) "postgres12" }} | |
command: ['temporal-{{ include "temporal.persistence.driver" (list $ $store) }}-tool', 'update-schema', '--schema-dir', '/etc/temporal/schema/postgresql/v12/{{ include "temporal.persistence.schema" $store }}/versioned'] | |
{{- end }} | |
@@ -317,6 +314,7 @@ spec: | |
{{- end }} | |
{{- end }} | |
{{- end }} | |
+ {{- end }} | |
{{- end }} | |
{{- with .Values.schema.resources }} | |
resources: | |
diff --git a/templates/server-pdb.yaml b/charts/temporal/templates/server-pdb.yaml | |
similarity index 100% | |
rename from templates/server-pdb.yaml | |
rename to charts/temporal/templates/server-pdb.yaml | |
diff --git a/templates/server-secret.yaml b/charts/temporal/templates/server-secret.yaml | |
similarity index 100% | |
rename from templates/server-secret.yaml | |
rename to charts/temporal/templates/server-secret.yaml | |
diff --git a/templates/server-service-monitor.yaml b/charts/temporal/templates/server-service-monitor.yaml | |
similarity index 100% | |
rename from templates/server-service-monitor.yaml | |
rename to charts/temporal/templates/server-service-monitor.yaml | |
diff --git a/templates/server-service.yaml b/charts/temporal/templates/server-service.yaml | |
similarity index 100% | |
rename from templates/server-service.yaml | |
rename to charts/temporal/templates/server-service.yaml | |
diff --git a/templates/serviceaccount.yaml b/charts/temporal/templates/serviceaccount.yaml | |
similarity index 100% | |
rename from templates/serviceaccount.yaml | |
rename to charts/temporal/templates/serviceaccount.yaml | |
diff --git a/templates/web-configmap.yaml b/charts/temporal/templates/web-configmap.yaml | |
similarity index 100% | |
rename from templates/web-configmap.yaml | |
rename to charts/temporal/templates/web-configmap.yaml | |
diff --git a/templates/web-deployment.yaml b/charts/temporal/templates/web-deployment.yaml | |
similarity index 100% | |
rename from templates/web-deployment.yaml | |
rename to charts/temporal/templates/web-deployment.yaml | |
diff --git a/templates/web-ingress.yaml b/charts/temporal/templates/web-ingress.yaml | |
similarity index 100% | |
rename from templates/web-ingress.yaml | |
rename to charts/temporal/templates/web-ingress.yaml | |
diff --git a/templates/web-service.yaml b/charts/temporal/templates/web-service.yaml | |
similarity index 100% | |
rename from templates/web-service.yaml | |
rename to charts/temporal/templates/web-service.yaml | |
diff --git a/values.yaml b/charts/temporal/values.yaml | |
similarity index 100% | |
rename from values.yaml | |
rename to charts/temporal/values.yaml | |
diff --git a/values/values.antiaffinity.yaml b/charts/temporal/values/values.antiaffinity.yaml | |
similarity index 100% | |
rename from values/values.antiaffinity.yaml | |
rename to charts/temporal/values/values.antiaffinity.yaml | |
diff --git a/values/values.archival.filestore.yaml b/charts/temporal/values/values.archival.filestore.yaml | |
similarity index 100% | |
rename from values/values.archival.filestore.yaml | |
rename to charts/temporal/values/values.archival.filestore.yaml | |
diff --git a/values/values.archival.gcloud.yaml b/charts/temporal/values/values.archival.gcloud.yaml | |
similarity index 100% | |
rename from values/values.archival.gcloud.yaml | |
rename to charts/temporal/values/values.archival.gcloud.yaml | |
diff --git a/values/values.archival.s3.yaml b/charts/temporal/values/values.archival.s3.yaml | |
similarity index 100% | |
rename from values/values.archival.s3.yaml | |
rename to charts/temporal/values/values.archival.s3.yaml | |
diff --git a/values/values.aurora-mysql.yaml b/charts/temporal/values/values.aurora-mysql.yaml | |
similarity index 100% | |
rename from values/values.aurora-mysql.yaml | |
rename to charts/temporal/values/values.aurora-mysql.yaml | |
diff --git a/values/values.cassandra.yaml b/charts/temporal/values/values.cassandra.yaml | |
similarity index 74% | |
rename from values/values.cassandra.yaml | |
rename to charts/temporal/values/values.cassandra.yaml | |
index 4163698..af0f9c5 100644 | |
--- a/values/values.cassandra.yaml | |
+++ b/charts/temporal/values/values.cassandra.yaml | |
@@ -39,22 +39,6 @@ server: | |
consistency: "local_quorum" | |
serialConsistency: "local_serial" | |
- visibility: | |
- driver: "cassandra" | |
- | |
- cassandra: | |
- hosts: ["cassandra.default.svc.cluster.local"] | |
- port: 9042 | |
- keyspace: temporal_visibility | |
- user: "user" | |
- password: "password" | |
- existingSecret: "" | |
- replicationFactor: 1 | |
- consistency: | |
- default: | |
- consistency: "local_quorum" | |
- serialConsistency: "local_serial" | |
- | |
cassandra: | |
enabled: false | |
diff --git a/values/values.cloudsqlproxy.yaml b/charts/temporal/values/values.cloudsqlproxy.yaml | |
similarity index 100% | |
rename from values/values.cloudsqlproxy.yaml | |
rename to charts/temporal/values/values.cloudsqlproxy.yaml | |
diff --git a/values/values.dynamic_config.yaml b/charts/temporal/values/values.dynamic_config.yaml | |
similarity index 100% | |
rename from values/values.dynamic_config.yaml | |
rename to charts/temporal/values/values.dynamic_config.yaml | |
diff --git a/values/values.elasticsearch.yaml b/charts/temporal/values/values.elasticsearch.yaml | |
similarity index 100% | |
rename from values/values.elasticsearch.yaml | |
rename to charts/temporal/values/values.elasticsearch.yaml | |
diff --git a/values/values.mysql.yaml b/charts/temporal/values/values.mysql.yaml | |
similarity index 92% | |
rename from values/values.mysql.yaml | |
rename to charts/temporal/values/values.mysql.yaml | |
index 8d22826..b081a34 100644 | |
--- a/values/values.mysql.yaml | |
+++ b/charts/temporal/values/values.mysql.yaml | |
@@ -5,7 +5,7 @@ server: | |
driver: "sql" | |
sql: | |
- driver: "mysql" | |
+ driver: "mysql8" | |
host: _HOST_ | |
port: 3306 | |
database: temporal | |
@@ -18,7 +18,7 @@ server: | |
driver: "sql" | |
sql: | |
- driver: "mysql" | |
+ driver: "mysql8" | |
host: _HOST_ | |
port: 3306 | |
database: temporal_visibility | |
diff --git a/values/values.ndc.yaml b/charts/temporal/values/values.ndc.yaml | |
similarity index 100% | |
rename from values/values.ndc.yaml | |
rename to charts/temporal/values/values.ndc.yaml | |
diff --git a/values/values.postgresql.yaml b/charts/temporal/values/values.postgresql.yaml | |
similarity index 96% | |
rename from values/values.postgresql.yaml | |
rename to charts/temporal/values/values.postgresql.yaml | |
index 1c84bad..744c42e 100644 | |
--- a/values/values.postgresql.yaml | |
+++ b/charts/temporal/values/values.postgresql.yaml | |
@@ -5,7 +5,7 @@ server: | |
driver: "sql" | |
sql: | |
- driver: "postgres" | |
+ driver: "postgres12" | |
host: _HOST_ | |
port: 5432 | |
database: temporal | |
@@ -25,7 +25,7 @@ server: | |
driver: "sql" | |
sql: | |
- driver: "postgres" | |
+ driver: "postgres12" | |
host: _HOST_ | |
port: 5432 | |
database: temporal_visibility | |
diff --git a/values/values.prometheus.external.yaml b/charts/temporal/values/values.prometheus.external.yaml | |
similarity index 100% | |
rename from values/values.prometheus.external.yaml | |
rename to charts/temporal/values/values.prometheus.external.yaml | |
diff --git a/values/values.resources.yaml b/charts/temporal/values/values.resources.yaml | |
similarity index 100% | |
rename from values/values.resources.yaml | |
rename to charts/temporal/values/values.resources.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment