mirror of
https://github.com/hanzoai/o11y-foundry.git
synced 2026-10-30 18:26:45 +00:00
- Go module: github.com/SigNoz/signoz-foundry → github.com/hanzoai/o11y-foundry - All deployment templates, configs, docs rebranded - signoz → o11y, ClickHouse → Hanzo Datastore - SIGNOZ_* env vars → HANZO_*
24 lines
1.0 KiB
Go Template
24 lines
1.0 KiB
Go Template
[Unit]
|
|
Description=Hanzo O11y Schema Migrator
|
|
Documentation=https://o11y.io/docs
|
|
{{ if $.Spec.TelemetryStore.Spec.Enabled }}
|
|
{{ $firstStore := printf "%s-telemetrystore-%s-0-0" $.Metadata.Name $.Spec.TelemetryStore.Kind.String }}
|
|
After={{ $firstStore }}
|
|
Requires={{ $firstStore }}
|
|
{{ end }}
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
User=o11y
|
|
Group=o11y
|
|
{{- if and $.Metadata.Annotations (index $.Metadata.Annotations "foundry.o11y.io/ingester-binary-path") }}
|
|
{{- $migratorBinary := index $.Metadata.Annotations "foundry.o11y.io/ingester-binary-path" }}
|
|
{{ if and $.Spec.TelemetryStore.Spec.Enabled $.Spec.TelemetryStore.Status.Addresses.TCP (index $.Spec.TelemetryStore.Status.Addresses.TCP 0) }}
|
|
{{- $dsn := index $.Spec.TelemetryStore.Status.Addresses.TCP 0 }}
|
|
ExecStart=/bin/bash -c '{{ $migratorBinary }} migrate bootstrap --clickhouse-dsn={{ $dsn }} && {{ $migratorBinary }} migrate sync up --clickhouse-dsn={{ $dsn }} && {{ $migratorBinary }} migrate async up --clickhouse-dsn={{ $dsn }}'
|
|
{{ end }}
|
|
{{- end }}
|
|
[Install]
|
|
WantedBy=multi-user.target
|