Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change chart cadence according v1.0.0 #1345

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cadence/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: cadence
version: 0.24.2
appVersion: 0.24.0
version: 1.0.0
appVersion: 1.0.0
description: Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
icon: https://raw.githubusercontent.com/uber/cadence-web/master/client/assets/logo.svg
apiVersion: v1
Expand Down
12 changes: 12 additions & 0 deletions cadence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ $ helm install --name my-release --namespace cadence banzaicloud-stable/cadence
# Helm
$ helm upgrade [RELEASE_NAME] banzaicloud-stable/cadence
```
### From 1.0.0

It's added in `clustermetadata` the label clusterRedirectionPolicy.policy with default value "selected-apis-forwarding" to specify the redirection policy between cluster components

### From 0.20.x (or below) to 0.21.y (or above)

Expand Down Expand Up @@ -388,6 +391,15 @@ Global options overridable per service are marked with an asterisk.
| `cassandra.enabled` | Install Cassandra cluster | `true` |
| `cassandra.config.cluster_size` | Cassandra cluster node number | `1` |
| `mysql.enabled` | Install MySQL | `false` |
| `dynamicconfig.client` | Dynamic configuration client | `filebased` |
| `dynamicconfig.configstore.pollInterval` | ConfigStore polling interval | `10s` |
| `dynamicconfig.configstore.updateRetryAttempts` | Number update retries | `2` |
| `dynamicconfig.configstore.FetchTimeout` | Fetch timeout | `2s` |
| `dynamicconfig.configstore.UpdateTimeout` | Configstore update timeout | `2s` |
| `dynamicconfig.filebased.filepath` | Path of the dynamic configuration file | `config/dynamicconfig/development_es.yaml` |
| `dynamicconfig.filebased.pollInterval` | Polling interval | `10s` |
| `connectionType.thrift.enabled` | Enable connection tchannel | `true` |
| `connectionType.grpc.enabled` | Enable connection grcp | `true` |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:
Expand Down
48 changes: 39 additions & 9 deletions cadence/templates/server-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,30 @@ data:
name: cadence
bootstrapMode: dns
bootstrapHosts:
- {{ include "cadence.componentname" (list . "frontend-headless") }}:{{ .Values.server.frontend.service.grpcPort | default `{{ default .Env.FRONTEND_GRPC_PORT 7833 }}` }}
{{- if ($.Values.connectionType.thrift.enabled) }}
- {{ include "cadence.componentname" (list . "frontend-headless") }}:{{ .Values.server.frontend.service.port | default `{{ default .Env.FRONTEND_PORT 7933 }}` }}
- {{ include "cadence.componentname" (list . "history-headless") }}:{{ .Values.server.history.service.grpcPort | default `{{ default .Env.HISTORY_GRPC_PORT 7834 }}` }}
- {{ include "cadence.componentname" (list . "history-headless") }}:{{ .Values.server.history.service.port | default `{{ default .Env.HISTORY_PORT 7934 }}` }}
- {{ include "cadence.componentname" (list . "matching-headless") }}:{{ .Values.server.matching.service.grpcPort | default `{{ default .Env.MATCHING_GRPC_PORT 7835 }}` }}
- {{ include "cadence.componentname" (list . "matching-headless") }}:{{ .Values.server.matching.service.port | default `{{ default .Env.MATCHING_PORT 7935 }}` }}
- {{ include "cadence.componentname" (list . "worker-headless") }}:{{ .Values.server.worker.service.port | default `{{ default .Env.WORKER_PORT 7939 }}` }}
{{- end }}
{{- if ($.Values.connectionType.grpc.enabled) }}
- {{ include "cadence.componentname" (list . "frontend-headless") }}:{{ .Values.server.frontend.service.grpcPort | default `{{ default .Env.FRONTEND_GRPC_PORT 7833 }}` }}
- {{ include "cadence.componentname" (list . "history-headless") }}:{{ .Values.server.history.service.grpcPort | default `{{ default .Env.HISTORY_GRPC_PORT 7834 }}` }}
- {{ include "cadence.componentname" (list . "matching-headless") }}:{{ .Values.server.matching.service.grpcPort | default `{{ default .Env.MATCHING_GRPC_PORT 7835 }}` }}
- {{ include "cadence.componentname" (list . "worker-headless") }}:{{ .Values.server.worker.service.grpcPort | default `{{ default .Env.WORKER_PORT 7839 }}` }}
{{- end }}

maxJoinDuration: 30s

services:
frontend:
rpc:
grpcPort: {{ include "cadence.frontend.internalGRPCPort" . | default `{{ default .Env.FRONTEND_GRPC_PORT 7833 }}` }}
{{- if ($.Values.connectionType.thrift.enabled) }}
port: {{ include "cadence.frontend.internalPort" . | default `{{ default .Env.FRONTEND_PORT 7933 }}` }}
{{- end }}
{{- if ($.Values.connectionType.grpc.enabled) }}
grpcPort: {{ include "cadence.frontend.internalGRPCPort" . | default `{{ default .Env.FRONTEND_GRPC_PORT 7833 }}` }}
{{- end }}
bindOnIP: {{ `{{ default .Env.POD_IP "0.0.0.0" }}` }}
metrics:
tags:
Expand All @@ -102,8 +112,12 @@ data:

history:
rpc:
grpcPort: {{ include "cadence.history.internalGRPCPort" . | default `{{ default .Env.HISTORY_GRPC_PORT 7834 }}` }}
{{- if ($.Values.connectionType.thrift.enabled) }}
port: {{ include "cadence.history.internalPort" . | default `{{ default .Env.HISTORY_PORT default 7934 }}` }}
{{- end }}
{{- if ($.Values.connectionType.grpc.enabled) }}
grpcPort: {{ include "cadence.history.internalGRPCPort" . | default `{{ default .Env.HISTORY_GRPC_PORT 7834 }}` }}
{{- end }}
bindOnIP: {{ `{{ default .Env.POD_IP "0.0.0.0" }}` }}
metrics:
tags:
Expand All @@ -120,8 +134,12 @@ data:

matching:
rpc:
grpcPort: {{ include "cadence.matching.internalGRPCPort" . | default `{{ default .Env.MATCHING_GRPC_PORT 7835 }}` }}
{{- if ($.Values.connectionType.thrift.enabled) }}
port: {{ include "cadence.matching.internalPort" . | default `{{ default .Env.MATCHING_PORT 7935 }}` }}
{{- end }}
{{- if ($.Values.connectionType.grpc.enabled) }}
grpcPort: {{ include "cadence.matching.internalGRPCPort" . | default `{{ default .Env.MATCHING_GRPC_PORT 7835 }}` }}
{{- end }}
bindOnIP: {{ `{{ default .Env.POD_IP "0.0.0.0" }}` }}
metrics:
tags:
Expand All @@ -138,7 +156,12 @@ data:

worker:
rpc:
{{- if ($.Values.connectionType.thrift.enabled) }}
port: {{ include "cadence.worker.internalPort" . | default `{{ default .Env.WORKER_PORT 7939 }}` }}
{{- end }}
{{- if ($.Values.connectionType.grpc.enabled) }}
grpcPort: {{ include "cadence.worker.internalGRPCPort" . | default `{{ default .Env.WORKER_GRPC_PORT 7839 }}` }}
{{- end }}
bindOnIP: {{ `{{ default .Env.POD_IP "0.0.0.0" }}` }}
metrics:
tags:
Expand All @@ -158,6 +181,8 @@ data:
failoverVersionIncrement: {{ .Values.server.config.clusterMetadata.maximumClusterCount }}
primaryClusterName: {{ .Values.server.config.clusterMetadata.masterClusterName }}
currentClusterName: {{ .Values.server.config.clusterMetadata.currentClusterName }}
clusterRedirectionPolicy:
policy: {{ $.Values.server.config.dcRedirectionPolicy.policy }}
clusterGroup:
{{- $currentClusterName := .Values.server.config.clusterMetadata.currentClusterName }}
{{- $currentClusterIndex := 0 }}
Expand Down Expand Up @@ -188,10 +213,15 @@ data:
status: "disabled"

dynamicconfig:
client: filebased
client: {{ $.Values.dynamicconfig.client }}
configstore:
pollInterval: {{ $.Values.dynamicconfig.configstore.pollInterval | default "10s" | quote }}
updateRetryAttempts: {{ $.Values.dynamicconfig.configstore.updateRetryAttempts }}
FetchTimeout: {{ $.Values.dynamicconfig.configstore.FetchTimeout | default "2s" | quote }}
UpdateTimeout: {{ $.Values.dynamicconfig.configstore.UpdateTimeout | default "2s" | quote }}
filebased:
filepath: "/etc/cadence/config/dynamicconfig/config.yaml"
pollInterval: {{ .Values.dynamicConfig.pollInterval | default "10s" | quote }}
filepath: {{ $.Values.dynamicconfig.filebased.filepath }}
pollInterval: {{ $.Values.dynamicconfig.filebased.pollInterval | default "10s" | quote }}

dynamic_config.yaml: |-
{{- toYaml .Values.dynamicConfig.values | nindent 12 }}
26 changes: 23 additions & 3 deletions cadence/values.yaml
ramizpolic marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ server:
# WARNING: you **MUST** list the Cadence clusters of a Cadence cluster
# group in the same order in each configuration to ensure the
# initialFailoverVersions are synchronized.

# clusterRedirectionPolicy contains redirection information between cluster components
clusterRedirectionPolicy:
policy: "selected-apis-forwarding"

clusterInformation:
- name: cluster-0
# enabled defines whether the Cadence cluster is enabled.
Expand Down Expand Up @@ -370,9 +375,16 @@ web:

affinity: {}

dynamicConfig:
values: {}
pollInterval: "10s"
dynamicconfig:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason why the naming convention changed here? there are parts that still refer to the old snakeCase version. can we revert this to dynamicConfig before merging

client: filebased
configstore:
pollInterval: "10s"
updateRetryAttempts: 2
FetchTimeout: "2s"
UpdateTimeout: "2s"
filebased:
filepath: "config/dynamicconfig/development_es.yaml"
pollInterval: "10s"

schema:
setup:
Expand Down Expand Up @@ -402,3 +414,11 @@ mysql:
initializationFiles:
user.sql: |-
GRANT ALL PRIVILEGES ON *.* TO 'cadence'@'%';

# Indicates if the tchannel and grpc connections will be enabled
connectionType:
thrift:
enabled: true
grpc:
enabled: true