Skip to content

Commit 4d1ee35

Browse files
authored
fix (#2)
1 parent ae05293 commit 4d1ee35

File tree

6 files changed

+391
-0
lines changed

6 files changed

+391
-0
lines changed

.env.template

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# ADMIN DATABASE CONNECTION INFO
2+
# Postgres used for catalog, visibility and temporal history.
3+
PG_HOST= # not required if using in-cluster postgres
4+
PG_PORT=5432
5+
PG_USER=postgres
6+
PG_PASSWORD= # not required if using in-cluster postgres
7+
PG_DATABASE=postgres
8+
PG_RDS_SSL_ENABLED=false # If using RDS catalog specifically, it will auto-pick up the certificate required for SSL
9+
10+
# TEMPORAL DATABASE SETTINGS
11+
# The following variables dictate the name of the user and databases that will
12+
# be created in Postgres to be used by Temporal. These are all required. Edit
13+
# these to your liking.
14+
15+
# These are irrelevant for Temporal Cloud.
16+
TEMPORAL_USER=temporal-pg-user
17+
TEMPORAL_PASSWORD=temporal-pg-password # not required if using in-cluster postgres
18+
19+
# DO NOT CHANGE THESE.
20+
# These are used by temporal and currently hardcoded for Postgres.
21+
TEMPORAL_DB=temporal
22+
TEMPORAL_VISIBILITY_DB=temporal_visibility
23+
24+
TEMPORAL_SSL_MODE=false # Should be false if using in-cluster catalog, set true for RDS etc.
25+
# TEMPORAL_SSL_CA_CERT_PATH=./aws-ca-bundle.pem
26+
27+
28+
# PEERDB SETTINGS
29+
# env variables for peerdb deployment
30+
PEERDB_VERSION=stable-v0.12.2
31+
# name of the database that will be used by peerdb.
32+
PEERDB_CATALOG_DATABASE=peerdb_catalog_db
33+
PEERDB_CATALOG_CREDS_SECRET_NAME=catalog-db-manual-creds
34+
PEERDB_RELEASE_NAME=peerdb-rel
35+
PEERDB_K8S_NAMESPACE=peerdb-ns
36+
PEERDB_PASSWORD=peerdb
37+
PEERDB_UI_PASSWORD=peerdb
38+
PEERDB_UI_NEXTAUTH_SECRET=R5f6vc1@6@@VZABJ8t0gYhhKLgAAchrTLaRrkVRY # !! CHANGE THIS TO A NEW RANDOMLY GENERATED STRING !!
39+
PEERDB_UI_SERVICE_URL= #Add the external IP/DNS from where PeerDB UI is being accessed. eg. http://aws.loadbalancer.cname:3000
40+
SERVICE_ACCOUNT_NAME=peerdb-sa
41+
42+
43+
# TEMPORAL SETTINGS
44+
# For Self-Hosted Temporal, the namespace is 'default'.
45+
# For Temporal Cloud, set it to your Temporal Namespace name. This will be of the form nmspc.abc12
46+
PEERDB_TEMPORAL_NAMESPACE=default
47+
48+
# The below 3 variables are for Temporal Cloud ONLY.
49+
# TEMPORAL_CLOUD_HOST will be of the form <namespace_name>.tmprl.cloud (port is 7233, omit it here)
50+
TEMPORAL_CLOUD_HOST=
51+
# TEMPORAL_CLIENT_CERT and TEMPORAL_CLIENT_KEY are derived from the ROOT CA used in namespace creation
52+
# These must be BASE64 strings
53+
TEMPORAL_CLOUD_CLIENT_CERT=
54+
TEMPORAL_CLOUD_CLIENT_KEY=
55+
# This can be any string. It is used to identify the deployment in Temporal Cloud.
56+
PEERDB_DEPLOYMENT_UID=
57+
58+
# AWS SETTINGS
59+
AWS_REGION=
60+
61+
# Option 1: Use AWS Credentials explicitly
62+
AWS_ACCESS_KEY_ID=
63+
AWS_SECRET_ACCESS_KEY=
64+
65+
# Option 2: Use AWS IAM role via service account
66+
AWS_ROLE_ARN=
67+
68+
69+
70+
# For setting up authentication
71+
AUTHENTICATION_ENABLED=false
72+
AUTHENTICATION_CREDENTIALS_USERNAME=
73+
AUTHENTICATION_CREDENTIALS_PASSWORD=
74+
75+
76+
# For using in-cluster postgres for catalog
77+
CATALOG_DEPLOY_ENABLED=true
78+
CATALOG_DEPLOY_CLUSTER_NAME=catalog-pg
79+
80+
81+
# For datadog metrics and logs
82+
DATADOG_ENABLED=false
83+
DATADOG_SITE=us5.datadoghq.com
84+
DATADOG_API_KEY=
85+
DATADOG_CLUSTER_NAME= #Something like <customer-name-enterprise>
86+
87+
88+
SAVE_VALUES_AS_SECRET=true

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
peerdb-catalog/aws-ca-bundle.pem linguist-vendored

.github/pull_request_template.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Checklist:
2+
3+
* [ ] Bumped the chart version(s) according to semantic versioning
4+
* [ ] Bump up both `peerdb` and `peerdb-catalog` charts to the same version
5+
* [ ] Update `peerdb-catalog/values.yaml`:
6+
* [ ] Set `temporal.admintools.image.tag` pointing to version with correct value from the dependency in `peerdb/Chart.yaml` subdependency
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Check docs
2+
3+
4+
# Do not change this
5+
concurrency: check-docs-helm
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
branches:
13+
- main
14+
15+
16+
jobs:
17+
check-docs-helm:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Check docs
24+
run: |
25+
docker run -v "$PWD:/helm-docs" -u $(id -u) jnorwood/helm-docs:latest -c peerdb -d > README.md.peerdb.new
26+
docker run -v "$PWD:/helm-docs" -u $(id -u) jnorwood/helm-docs:latest -c peerdb-catalog -d > README.md.catalog.new
27+
exit_status=0
28+
diff -q README.md.peerdb.new peerdb/README.md || exit_status=$?
29+
if [ "$exit_status" != "0" ]; then
30+
echo "::error file=peerdb/README.md,line=1,col=1,endColumn=1::Outdated documentation, run '"'`docker run -v "$PWD:/helm-docs" -u $(id -u) jnorwood/helm-docs:latest -c peerdb`'"' to update."
31+
echo "::error file=peerdb/values.yaml,line=1,col=1,endColumn=1::Outdated documentation, run '"'`docker run -v "$PWD:/helm-docs" -u $(id -u) jnorwood/helm-docs:latest -c peerdb`'"' to update."
32+
exit 1
33+
fi
34+
diff -q README.md.catalog.new peerdb-catalog/README.md || exit_status=$?
35+
if [ "$exit_status" != "0" ]; then
36+
echo "::error file=peerdb-catalog/README.md,line=1,col=1,endColumn=1::Outdated documentation, run '"'`docker run -v "$PWD:/helm-docs" -u $(id -u) jnorwood/helm-docs:latest -c peerdb-catalog`'"' to update."
37+
echo "::error file=peerdb-catalog/values.yaml,line=1,col=1,endColumn=1::Outdated documentation, run '"'`docker run -v "$PWD:/helm-docs" -u $(id -u) jnorwood/helm-docs:latest -c peerdb-catalog`'"' to update."
38+
exit 1
39+
fi

.github/workflows/release-charts.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release Charts
2+
3+
# Can be run via `gh workflow run release-charts.yml -f chartName=<peerdb|peerdb-catalog>`
4+
5+
# Do not change this
6+
concurrency: release-helm
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
chartName:
12+
type: choice
13+
description: Chart to Release
14+
required: true
15+
options:
16+
- peerdb
17+
- peerdb-catalog
18+
19+
jobs:
20+
release-chart:
21+
permissions:
22+
contents: write
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v3
27+
with:
28+
path: 'src'
29+
fetch-depth: 0
30+
submodules: true
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
with:
34+
path: 'dest'
35+
ref: 'gh-pages'
36+
fetch-depth: 0
37+
38+
- name: Install Helm
39+
uses: azure/setup-helm@v3
40+
41+
- name: Package Helm Charts
42+
shell: bash
43+
run: |
44+
set -e
45+
declare -a chartNames=(
46+
"${{ github.event.inputs.chartName }}"
47+
)
48+
for chart in "${chartNames[@]}"
49+
do
50+
test -f dest/$(helm show chart "src/${chart}" | yq '.name + "-" + .version + ".tgz"') && echo "Existing Chart with same version found" 2>&1 && exit 1
51+
echo "Updating and packaging ${chart}"
52+
helm dep up "src/${chart}"
53+
helm package "src/${chart}" -u -d dest
54+
done
55+
- name: Push New Files
56+
shell: bash
57+
working-directory: dest
58+
run: |
59+
set -e
60+
helm repo index . --url https://raw.githubusercontent.com/${{ github.repository }}/gh-pages
61+
git config user.name "$GITHUB_ACTOR"
62+
git config user.email "[email protected]"
63+
git add $(git ls-files -o --exclude-standard)
64+
git add index.yaml
65+
git commit -m "Updated from ref: $GITHUB_SHA"
66+
git push

.gitignore

+191
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
### Helm ###
2+
# Chart dependencies
3+
**/charts/*.tgz
4+
5+
# Created by https://www.toptal.com/developers/gitignore/api/python
6+
# Edit at https://www.toptal.com/developers/gitignore?templates=python
7+
8+
### Python ###
9+
# Byte-compiled / optimized / DLL files
10+
__pycache__/
11+
*.py[cod]
12+
*$py.class
13+
14+
# C extensions
15+
*.so
16+
17+
# Distribution / packaging
18+
.Python
19+
build/
20+
develop-eggs/
21+
dist/
22+
downloads/
23+
eggs/
24+
.eggs/
25+
lib/
26+
lib64/
27+
parts/
28+
sdist/
29+
var/
30+
wheels/
31+
share/python-wheels/
32+
*.egg-info/
33+
.installed.cfg
34+
*.egg
35+
MANIFEST
36+
37+
# PyInstaller
38+
# Usually these files are written by a python script from a template
39+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
40+
*.manifest
41+
*.spec
42+
43+
# Installer logs
44+
pip-log.txt
45+
pip-delete-this-directory.txt
46+
47+
# Unit test / coverage reports
48+
htmlcov/
49+
.tox/
50+
.nox/
51+
.coverage
52+
.coverage.*
53+
.cache
54+
nosetests.xml
55+
coverage.xml
56+
*.cover
57+
*.py,cover
58+
.hypothesis/
59+
.pytest_cache/
60+
cover/
61+
62+
# Translations
63+
*.mo
64+
*.pot
65+
66+
# Django stuff:
67+
*.log
68+
local_settings.py
69+
db.sqlite3
70+
db.sqlite3-journal
71+
72+
# Flask stuff:
73+
instance/
74+
.webassets-cache
75+
76+
# Scrapy stuff:
77+
.scrapy
78+
79+
# Sphinx documentation
80+
docs/_build/
81+
82+
# PyBuilder
83+
.pybuilder/
84+
target/
85+
86+
# Jupyter Notebook
87+
.ipynb_checkpoints
88+
89+
# IPython
90+
profile_default/
91+
ipython_config.py
92+
93+
# pyenv
94+
# For a library or package, you might want to ignore these files since the code is
95+
# intended to run in multiple environments; otherwise, check them in:
96+
# .python-version
97+
98+
# pipenv
99+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
100+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
101+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
102+
# install all needed dependencies.
103+
#Pipfile.lock
104+
105+
# poetry
106+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
107+
# This is especially recommended for binary packages to ensure reproducibility, and is more
108+
# commonly ignored for libraries.
109+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
110+
#poetry.lock
111+
112+
# pdm
113+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114+
#pdm.lock
115+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
116+
# in version control.
117+
# https://pdm.fming.dev/#use-with-ide
118+
.pdm.toml
119+
120+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121+
__pypackages__/
122+
123+
# Celery stuff
124+
celerybeat-schedule
125+
celerybeat.pid
126+
127+
# SageMath parsed files
128+
*.sage.py
129+
130+
# Environments
131+
.env
132+
.venv
133+
env/
134+
venv/
135+
ENV/
136+
env.bak/
137+
venv.bak/
138+
139+
# Spyder project settings
140+
.spyderproject
141+
.spyproject
142+
143+
# Rope project settings
144+
.ropeproject
145+
146+
# mkdocs documentation
147+
/site
148+
149+
# mypy
150+
.mypy_cache/
151+
.dmypy.json
152+
dmypy.json
153+
154+
# Pyre type checker
155+
.pyre/
156+
157+
# pytype static type analyzer
158+
.pytype/
159+
160+
# Cython debug symbols
161+
cython_debug/
162+
163+
# PyCharm
164+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166+
# and can be added to the global gitignore or merged into this file. For a more nuclear
167+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168+
#.idea/
169+
170+
### Python Patch ###
171+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
172+
poetry.toml
173+
174+
# ruff
175+
.ruff_cache/
176+
177+
# LSP config files
178+
pyrightconfig.json
179+
180+
# End of https://www.toptal.com/developers/gitignore/api/python
181+
182+
### VSCode ###
183+
.vscode
184+
185+
peerdb.values.secret.yaml
186+
temporal.values.secret.yaml
187+
peerdb-catalog.values.secret.yaml
188+
ssh-tunnel.values.secret.yaml
189+
190+
peerdb-catalog/values.customer.yaml
191+
peerdb/values.customer.yaml

0 commit comments

Comments
 (0)