Skip to content

Commit

Permalink
Add more options to config_template for docker image and disable arch…
Browse files Browse the repository at this point in the history
…ival by default
  • Loading branch information
longquanzheng authored Jan 27, 2021
1 parent 2c47b8e commit 7cbd5dc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
3 changes: 1 addition & 2 deletions common/service/config/archival.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ package config

import (
"errors"

"github.com/uber/cadence/common"
)

Expand Down Expand Up @@ -50,6 +49,6 @@ func isArchivalConfigValid(
URISet := len(domianDefaultURI) != 0

validEnable := archivalEnabled && URISet && specifiedProvider
validDisabled := !archivalEnabled && !enableRead && domainDefaultStatus != common.ArchivalEnabled && !URISet && !specifiedProvider
validDisabled := !archivalEnabled && !enableRead && domainDefaultStatus != common.ArchivalEnabled && !URISet
return validEnable || validDisabled
}
36 changes: 18 additions & 18 deletions docker/config_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,45 +194,45 @@ services:
{{- end }}

clusterMetadata:
enableGlobalDomain: false
enableGlobalDomain: {{ default .Env.ENABLE_GLOBAL_DOMAIN "false" }}
failoverVersionIncrement: 10
masterClusterName: "active"
currentClusterName: "active"
masterClusterName: "master"
currentClusterName: "master"
clusterInformation:
active:
master:
enabled: true
initialFailoverVersion: 0
rpcName: "cadence-frontend"
rpcAddress: "127.0.0.1:7933"

dcRedirectionPolicy:
policy: "noop"
policy: {{ default .Env.DC_REDIRECT_POLICY "selected-apis-forwarding" }}
toDC: ""

archival:
history:
status: "enabled"
enableRead: true
status: {{ default .Env.HISTORY_ARCHIVAL_STATUS "disabled" }}
enableRead: {{ default .Env.HISTORY_ARCHIVAL_ENABLE_READ "false" }}
provider:
filestore:
fileMode: "0666"
dirMode: "0766"
fileMode: {{ default .Env.HISTORY_ARCHIVAL_FILE_MODE "" }}
dirMode: {{ default .Env.HISTORY_ARCHIVAL_DIR_MODE "" }}
visibility:
status: "enabled"
enableRead: true
status: {{ default .Env.VISIBILITY_ARCHIVAL_STATUS "disabled" }}
enableRead: {{ default .Env.VISIBILITY_ARCHIVAL_ENABLE_READ "false" }}
provider:
filestore:
fileMode: "0666"
dirMode: "0766"
fileMode: {{ default .Env.VISIBILITY_ARCHIVAL_FILE_MODE "" }}
dirMode: {{ default .Env.VISIBILITY_ARCHIVAL_DIR_MODE "" }}

domainDefaults:
archival:
history:
status: "enabled"
URI: "file:///tmp/cadence_archival/development"
status: {{ default .Env.DOMAIN_DEFAULTS_HISTORY_ARCHIVAL_STATUS "disabled" }}
URI: {{ default .Env.DOMAIN_DEFAULTS_HISTORY_ARCHIVAL_URI "" }}
visibility:
status: "enabled"
URI: "file:///tmp/cadence_vis_archival/development"
status: {{ default .Env.DOMAIN_DEFAULTS_VISIBILITY_ARCHIVAL_STATUS "disabled" }}
URI: {{ default .Env.DOMAIN_DEFAULTS_VISIBILITY_ARCHIVAL_URI "" }}

kafka:
tls:
Expand Down Expand Up @@ -260,4 +260,4 @@ dynamicConfigClient:

blobstore:
filestore:
outputDirectory: "/tmp/blobstore"
outputDirectory: {{ default .Env.FILE_BLOB_STORE_OUTPUT_DIRECTYORY "" }}

0 comments on commit 7cbd5dc

Please sign in to comment.