Skip to content

Commit 91f8459

Browse files
Merge pull request #2 from Countly/argo-compat
argo ocmpatiblity
2 parents be05816 + 4919f15 commit 91f8459

131 files changed

Lines changed: 5875 additions & 52 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/changelog.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
name: Update Changelog
1+
name: Update Changelog (disabled)
22

33
on:
4-
push:
5-
branches: [main]
6-
paths-ignore:
7-
- 'CHANGELOG.md'
8-
- '.github/**'
94
workflow_dispatch:
105
inputs:
116
since_tag:

.github/workflows/publish-oci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ jobs:
3030
with:
3131
version: v3.17.0
3232

33+
- name: Build chart dependencies
34+
run: |
35+
for chart in charts/*/; do
36+
if grep -q '^dependencies:' "${chart}Chart.yaml" 2>/dev/null; then
37+
echo "Building dependencies for $(basename "${chart}")..."
38+
helm dependency build "${chart}"
39+
fi
40+
done
41+
3342
- name: Lint all charts
3443
run: |
3544
for chart in charts/*/; do
@@ -68,6 +77,15 @@ jobs:
6877
echo "${GITHUB_TOKEN}" | helm registry login ${REGISTRY} -u "${GH_ACTOR}" --password-stdin
6978
echo "${GITHUB_TOKEN}" | cosign login ${REGISTRY} -u "${GH_ACTOR}" --password-stdin
7079
80+
- name: Build chart dependencies
81+
run: |
82+
for chart in charts/*/; do
83+
if grep -q '^dependencies:' "${chart}Chart.yaml" 2>/dev/null; then
84+
echo "Building dependencies for $(basename "${chart}")..."
85+
helm dependency build "${chart}"
86+
fi
87+
done
88+
7189
- name: Package, push, sign, and attach SBOM
7290
env:
7391
RELEASE_TAG: ${{ github.event.release.tag_name }}

.github/workflows/validate-charts.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ jobs:
3333
with:
3434
version: v3.17.0
3535

36+
- name: Build chart dependencies
37+
run: |
38+
for chart in charts/*/; do
39+
if grep -q '^dependencies:' "${chart}Chart.yaml" 2>/dev/null; then
40+
echo "Building dependencies for $(basename "${chart}")..."
41+
helm dependency build "${chart}"
42+
fi
43+
done
44+
3645
- name: Lint all charts
3746
run: |
3847
exit_code=0
@@ -57,6 +66,15 @@ jobs:
5766
with:
5867
version: v3.17.0
5968

69+
- name: Build chart dependencies
70+
run: |
71+
for chart in charts/*/; do
72+
if grep -q '^dependencies:' "${chart}Chart.yaml" 2>/dev/null; then
73+
echo "Building dependencies for $(basename "${chart}")..."
74+
helm dependency build "${chart}"
75+
fi
76+
done
77+
6078
- name: Template render all charts
6179
run: |
6280
exit_code=0
@@ -90,6 +108,12 @@ jobs:
90108
--set users.metrics.password=test \
91109
> /dev/null || exit_code=1
92110
;;
111+
countly-migration)
112+
helm template test-release "${chart}" \
113+
--set backingServices.mongodb.password=test \
114+
--set backingServices.clickhouse.password=test \
115+
> /dev/null || exit_code=1
116+
;;
93117
*)
94118
helm template test-release "${chart}" > /dev/null || exit_code=1
95119
;;

README.md

Lines changed: 63 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Helm charts for deploying Countly analytics on Kubernetes.
44

55
## Architecture
66

7-
Five charts, each in its own namespace:
7+
Seven charts, each in its own namespace:
88

99
| Chart | Namespace | Purpose |
1010
|-------|-----------|---------|
@@ -13,6 +13,8 @@ Five charts, each in its own namespace:
1313
| `countly-clickhouse` | clickhouse | ClickHouse via ClickHouse Operator |
1414
| `countly-kafka` | kafka | Kafka via Strimzi Operator |
1515
| `countly-observability` | observability | Prometheus, Grafana, Loki, Tempo, Pyroscope |
16+
| `countly-migration` | countly-migration | MongoDB to ClickHouse batch migration (with bundled Redis) |
17+
| `countly-argocd` | argocd | ArgoCD app-of-apps (AppProject + Applications) |
1618

1719
### Architecture Overview
1820

@@ -46,6 +48,11 @@ flowchart TB
4648
mongo["MongoDB\n:27017"]
4749
end
4850
51+
subgraph mig-ns["countly-migration"]
52+
migsvc["Migration Service\n:8080"]
53+
redis["Redis\n:6379"]
54+
end
55+
4956
subgraph obs-ns["observability"]
5057
prom["Prometheus"]
5158
grafana["Grafana"]
@@ -66,6 +73,10 @@ flowchart TB
6673
brokers --> connect --> chserver
6774
keeper -.-> chserver
6875
76+
migsvc -->|read batches| mongo
77+
migsvc -->|insert rows| chserver
78+
migsvc <-.->|hot state| redis
79+
6980
alloy -.-> prom & loki & tempo & pyroscope
7081
prom & loki & tempo & pyroscope --> grafana
7182
```
@@ -164,43 +175,69 @@ Install required operators before deploying Countly. See [docs/PREREQUISITES.md]
164175

165176
### Manual Installation (without Helmfile)
166177

178+
Substitute your profile choices from `global.yaml` into the commands below.
179+
The value file order must match the layering: global → sizing → dimension profiles → security → environment → secrets.
180+
167181
```bash
182+
# Shorthand — substitute these from your environments/<env>/global.yaml
183+
ENV=my-deployment
184+
SIZING=local # local | small | production
185+
SECURITY=open # open | hardened
186+
TLS=selfSigned # none | selfSigned | letsencrypt | provided
187+
OBS=full # disabled | full | external-grafana | external
188+
KC=balanced # throughput | balanced | low-latency
189+
168190
helm install countly-mongodb ./charts/countly-mongodb -n mongodb --create-namespace \
169191
--wait --timeout 10m \
170-
-f environments/my-deployment/global.yaml \
171-
-f profiles/sizing/production/mongodb.yaml \
172-
-f environments/my-deployment/mongodb.yaml \
173-
-f environments/my-deployment/secrets-mongodb.yaml
192+
-f environments/$ENV/global.yaml \
193+
-f profiles/sizing/$SIZING/mongodb.yaml \
194+
-f profiles/security/$SECURITY/mongodb.yaml \
195+
-f environments/$ENV/mongodb.yaml \
196+
-f environments/$ENV/secrets-mongodb.yaml
174197

175198
helm install countly-clickhouse ./charts/countly-clickhouse -n clickhouse --create-namespace \
176199
--wait --timeout 10m \
177-
-f environments/my-deployment/global.yaml \
178-
-f profiles/sizing/production/clickhouse.yaml \
179-
-f environments/my-deployment/clickhouse.yaml \
180-
-f environments/my-deployment/secrets-clickhouse.yaml
200+
-f environments/$ENV/global.yaml \
201+
-f profiles/sizing/$SIZING/clickhouse.yaml \
202+
-f profiles/security/$SECURITY/clickhouse.yaml \
203+
-f environments/$ENV/clickhouse.yaml \
204+
-f environments/$ENV/secrets-clickhouse.yaml
181205

182206
helm install countly-kafka ./charts/countly-kafka -n kafka --create-namespace \
183207
--wait --timeout 10m \
184-
-f environments/my-deployment/global.yaml \
185-
-f profiles/sizing/production/kafka.yaml \
186-
-f profiles/kafka-connect/balanced/kafka.yaml \
187-
-f environments/my-deployment/kafka.yaml \
188-
-f environments/my-deployment/secrets-kafka.yaml
208+
-f environments/$ENV/global.yaml \
209+
-f profiles/sizing/$SIZING/kafka.yaml \
210+
-f profiles/kafka-connect/$KC/kafka.yaml \
211+
-f profiles/observability/$OBS/kafka.yaml \
212+
-f profiles/security/$SECURITY/kafka.yaml \
213+
-f environments/$ENV/kafka.yaml \
214+
-f environments/$ENV/secrets-kafka.yaml
189215

190216
helm install countly ./charts/countly -n countly --create-namespace \
191217
--wait --timeout 10m \
192-
-f environments/my-deployment/global.yaml \
193-
-f profiles/sizing/production/countly.yaml \
194-
-f profiles/tls/letsencrypt/countly.yaml \
195-
-f environments/my-deployment/countly.yaml \
196-
-f environments/my-deployment/secrets-countly.yaml
218+
-f environments/$ENV/global.yaml \
219+
-f profiles/sizing/$SIZING/countly.yaml \
220+
-f profiles/tls/$TLS/countly.yaml \
221+
-f profiles/observability/$OBS/countly.yaml \
222+
-f profiles/security/$SECURITY/countly.yaml \
223+
-f environments/$ENV/countly.yaml \
224+
-f environments/$ENV/secrets-countly.yaml
197225

198226
helm install countly-observability ./charts/countly-observability -n observability --create-namespace \
199227
--wait --timeout 10m \
200-
-f environments/my-deployment/global.yaml \
201-
-f profiles/sizing/production/observability.yaml \
202-
-f profiles/observability/full/observability.yaml \
203-
-f environments/my-deployment/observability.yaml
228+
-f environments/$ENV/global.yaml \
229+
-f profiles/sizing/$SIZING/observability.yaml \
230+
-f profiles/observability/$OBS/observability.yaml \
231+
-f profiles/security/$SECURITY/observability.yaml \
232+
-f environments/$ENV/observability.yaml \
233+
-f environments/$ENV/secrets-observability.yaml
234+
235+
# Optional: MongoDB to ClickHouse batch migration (includes bundled Redis)
236+
helm install countly-migration ./charts/countly-migration -n countly-migration --create-namespace \
237+
--wait --timeout 5m \
238+
-f environments/$ENV/global.yaml \
239+
-f environments/$ENV/migration.yaml \
240+
-f environments/$ENV/secrets-migration.yaml
204241
```
205242

206243
## Configuration Model
@@ -247,6 +284,7 @@ Environments contain deployment-specific choices:
247284
- [VERIFICATION.md](docs/VERIFICATION.md) — Chart signature verification, SBOM, provenance
248285
- [TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) — Common issues and fixes
249286
- [VERSION-MATRIX.md](docs/VERSION-MATRIX.md) — Pinned operator and image versions
287+
- [ARGOCD.md](docs/ARGOCD.md) — ArgoCD deployment, sync waves, custom health checks
250288

251289
## Repository Structure
252290

@@ -258,6 +296,8 @@ helm/
258296
countly-clickhouse/
259297
countly-kafka/
260298
countly-observability/
299+
countly-migration/
300+
countly-argocd/
261301
profiles/ # Composable profile dimensions
262302
sizing/ # local | small | production
263303
observability/ # disabled | full | external-grafana | external

charts/countly-argocd/Chart.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: v2
2+
name: countly-argocd
3+
description: ArgoCD app-of-apps for deploying Countly to one or more clusters
4+
type: application
5+
version: 0.1.0
6+
appVersion: "1.0.0"
7+
home: https://countly.com
8+
icon: https://count.ly/images/logos/countly-logo.svg
9+
sources:
10+
- https://github.com/Countly/countly-server
11+
keywords:
12+
- argocd
13+
- gitops
14+
- countly
15+
- multi-cluster
16+
maintainers:
17+
- name: Countly
18+
url: https://countly.com
19+
annotations:
20+
artifacthub.io/license: AGPL-3.0

0 commit comments

Comments
 (0)