Files
zeekay ea0026d172 merge: upstream/main (preserve Hanzo brand, 50 commits)
# Conflicts:
#	api/v1alpha1/casting.go
#	api/v1alpha1/installation/signoz.go
#	docs/casting.md
#	docs/examples/docker/compose/pours/deployment/configs/ingester/opamp.yaml
#	docs/examples/systemd/binary/pours/deployment/signoz-ingester.service
#	docs/examples/systemd/binary/pours/deployment/signoz-signoz.service
#	docs/examples/systemd/binary/pours/deployment/signoz-telemetrystore-migrator.service
#	docs/schemas/v1alpha1.yaml
#	internal/foundry/registry.go
#	internal/instrumentation/handler.go
#	internal/molding/signozmolding/signoz.go
2026-06-02 09:59:25 -07:00

31 lines
1.5 KiB
Go Template

[Unit]
Description=Hanzo O11y OTel Collector
Documentation=https://o11y.io/docs
After={{ $.Metadata.Name }}-telemetrystore-{{ $.Spec.TelemetryStore.Kind }}-0-0{{ if $.Spec.TelemetryStore.Spec.Enabled }} {{ $.Metadata.Name }}-telemetrystore-migrator{{ end }}
{{ if $.Spec.TelemetryStore.Spec.Enabled }}
Requires={{ $.Metadata.Name }}-telemetrystore-migrator
{{ end }}
[Service]
User=o11y
Group=o11y
Type=simple
KillMode=mixed
Restart=on-failure
{{/* Using Fragment specifier to get the config from pours directory */}}
{{- if and $.Metadata.Annotations (index $.Metadata.Annotations "foundry.o11y.io/ingester-binary-path") }}
{{- $ingesterBinaryPath := index $.Metadata.Annotations "foundry.o11y.io/ingester-binary-path" }}
{{ if and $.Spec.Ingester.Status.Extras (index $.Spec.Ingester.Status.Extras "cfgPath") (index $.Spec.Ingester.Status.Extras "cfgOpampPath") }}
ExecStart={{ $ingesterBinaryPath }} --config=%Y/{{ index $.Spec.Ingester.Status.Extras "cfgPath" }} --manager-config=%Y/{{ index $.Spec.Ingester.Status.Extras "cfgOpampPath" }} --copy-path=/var/lib/ingester/ingester.yaml
{{- end }}
{{- end }}
{{- if and $.Spec.TelemetryStore.Spec.Enabled $.Spec.TelemetryStore.Status.Addresses.TCP (index $.Spec.TelemetryStore.Status.Addresses.TCP 0) }}
Environment=SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN={{ index $.Spec.TelemetryStore.Status.Addresses.TCP 0 }}
{{- end }}
{{- range $key, $value := $.Spec.Ingester.Spec.Env }}
Environment={{ $key }}={{ $value }}
{{- end }}
[Install]
WantedBy=multi-user.target