-
Notifications
You must be signed in to change notification settings - Fork 5
/
values_catalog.sh
executable file
·72 lines (54 loc) · 1.76 KB
/
values_catalog.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env bash
#TEMPORAL_HOST="${TEMPORAL_RELEASE_NAME}-frontend.${TEMPORAL_K8S_NAMESPACE}.svc.cluster.local"
if [[ "$CATALOG_DEPLOY_ENABLED" == "true" ]]; then
PG_HOST="${CATALOG_DEPLOY_CLUSTER_NAME}-primary.${PEERDB_K8S_NAMESPACE}.svc.cluster.local"
TEMPORAL_DEFAULT_USER_PASSWORD_EXISTING_SECRET="${CATALOG_DEPLOY_CLUSTER_NAME}-pguser-${TEMPORAL_USER}"
TEMPORAL_VISIBILITY_USER_PASSWORD_EXISTING_SECRET="${CATALOG_DEPLOY_CLUSTER_NAME}-pguser-${TEMPORAL_USER}"
fi
if [[ -n "${TEMPORAL_CLOUD_HOST:-}" ]]; then
TEMPORAL_DEPLOY_ENABLED=false
else
TEMPORAL_DEPLOY_ENABLED=true
fi
if [[ "$PG_RDS_SSL_ENABLED" == "true" ]]; then
TEMPORAL_SSL_MODE=true
TEMPORAL_SSL_TYPE=RDS
fi
cat << EOF > 'peerdb-catalog.values.secret.yaml'
credentials:
default:
user: "${TEMPORAL_USER}"
password: "${TEMPORAL_PASSWORD}"
database: "${TEMPORAL_DB}"
existingSecret: "${TEMPORAL_DEFAULT_USER_PASSWORD_EXISTING_SECRET}"
visibility:
user: "${TEMPORAL_USER}"
password: "${TEMPORAL_PASSWORD}"
database: "${TEMPORAL_VISIBILITY_DB}"
existingSecret: "${TEMPORAL_VISIBILITY_USER_PASSWORD_EXISTING_SECRET}"
admin:
user: "${PG_USER}"
password: "${PG_PASSWORD}"
database: "${PG_DATABASE}"
catalog:
database: "${PEERDB_CATALOG_DATABASE}"
pgHost: "${PG_HOST}"
pgPort: "${PG_PORT}"
secretName: "${PEERDB_CATALOG_CREDS_SECRET_NAME}"
ssl:
enabled: ${TEMPORAL_SSL_MODE}
type: "${TEMPORAL_SSL_TYPE:-}"
path: _TEMPORAL_SSL_CA_CERT_PATH_
deploy:
enabled: ${CATALOG_DEPLOY_ENABLED}
clusterName: "${CATALOG_DEPLOY_CLUSTER_NAME}"
temporal:
deploy:
enabled: ${TEMPORAL_DEPLOY_ENABLED}
tls:
enabled: ${TEMPORAL_SSL_MODE}
global:
peerdb:
enterprise:
saveCustomerValuesAsSecret: ${SAVE_VALUES_AS_SECRET}
EOF