diff --git a/docker/config_template.yaml b/docker/config_template.yaml index 20f2aa6cb40..a4b655b87df 100644 --- a/docker/config_template.yaml +++ b/docker/config_template.yaml @@ -33,11 +33,15 @@ persistence: serverName: {{ default .Env.CASSANDRA_HOST_NAME "" }} visibility: cassandra: - hosts: "{{ default .Env.CASSANDRA_SEEDS "" }}" + {{ $visibility_seeds := default .Env.VISIBILITY_CASSANDRA_SEEDS .Env.CASSANDRA_SEEDS }} + {{ $visibility_port := default .Env.VISIBILITY_CASSANDRA_PORT .Env.CASSANDRA_PORT }} + {{ $visibility_user := default .Env.VISIBILITY_CASSANDRA_USER .Env.CASSANDRA_USER }} + {{ $visibility_pwd := default .Env.VISIBILITY_CASSANDRA_PASSWORD .Env.CASSANDRA_PASSWORD }} + hosts: "{{ default $visibility_seeds "" }}" keyspace: "{{ default .Env.VISIBILITY_KEYSPACE "temporal_visibility" }}" - user: "{{ default .Env.CASSANDRA_USER "" }}" - password: "{{ default .Env.CASSANDRA_PASSWORD "" }}" - port: {{ default .Env.CASSANDRA_PORT "9042" }} + user: "{{ default $visibility_user "" }}" + password: "{{ default $visibility_pwd "" }}" + port: {{ default $visibility_port "9042" }} maxConns: {{ default .Env.CASSANDRA_MAX_CONNS "10" }} tls: enabled: {{ default .Env.CASSANDRA_TLS_ENABLED "false" }} @@ -74,12 +78,16 @@ persistence: serverName: {{ default .Env.SQL_HOST_NAME "" }} visibility: sql: + {{ $visibility_seeds := default .Env.VISIBILITY_MYSQL_SEEDS .Env.MYSQL_SEEDS }} + {{ $visibility_port := default .Env.VISIBILITY_DB_PORT .Env.DB_PORT }} + {{ $visibility_user := default .Env.VISIBILITY_MYSQL_USER .Env.MYSQL_USER }} + {{ $visibility_pwd := default .Env.VISIBILITY_MYSQL_PWD .Env.MYSQL_PWD }} pluginName: "mysql" databaseName: "{{ default .Env.VISIBILITY_DBNAME "temporal_visibility" }}" - connectAddr: "{{ default .Env.MYSQL_SEEDS "" }}:{{ default .Env.DB_PORT "3306" }}" + connectAddr: "{{ default $visibility_seeds "" }}:{{ default $visibility_port "3306" }}" connectProtocol: "tcp" - user: "{{ default .Env.MYSQL_USER "" }}" - password: "{{ default .Env.MYSQL_PWD "" }}" + user: "{{ default $visibility_user "" }}" + password: "{{ default $visibility_pwd "" }}" {{- if .Env.MYSQL_TX_ISOLATION_COMPAT }} connectAttributes: tx_isolation: "'READ-COMMITTED'" @@ -115,12 +123,16 @@ persistence: serverName: {{ default .Env.SQL_HOST_NAME "" }} visibility: sql: + {{ $visibility_seeds := default .Env.VISIBILITY_POSTGRES_SEEDS .Env.POSTGRES_SEEDS }} + {{ $visibility_port := default .Env.VISIBILITY_DB_PORT .Env.DB_PORT }} + {{ $visibility_user := default .Env.VISIBILITY_POSTGRES_USER .Env.POSTGRES_USER }} + {{ $visibility_pwd := default .Env.VISIBILITY_POSTGRES_PWD .Env.POSTGRES_PWD }} pluginName: "postgres" databaseName: "{{ default .Env.VISIBILITY_DBNAME "temporal_visibility" }}" - connectAddr: "{{ default .Env.POSTGRES_SEEDS "" }}:{{ default .Env.DB_PORT "5432" }}" + connectAddr: "{{ default $visibility_seeds "" }}:{{ default $visibility_port "5432" }}" connectProtocol: "tcp" - user: "{{ default .Env.POSTGRES_USER "" }}" - password: "{{ default .Env.POSTGRES_PWD "" }}" + user: "{{ default $visibility_user "" }}" + password: "{{ default $visibility_pwd "" }}" maxConns: {{ default .Env.SQL_VIS_MAX_CONNS "10" }} maxIdleConns: {{ default .Env.SQL_VIS_MAX_IDLE_CONNS "10" }} maxConnLifetime: {{ default .Env.SQL_VIS_MAX_CONN_TIME "1h" }}