+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+.
diff --git a/Makefile b/Makefile
index 6d3125f..d6828d8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,37 @@
+.PHONY: clean gauge forge cast test gen-examples gen-schemas gen-docs docs
+
+FOUNDRYCTL := go run ./cmd/foundryctl
+GOTMPL := go run go.opentelemetry.io/build-tools/gotmpl@latest
+CASTINGS_JSON = $$(cat docs/examples/castings.json)
+NO_LEDGER := "--no-ledger"
+
clean:
- cd pours/deployment && docker compose -p dev down --remove-orphans --volumes
+ cd pours/deployment && docker compose down --remove-orphans --volumes
cd ../..
rm -rf ./pours
gauge:
- go run ./cmd/foundryctl gauge --debug -f ./tmp/casting.yaml
+ $(FOUNDRYCTL) gauge --debug $(NO_LEDGER) -f ./tmp/casting.yaml
forge:
- go run ./cmd/foundryctl forge --debug -f ./tmp/casting.yaml
+ $(FOUNDRYCTL) forge --debug $(NO_LEDGER) -f ./tmp/casting.yaml
cast:
- go run ./cmd/foundryctl cast --debug -f ./tmp/casting.yaml
+ $(FOUNDRYCTL) cast --debug $(NO_LEDGER) -f ./tmp/casting.yaml
test:
make forge
make docker
-gen:
- go run ./cmd/foundryctl/*.go gen
+gen-examples:
+ $(FOUNDRYCTL) gen --debug $(NO_LEDGER) examples
+
+gen-schemas:
+ $(FOUNDRYCTL) gen --debug $(NO_LEDGER) schemas
+
+gen-docs:
+ $(FOUNDRYCTL) catalog --debug $(NO_LEDGER) --format json --output "docs/examples/castings.json"
+ $(GOTMPL) -b README.md.gotmpl -d "$(CASTINGS_JSON)" -o README.md
+ $(GOTMPL) -b docs/examples/README.md.gotmpl -d "$(CASTINGS_JSON)" -o docs/examples/README.md
+
+docs: gen-examples gen-schemas gen-docs
diff --git a/README.md b/README.md
index d6cc49e..5218e0f 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,9 @@
-
Foundry
-
+
+
+Foundry
@@ -49,7 +50,7 @@ curl -L "https://github.com/Hanzo O11y/foundry/releases/latest/download/foundry_
tar -xzf foundry.tar.gz
```
-**macOS:**
+See [Getting Started](docs/getting-started.md) for manual install options and PATH setup.
```bash
curl -L "https://github.com/Hanzo O11y/foundry/releases/latest/download/foundry_darwin_$(uname -m | sed 's/x86_64/amd64/g' | sed 's/arm64/arm64/g').tar.gz" -o foundry.tar.gz
@@ -89,7 +90,6 @@ spec:
```bash
foundryctl cast -f casting.yaml
```
-## The Foundry Model
Foundry uses a metalworking metaphor: you define a **Casting**, which contains **Moldings** (components), and Foundry **forges** them into **Pours** (generated files).
@@ -140,49 +140,85 @@ A Casting is a complete Hanzo O11y deployment definition: one YAML file that Fou
**Pours** are the generated deployment and configuration files. When you run `forge`, Foundry creates the `pours/` directory containing everything needed to run Hanzo O11y.
```
-pours/
-└── deployment/
- ├── compose.yaml
- └── configs/
- ├── ingester/
- │ ├── ingester.yaml
- │ └── opamp.yaml
- ├── telemetrykeeper/
- │ └── keeper-0.yaml
- └── telemetrystore/
- ├── config.yaml
- └── functions.yaml
+ +-------------------------------------------------------------+
+ | casting.yaml |
+ | your single deployment config |
+ +-----------------------------+-------------------------------+
+ |
+ +---------------+---------------+
+ | | |
+ v v v
+ +-----------+ +-----------+ +----------------+
+ | gauge | | forge | | cast |
+ |-----------| |-----------| |----------------|
+ | validate | | generate | | gauge + forge |
+ | prereqs | | files | | + deploy |
+ +-----------+ +-----+-----+ +-------+--------+
+ | |
+ v |
+ +----------------------------------+ |
+ | pours/ | |
+ |----------------------------------| |
+ | compose.yaml manifests/ | |
+ | values.yaml configs/ | |
+ | render.yaml *.tf.json | |
+ +-----------------+----------------+ |
+ | |
+ +----------+---------+
+ v
+ +-------------------------------------------------------------+
+ | SigNoz Running |
+ |-------------------------------------------------------------|
+ | Docker Compose - Swarm - Systemd - Kubernetes - ECS |
+ | Render - Railway - Coolify |
+ +-------------------------------------------------------------+
```
+`foundryctl cast` runs the full pipeline (gauge + forge + deploy) in one step.
+
+| Term | What it means |
+| --- | --- |
+| **Casting** | Your deployment config. One YAML file describing what you want. [Learn more](docs/concepts/casting.md) |
+| **Moldings** | The SigNoz components (ClickHouse, PostgreSQL, OTel Collector, etc.) that Foundry configures for you. [Learn more](docs/concepts/moldings.md) |
+| **Pours** | The generated output files in `pours/`. Structure varies by deployment mode. See [examples](docs/examples/) |
+
+## Examples
+
+| Platform | Mode | Flavor | Example |
+| --- | --- | --- | --- |
+| - | docker | compose | [docker/compose](docs/examples/docker/compose/) |
+| - | docker | swarm | [docker/swarm](docs/examples/docker/swarm/) |
+| - | kubernetes | helm | [kubernetes/helm](docs/examples/kubernetes/helm/) |
+| - | kubernetes | kustomize | [kubernetes/kustomize](docs/examples/kubernetes/kustomize/) |
+| - | systemd | binary | [systemd/binary](docs/examples/systemd/binary/) |
+| ecs | ec2 | terraform | [ecs/ec2/terraform](docs/examples/ecs/ec2/terraform/) |
+| coolify | - | stack | [coolify/stack](docs/examples/coolify/stack/) |
+| railway | - | template | [railway/template](docs/examples/railway/template/) |
+| render | - | blueprint | [render/blueprint](docs/examples/render/blueprint/) |
+
## CLI reference
```
-Usage:
- foundryctl [command]
+foundryctl [command]
-Available Commands:
- gauge Gauge whether required tools are available
- forge Forge configuration and deployment files
- cast Cast to the target environment
- gen Generate example files for all supported deployments
- help Help about any command
+Commands:
+ gauge Validate required tools for your deployment mode
+ forge Generate deployment and configuration files
+ cast Full pipeline: gauge + forge + deploy
+ gen Generate example casting files for all modes
Flags:
- -d, --debug Enable debug mode
- -f, --file string Path to the Casting configuration file (default "casting.yaml")
- -p, --pours string Directory for Pours (default "./pours")
- -h, --help Help for foundryctl
+ -d, --debug Enable debug logging
+ -f, --file string Casting file path (default "casting.yaml")
+ -p, --pours string Output directory (default "./pours")
```
-### gauge
-
-Validates that all required tools are installed for your deployment mode:
-
```bash
+# Validate tools
foundryctl gauge -f casting.yaml
-```
-### forge
+# Generate files only
+foundryctl forge -f casting.yaml
Generates deployment and configuration files based on your Casting:
@@ -197,21 +233,12 @@ Deploys Hanzo O11y to your target environment. Runs `gauge` and `forge` automati
```bash
foundryctl cast -f casting.yaml
-# Skip gauge check
-foundryctl cast --no-gauge
-
-# Skip forge (use existing Pours)
-foundryctl cast --no-forge
-```
-
-### gen
-
-Generates example Casting configurations for all supported deployment modes:
-
-```bash
+# Generate examples for all deployment modes
foundryctl gen
```
+See [CLI Reference](docs/reference/cli.md) for the full command reference with all flags and examples.
+
## What's next
- [How to write a casting](docs/casting.md): step-by-step guide to casting files
diff --git a/README.md.gotmpl b/README.md.gotmpl
new file mode 100644
index 0000000..e6ef12e
--- /dev/null
+++ b/README.md.gotmpl
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+Foundry
+
+
+
+
+
+
Foundry is a centralized hub for SigNoz installation configurations and deployments: integrations for install. Select yours, configure, and run SigNoz.
+
+## Overview
+
+Just as a metalworking foundry turns raw materials into finished products, Foundry forges your deployment from a single configuration and casts SigNoz to fit your environment.
+
+Foundry abstracts away the complexities of the installation process so you can spend time *using* SigNoz rather than *installing* it.
+
+
+
+
+
+## Features
+
+- **Multi-platform support**: Deploy SigNoz using Docker Compose, Systemd (bare metal), or Render for flexible installation across environments.
+- **Single configuration file**: Configure your entire SigNoz stack with one concise file.
+- **Automatic dependency management**: Handles inter-service dependencies
+- **Tool validation**: Verify prerequisites before deployment
+
+## Quick start
+
+**1. Install foundryctl**
+
+```bash
+curl -fsSL https://signoz.io/foundry.sh | bash
+```
+
+See [Getting Started](docs/getting-started.md) for manual install options and PATH setup.
+
+**2. Create a casting**
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ mode: docker
+ flavor: compose
+```
+
+**3. Deploy**
+
+```bash
+foundryctl cast -f casting.yaml
+```
+
+## How it works
+
+```
+ +-------------------------------------------------------------+
+ | casting.yaml |
+ | your single deployment config |
+ +-----------------------------+-------------------------------+
+ |
+ +---------------+---------------+
+ | | |
+ v v v
+ +-----------+ +-----------+ +----------------+
+ | gauge | | forge | | cast |
+ |-----------| |-----------| |----------------|
+ | validate | | generate | | gauge + forge |
+ | prereqs | | files | | + deploy |
+ +-----------+ +-----+-----+ +-------+--------+
+ | |
+ v |
+ +----------------------------------+ |
+ | pours/ | |
+ |----------------------------------| |
+ | compose.yaml manifests/ | |
+ | values.yaml configs/ | |
+ | render.yaml *.tf.json | |
+ +-----------------+----------------+ |
+ | |
+ +----------+---------+
+ v
+ +-------------------------------------------------------------+
+ | SigNoz Running |
+ |-------------------------------------------------------------|
+ | Docker Compose - Swarm - Systemd - Kubernetes - ECS |
+ | Render - Railway - Coolify |
+ +-------------------------------------------------------------+
+```
+
+`foundryctl cast` runs the full pipeline (gauge + forge + deploy) in one step.
+
+| Term | What it means |
+| --- | --- |
+| **Casting** | Your deployment config. One YAML file describing what you want. [Learn more](docs/concepts/casting.md) |
+| **Moldings** | The SigNoz components (ClickHouse, PostgreSQL, OTel Collector, etc.) that Foundry configures for you. [Learn more](docs/concepts/moldings.md) |
+| **Pours** | The generated output files in `pours/`. Structure varies by deployment mode. See [examples](docs/examples/) |
+
+## Examples
+
+| Platform | Mode | Flavor | Example |
+| --- | --- | --- | --- |
+{{- range .Castings }}
+| {{ or .platform "-" }} | {{ or .mode "-" }} | {{ or .flavor "-" }} | [{{ .example }}](docs/examples/{{ .example }}/) |
+{{- end }}
+
+## CLI reference
+
+```
+foundryctl [command]
+
+Commands:
+ gauge Validate required tools for your deployment mode
+ forge Generate deployment and configuration files
+ cast Full pipeline: gauge + forge + deploy
+ gen Generate example casting files for all modes
+
+Flags:
+ -d, --debug Enable debug logging
+ -f, --file string Casting file path (default "casting.yaml")
+ -p, --pours string Output directory (default "./pours")
+```
+
+```bash
+# Validate tools
+foundryctl gauge -f casting.yaml
+
+# Generate files only
+foundryctl forge -f casting.yaml
+
+# Full deploy
+foundryctl cast -f casting.yaml
+
+# Generate examples for all deployment modes
+foundryctl gen
+```
+
+See [CLI Reference](docs/reference/cli.md) for the full command reference with all flags and examples.
+
+## What's next
+
+- [Getting Started](docs/getting-started.md) - install and deploy your first SigNoz instance
+- [Concepts](docs/concepts/) - understand castings, moldings, and patches
+- [Examples](docs/examples/) - deployment configurations for all supported platforms
+- [Reference](docs/reference/) - CLI commands and casting file spec
+- [SigNoz documentation](https://signoz.io/docs/) - learn more about SigNoz
+- [SigNoz Slack](https://signoz.io/slack) - community and support
+
+## How can I get help?
+
+- **Issues**: [GitHub Issues](https://github.com/signoz/foundry/issues)
+- **Documentation**: [SigNoz Docs](https://signoz.io/docs/)
+- **Community**: [SigNoz Slack](https://signoz.io/slack)
+
+**Made with ❤️ for the SigNoz community**
diff --git a/api/v1alpha1/casting.go b/api/v1alpha1/casting.go
deleted file mode 100644
index 70e2c22..0000000
--- a/api/v1alpha1/casting.go
+++ /dev/null
@@ -1,92 +0,0 @@
-package v1alpha1
-
-type Casting struct {
- TypeVersion `json:",inline" yaml:",inline"`
-
- // Metadata of the casting configuration.
- Metadata TypeMetadata `json:"metadata" yaml:"metadata" description:"Metadata of the casting configuration"`
-
- // Specification for the casting.
- Spec CastingSpec `json:"spec" yaml:"spec" description:"Specification for the casting"`
-
- // Status of the casting.
- Status CastingStatus `json:"status,omitzero" yaml:"status,omitempty" description:"Status of the casting"`
-}
-
-type CastingSpec struct {
- // Mode platform in which the platform will run.
- Deployment TypeDeployment `json:"deployment" yaml:"deployment" description:"Deployment configuration for the platform"`
-
- // The configuration for the o11y molding.
- O11y HanzoO11y `json:"o11y,omitzero" yaml:"o11y,omitempty" description:"The configuration for the HanzoO11y molding"`
-
- // The configuration for the telemetry store molding.
- TelemetryStore TelemetryStore `json:"telemetrystore,omitzero" yaml:"telemetrystore,omitempty" description:"The configuration for the telemetry store molding"`
-
- // The configuration for the telemetry keeper molding.
- TelemetryKeeper TelemetryKeeper `json:"telemetrykeeper,omitzero" yaml:"telemetrykeeper,omitempty" description:"The configuration for the telemetry keeper molding"`
-
- // The configuration for the meta store molding.
- MetaStore MetaStore `json:"metastore,omitzero" yaml:"metastore,omitempty" description:"The configuration for the meta store molding"`
-
- // The configuration for the ingester molding.
- Ingester Ingester `json:"ingester,omitzero" yaml:"ingester,omitempty" description:"The configuration for the ingester molding"`
-}
-
-type CastingStatus struct {
- // Checksum of the casting file.
- Checksum string `json:"checksum" yaml:"checksum" description:"Checksum of the casting file"`
-}
-
-func MergeCastingSpecAndStatus(base *Casting) error {
- if err := base.Spec.O11y.Spec.MergeStatus(base.Spec.O11y.Status.MoldingStatus); err != nil {
- return err
- }
-
- if err := base.Spec.TelemetryStore.Spec.MergeStatus(base.Spec.TelemetryStore.Status.MoldingStatus); err != nil {
- return err
- }
-
- if err := base.Spec.TelemetryKeeper.Spec.MergeStatus(base.Spec.TelemetryKeeper.Status.MoldingStatus); err != nil {
- return err
- }
-
- if err := base.Spec.MetaStore.Spec.MergeStatus(base.Spec.MetaStore.Status.MoldingStatus); err != nil {
- return err
- }
-
- if err := base.Spec.Ingester.Spec.MergeStatus(base.Spec.Ingester.Status.MoldingStatus); err != nil {
- return err
- }
-
- return nil
-}
-
-func DefaultCasting() Casting {
- return Casting{
- TypeVersion: TypeVersion{
- APIVersion: "v1alpha1",
- },
- Metadata: TypeMetadata{
- Name: "o11y",
- },
- Spec: CastingSpec{
- O11y: DefaultHanzoO11y(),
- TelemetryStore: DefaultTelemetryStore(),
- TelemetryKeeper: DefaultTelemetryKeeper(),
- MetaStore: DefaultMetaStore(),
- Ingester: DefaultIngester(),
- },
- }
-}
-
-func ExampleCasting() Casting {
- return Casting{
- TypeVersion: TypeVersion{
- APIVersion: "v1alpha1",
- },
- Metadata: TypeMetadata{
- Name: "o11y",
- },
- }
-}
diff --git a/api/v1alpha1/casting.schema.json b/api/v1alpha1/casting.schema.json
new file mode 100644
index 0000000..5607888
--- /dev/null
+++ b/api/v1alpha1/casting.schema.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "Foundry Casting",
+ "oneOf": [
+ {
+ "$ref": "installation/casting.schema.json"
+ },
+ {
+ "$ref": "collectionagent/casting.schema.json"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/api/v1alpha1/casting_kind.go b/api/v1alpha1/casting_kind.go
new file mode 100644
index 0000000..3d71090
--- /dev/null
+++ b/api/v1alpha1/casting_kind.go
@@ -0,0 +1,87 @@
+package v1alpha1
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+
+ "github.com/swaggest/jsonschema-go"
+ "go.yaml.in/yaml/v3"
+)
+
+var _ yaml.Marshaler = (*Kind)(nil)
+var _ yaml.Unmarshaler = (*Kind)(nil)
+var _ json.Marshaler = (*Kind)(nil)
+var _ json.Unmarshaler = (*Kind)(nil)
+var _ fmt.Stringer = (*Kind)(nil)
+var _ jsonschema.Enum = (*Kind)(nil)
+
+var (
+ KindInstallation Kind = Kind{s: "Installation"}
+ KindCollectionAgent Kind = Kind{s: "CollectionAgent"}
+)
+
+// Kind discriminates between top-level casting resource types.
+// An empty/missing kind unmarshals to KindInstallation for backwards compatibility
+// with casting files written before kind was introduced.
+type Kind struct {
+ s string
+}
+
+func (kind Kind) String() string {
+ return kind.s
+}
+
+func Kinds() []Kind {
+ return []Kind{KindInstallation, KindCollectionAgent}
+}
+
+func (kind Kind) MarshalJSON() ([]byte, error) {
+ return json.Marshal(kind.String())
+}
+
+func (kind *Kind) UnmarshalJSON(text []byte) error {
+ var str string
+ if err := json.Unmarshal(text, &str); err != nil {
+ return err
+ }
+
+ return kind.UnmarshalText([]byte(str))
+}
+
+func (kind *Kind) UnmarshalText(text []byte) error {
+ if len(text) == 0 {
+ *kind = KindInstallation
+ return nil
+ }
+
+ for _, available := range Kinds() {
+ if available.String() == string(text) {
+ *kind = available
+ return nil
+ }
+ }
+
+ return errors.New("invalid kind: " + string(text))
+}
+
+func (kind Kind) MarshalText() ([]byte, error) {
+ return []byte(kind.String()), nil
+}
+
+func (kind *Kind) UnmarshalYAML(node *yaml.Node) error {
+ return kind.UnmarshalText([]byte(node.Value))
+}
+
+func (kind Kind) MarshalYAML() (any, error) {
+ return kind.String(), nil
+}
+
+func (kind Kind) Enum() []any {
+ kinds := []any{}
+ for _, kind := range Kinds() {
+ kinds = append(kinds, kind.String())
+ }
+
+ return kinds
+}
diff --git a/api/v1alpha1/casting_meta.go b/api/v1alpha1/casting_meta.go
new file mode 100644
index 0000000..483d2d7
--- /dev/null
+++ b/api/v1alpha1/casting_meta.go
@@ -0,0 +1,17 @@
+package v1alpha1
+
+// CastingMeta carries the apiVersion, kind, metadata, and status fields
+// shared by every casting kind. Per-Kind Casting structs embed it inline.
+type CastingMeta struct {
+ TypeVersion `json:",inline" yaml:",inline"`
+ Kind Kind `json:"kind" yaml:"kind" required:"true" description:"Kind of the casting resource."`
+ Metadata TypeMetadata `json:"metadata" yaml:"metadata" required:"true" description:"Metadata of the casting configuration"`
+ Status Status `json:"status,omitzero" yaml:"status,omitempty" description:"Status of the casting"`
+ _ struct{} `additionalProperties:"false"`
+}
+
+// Status carries the casting file's checksum.
+type Status struct {
+ Checksum string `json:"checksum" yaml:"checksum" description:"Checksum of the casting file"`
+ _ struct{} `additionalProperties:"false"`
+}
diff --git a/api/v1alpha1/collectionagent/casting.go b/api/v1alpha1/collectionagent/casting.go
new file mode 100644
index 0000000..fbe567f
--- /dev/null
+++ b/api/v1alpha1/collectionagent/casting.go
@@ -0,0 +1,75 @@
+package collectionagent
+
+import (
+ "github.com/signoz/foundry/api/v1alpha1"
+ "github.com/signoz/foundry/internal/domain"
+)
+
+// Casting is the CollectionAgent kind.
+type Casting struct {
+ v1alpha1.CastingMeta `json:",inline" yaml:",inline"`
+ Spec Spec `json:"spec" yaml:"spec" required:"true" description:"CollectionAgent specification"`
+ _ struct{} `additionalProperties:"false"`
+}
+
+// Spec is the CollectionAgent-specific configuration.
+type Spec struct {
+ Deployment v1alpha1.TypeDeployment `json:"deployment" yaml:"deployment" required:"true" description:"Deployment configuration for the platform"`
+ Patches []v1alpha1.PatchEntry `json:"patches,omitempty" yaml:"patches,omitempty" description:"Patch operations to apply to generated materials"`
+ Collector Collector `json:"collector,omitzero" yaml:"collector,omitempty" description:"The configuration for the collector molding"`
+ _ struct{} `additionalProperties:"false"`
+}
+
+var _ v1alpha1.Machinery = (*Casting)(nil)
+
+// Default returns a CollectionAgent with the collector molding initialised
+// from its default.
+func Default() *Casting {
+ return &Casting{
+ CastingMeta: v1alpha1.CastingMeta{
+ TypeVersion: v1alpha1.TypeVersion{APIVersion: "v1alpha1"},
+ Kind: v1alpha1.KindCollectionAgent,
+ Metadata: v1alpha1.TypeMetadata{Name: "signoz"},
+ },
+ Spec: Spec{
+ Collector: DefaultCollector(),
+ },
+ }
+}
+
+// Example returns a minimal CollectionAgent; the forge pipeline fills in
+// defaults.
+func Example() *Casting {
+ return &Casting{
+ CastingMeta: v1alpha1.CastingMeta{
+ TypeVersion: v1alpha1.TypeVersion{APIVersion: "v1alpha1"},
+ Kind: v1alpha1.KindCollectionAgent,
+ Metadata: v1alpha1.TypeMetadata{Name: "signoz"},
+ },
+ }
+}
+
+// Kind reports the casting kind. Shadows the embedded CastingMeta.Kind field;
+// the field stays reachable as c.CastingMeta.Kind.
+func (c *Casting) Kind() v1alpha1.Kind {
+ return v1alpha1.KindCollectionAgent
+}
+
+// MergeStatusIntoSpec folds the collector molding's Status into its Spec.
+func (c *Casting) MergeStatusIntoSpec() error {
+ if err := c.Spec.Collector.Spec.MergeStatus(c.Spec.Collector.Status.MoldingStatus); err != nil {
+ return err
+ }
+ return nil
+}
+
+// TrackableProperties returns analytics tags for the casting.
+func (c *Casting) TrackableProperties() domain.Properties {
+ return domain.NewProperties().
+ Set("kind", v1alpha1.KindCollectionAgent.String()).
+ Set("platform", c.Spec.Deployment.Platform.String()).
+ Set("mode", c.Spec.Deployment.Mode.String()).
+ Set("flavor", c.Spec.Deployment.Flavor.String()).
+ Set("patches_count", len(c.Spec.Patches)).
+ Set("collector_kind", c.Spec.Collector.Kind.String())
+}
diff --git a/api/v1alpha1/collectionagent/casting.schema.json b/api/v1alpha1/collectionagent/casting.schema.json
new file mode 100644
index 0000000..8998b54
--- /dev/null
+++ b/api/v1alpha1/collectionagent/casting.schema.json
@@ -0,0 +1,384 @@
+{
+ "required": [
+ "apiVersion",
+ "kind",
+ "metadata",
+ "spec"
+ ],
+ "additionalProperties": false,
+ "definitions": {
+ "CollectionagentCollector": {
+ "additionalProperties": false,
+ "properties": {
+ "kind": {
+ "$ref": "#/definitions/CollectionagentCollectorKind",
+ "description": "Kind of the collector to use",
+ "examples": [
+ "agent"
+ ]
+ },
+ "spec": {
+ "$ref": "#/definitions/V1Alpha1MoldingSpec",
+ "description": "Specification for the collector"
+ },
+ "status": {
+ "$ref": "#/definitions/CollectionagentCollectorStatus",
+ "description": "Status of the collector"
+ }
+ },
+ "type": "object"
+ },
+ "CollectionagentCollectorKind": {
+ "enum": [
+ "agent"
+ ],
+ "type": "string"
+ },
+ "CollectionagentCollectorStatus": {
+ "additionalProperties": false,
+ "properties": {
+ "config": {
+ "$ref": "#/definitions/V1Alpha1TypeConfig",
+ "description": "Configuration for the molding"
+ },
+ "env": {
+ "description": "Environment variables for the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "extras": {
+ "description": "Extra information about the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "CollectionagentSpec": {
+ "required": [
+ "deployment"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "collector": {
+ "$ref": "#/definitions/CollectionagentCollector",
+ "description": "The configuration for the collector molding"
+ },
+ "deployment": {
+ "$ref": "#/definitions/V1Alpha1TypeDeployment",
+ "description": "Deployment configuration for the platform"
+ },
+ "patches": {
+ "description": "Patch operations to apply to generated materials",
+ "items": {
+ "$ref": "#/definitions/V1Alpha1PatchEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1Flavor": {
+ "enum": [
+ "compose",
+ "swarm",
+ "binary",
+ "kustomize",
+ "helm",
+ "blueprint",
+ "stack",
+ "template",
+ "terraform"
+ ],
+ "type": "string"
+ },
+ "V1Alpha1Kind": {
+ "enum": [
+ "CollectionAgent"
+ ],
+ "type": "string"
+ },
+ "V1Alpha1Mode": {
+ "enum": [
+ "docker",
+ "systemd",
+ "kubernetes",
+ "ec2"
+ ],
+ "type": "string"
+ },
+ "V1Alpha1MoldingSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "cluster": {
+ "$ref": "#/definitions/V1Alpha1TypeCluster",
+ "description": "Cluster configuration for the molding"
+ },
+ "config": {
+ "$ref": "#/definitions/V1Alpha1TypeConfig",
+ "description": "Configuration for the molding"
+ },
+ "enabled": {
+ "description": "Whether the molding is enabled",
+ "default": true,
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "env": {
+ "description": "Environment variables for the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "image": {
+ "description": "Container image of the molding",
+ "examples": [
+ "signoz/signoz:latest"
+ ],
+ "pattern": "^[a-z0-9]+([._-][a-z0-9]+)*(/[a-z0-9]+([._-][a-z0-9]+)*)*(:[a-zA-Z0-9._-]+)?(@sha256:[a-f0-9]{64})?$",
+ "type": "string"
+ },
+ "version": {
+ "description": "The version of the molding to use",
+ "examples": [
+ "latest"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1PatchEntry": {
+ "required": [
+ "target",
+ "operations"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "operations": {
+ "description": "JSON Patch (RFC 6902) operations to apply. Used by the jsonpatch driver.",
+ "items": {
+ "$ref": "#/definitions/V1Alpha1PatchOperation"
+ },
+ "minItems": 1,
+ "type": [
+ "array",
+ "null"
+ ]
+ },
+ "target": {
+ "description": "Target output file to patch",
+ "examples": [
+ "compose.yaml",
+ "signoz/deployment.yaml",
+ "values.yaml",
+ "telemetrystore/telemtrystore-clickhouse-0-*.yaml"
+ ],
+ "minLength": 1,
+ "type": "string"
+ },
+ "type": {
+ "description": "Patch driver type. Defaults to jsonpatch.",
+ "default": "jsonpatch",
+ "examples": [
+ "jsonpatch"
+ ],
+ "enum": [
+ "",
+ "jsonpatch"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1PatchOperation": {
+ "required": [
+ "op",
+ "path"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "description": "Source JSON Pointer for move and copy operations",
+ "examples": [
+ "/services/clickhouse/old_field"
+ ],
+ "pattern": "^/",
+ "type": "string"
+ },
+ "op": {
+ "description": "JSON Patch (RFC 6902) operation type",
+ "enum": [
+ "add",
+ "remove",
+ "replace",
+ "move",
+ "copy",
+ "test"
+ ],
+ "type": "string"
+ },
+ "path": {
+ "description": "JSON Pointer (RFC 6901) to the target location",
+ "examples": [
+ "/services/clickhouse/mem_limit"
+ ],
+ "pattern": "^/",
+ "type": "string"
+ },
+ "value": {
+ "description": "Value for add, replace, or test operations"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1Platform": {
+ "enum": [
+ "render",
+ "coolify",
+ "railway",
+ "ecs",
+ "aws",
+ "gcp",
+ "azure"
+ ],
+ "type": "string"
+ },
+ "V1Alpha1Status": {
+ "additionalProperties": false,
+ "properties": {
+ "checksum": {
+ "description": "Checksum of the casting file",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1TypeCluster": {
+ "additionalProperties": false,
+ "properties": {
+ "replicas": {
+ "description": "Number of replicas for the molding.",
+ "examples": [
+ 1
+ ],
+ "minimum": 0,
+ "type": [
+ "null",
+ "integer"
+ ]
+ },
+ "shards": {
+ "description": "Number of shards for the molding",
+ "examples": [
+ 1
+ ],
+ "minimum": 1,
+ "type": [
+ "null",
+ "integer"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1TypeConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "data": {
+ "description": "Configuration data as key-value pairs.",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1TypeDeployment": {
+ "additionalProperties": false,
+ "properties": {
+ "flavor": {
+ "$ref": "#/definitions/V1Alpha1Flavor",
+ "description": "Flavor of mode for the deployment"
+ },
+ "mode": {
+ "$ref": "#/definitions/V1Alpha1Mode",
+ "description": "Type of installation method"
+ },
+ "platform": {
+ "$ref": "#/definitions/V1Alpha1Platform",
+ "description": "Provider where an installation runs on"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1TypeMetadata": {
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "annotations": {
+ "description": "Annotations is an unstructured key-value map for arbitrary metadata. Can be used to specify deployment-specific settings.",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": [
+ "object",
+ "null"
+ ]
+ },
+ "name": {
+ "description": "The name of this installation. This name is used to identify the installation.",
+ "default": "signoz",
+ "examples": [
+ "signoz"
+ ],
+ "maxLength": 63,
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "properties": {
+ "apiVersion": {
+ "description": "API Version of the configuration schema.",
+ "default": "v1alpha1",
+ "examples": [
+ "v1alpha1"
+ ],
+ "enum": [
+ "v1alpha1"
+ ],
+ "type": "string"
+ },
+ "kind": {
+ "$ref": "#/definitions/V1Alpha1Kind",
+ "description": "Kind of the casting resource."
+ },
+ "metadata": {
+ "$ref": "#/definitions/V1Alpha1TypeMetadata",
+ "description": "Metadata of the casting configuration"
+ },
+ "spec": {
+ "$ref": "#/definitions/CollectionagentSpec",
+ "description": "CollectionAgent specification"
+ },
+ "status": {
+ "$ref": "#/definitions/V1Alpha1Status",
+ "description": "Status of the casting"
+ }
+ },
+ "type": "object"
+}
\ No newline at end of file
diff --git a/api/v1alpha1/collectionagent/collector.go b/api/v1alpha1/collectionagent/collector.go
new file mode 100644
index 0000000..0a46351
--- /dev/null
+++ b/api/v1alpha1/collectionagent/collector.go
@@ -0,0 +1,40 @@
+package collectionagent
+
+import "github.com/signoz/foundry/api/v1alpha1"
+
+type Collector struct {
+ // Kind of the collector to use.
+ Kind CollectorKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the collector to use" examples:"[\"agent\"]"`
+
+ // Specification for the collector.
+ Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the collector"`
+
+ // Status of the collector.
+ Status CollectorStatus `json:"status" yaml:"status,omitempty" description:"Status of the collector"`
+
+ _ struct{} `additionalProperties:"false"`
+}
+
+type CollectorStatus struct {
+ v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
+
+ _ struct{} `additionalProperties:"false"`
+}
+
+func DefaultCollector() Collector {
+ return Collector{
+ Kind: CollectorKindAgent,
+ Spec: v1alpha1.MoldingSpec{
+ Enabled: v1alpha1.BoolPtr(true),
+ Cluster: v1alpha1.TypeCluster{
+ Replicas: v1alpha1.IntPtr(1),
+ },
+ Version: "v0.139.0",
+ Image: "otel/opentelemetry-collector-contrib:v0.139.0",
+ Env: map[string]string{},
+ Config: v1alpha1.TypeConfig{
+ Data: map[string]string{},
+ },
+ },
+ }
+}
diff --git a/api/v1alpha1/collectionagent/collector_kind.go b/api/v1alpha1/collectionagent/collector_kind.go
new file mode 100644
index 0000000..5dc0778
--- /dev/null
+++ b/api/v1alpha1/collectionagent/collector_kind.go
@@ -0,0 +1,81 @@
+package collectionagent
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+
+ "github.com/swaggest/jsonschema-go"
+ "go.yaml.in/yaml/v3"
+)
+
+var _ yaml.Marshaler = (*CollectorKind)(nil)
+var _ yaml.Unmarshaler = (*CollectorKind)(nil)
+var _ json.Marshaler = (*CollectorKind)(nil)
+var _ json.Unmarshaler = (*CollectorKind)(nil)
+var _ fmt.Stringer = (*CollectorKind)(nil)
+var _ jsonschema.Enum = (*CollectorKind)(nil)
+
+var (
+ CollectorKindAgent CollectorKind = CollectorKind{s: "agent"}
+)
+
+type CollectorKind struct {
+ s string
+}
+
+func (kind CollectorKind) String() string {
+ return kind.s
+}
+
+func CollectorKinds() []CollectorKind {
+ return []CollectorKind{CollectorKindAgent}
+}
+
+func (kind CollectorKind) MarshalJSON() ([]byte, error) {
+ return json.Marshal(kind.String())
+}
+
+func (kind *CollectorKind) UnmarshalJSON(text []byte) error {
+ var str string
+ if err := json.Unmarshal(text, &str); err != nil {
+ return err
+ }
+
+ return kind.UnmarshalText([]byte(str))
+}
+
+func (kind *CollectorKind) UnmarshalText(text []byte) error {
+ for _, availableKind := range CollectorKinds() {
+ if availableKind.String() == string(text) {
+ *kind = availableKind
+ return nil
+ }
+ }
+ if text == nil {
+ *kind = CollectorKind{s: ""}
+ return nil
+ }
+ return errors.New("invalid collector kind: " + string(text))
+}
+
+func (kind CollectorKind) MarshalText() ([]byte, error) {
+ return []byte(kind.String()), nil
+}
+
+func (kind *CollectorKind) UnmarshalYAML(node *yaml.Node) error {
+ return kind.UnmarshalText([]byte(node.Value))
+}
+
+func (kind CollectorKind) MarshalYAML() (any, error) {
+ return kind.String(), nil
+}
+
+func (kind CollectorKind) Enum() []any {
+ kinds := []any{}
+ for _, kind := range CollectorKinds() {
+ kinds = append(kinds, kind.String())
+ }
+
+ return kinds
+}
diff --git a/api/v1alpha1/collectionagent/schema.go b/api/v1alpha1/collectionagent/schema.go
new file mode 100644
index 0000000..d01ba5e
--- /dev/null
+++ b/api/v1alpha1/collectionagent/schema.go
@@ -0,0 +1,18 @@
+package collectionagent
+
+import (
+ _ "embed"
+
+ "github.com/google/jsonschema-go/jsonschema"
+ "github.com/signoz/foundry/api/v1alpha1"
+)
+
+//go:embed casting.schema.json
+var schemaJSON []byte
+
+var schema = v1alpha1.MustResolveSchema(schemaJSON)
+
+// Schema returns the resolved JSON schema for a CollectionAgent casting.
+func Schema() *jsonschema.Resolved {
+ return schema
+}
diff --git a/api/v1alpha1/collectionagent/schema_test.go b/api/v1alpha1/collectionagent/schema_test.go
new file mode 100644
index 0000000..8405f5f
--- /dev/null
+++ b/api/v1alpha1/collectionagent/schema_test.go
@@ -0,0 +1,26 @@
+package collectionagent
+
+import (
+ "encoding/json"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestSchema(t *testing.T) {
+ t.Parallel()
+ assert.NotNil(t, Schema())
+}
+
+func TestSchemaValidatesDefault(t *testing.T) {
+ t.Parallel()
+
+ contents, err := json.Marshal(Default())
+ require.NoError(t, err)
+
+ var payload map[string]any
+ require.NoError(t, json.Unmarshal(contents, &payload))
+
+ assert.NoError(t, Schema().Validate(payload))
+}
diff --git a/api/v1alpha1/deployment_flavor.go b/api/v1alpha1/deployment_flavor.go
new file mode 100644
index 0000000..e09b174
--- /dev/null
+++ b/api/v1alpha1/deployment_flavor.go
@@ -0,0 +1,101 @@
+package v1alpha1
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+
+ "github.com/swaggest/jsonschema-go"
+ "go.yaml.in/yaml/v3"
+)
+
+var _ yaml.Marshaler = (*Flavor)(nil)
+var _ yaml.Unmarshaler = (*Flavor)(nil)
+var _ json.Marshaler = (*Flavor)(nil)
+var _ json.Unmarshaler = (*Flavor)(nil)
+var _ fmt.Stringer = (*Flavor)(nil)
+var _ jsonschema.Enum = (*Flavor)(nil)
+
+var (
+ FlavorCompose Flavor = Flavor{s: "compose"}
+ FlavorSwarm Flavor = Flavor{s: "swarm"}
+ FlavorBinary Flavor = Flavor{s: "binary"}
+ FlavorKustomize Flavor = Flavor{s: "kustomize"}
+ FlavorHelm Flavor = Flavor{s: "helm"}
+ FlavorBlueprint Flavor = Flavor{s: "blueprint"}
+ FlavorStack Flavor = Flavor{s: "stack"}
+ FlavorTemplate Flavor = Flavor{s: "template"}
+ FlavorTerraform Flavor = Flavor{s: "terraform"}
+)
+
+type Flavor struct {
+ s string
+}
+
+func (flavor Flavor) String() string {
+ return flavor.s
+}
+
+func Flavors() []Flavor {
+ return []Flavor{
+ FlavorCompose,
+ FlavorSwarm,
+ FlavorBinary,
+ FlavorKustomize,
+ FlavorHelm,
+ FlavorBlueprint,
+ FlavorStack,
+ FlavorTemplate,
+ FlavorTerraform,
+ }
+}
+
+func (flavor Flavor) MarshalJSON() ([]byte, error) {
+ return json.Marshal(flavor.String())
+}
+
+func (flavor *Flavor) UnmarshalJSON(text []byte) error {
+ var str string
+ if err := json.Unmarshal(text, &str); err != nil {
+ return err
+ }
+
+ return flavor.UnmarshalText([]byte(str))
+}
+
+func (flavor *Flavor) UnmarshalText(text []byte) error {
+ for _, available := range Flavors() {
+ if available.String() == string(text) {
+ *flavor = available
+ return nil
+ }
+ }
+
+ if len(text) == 0 {
+ *flavor = Flavor{s: ""}
+ return nil
+ }
+
+ return errors.New("invalid deployment flavor: " + string(text))
+}
+
+func (flavor Flavor) MarshalText() ([]byte, error) {
+ return []byte(flavor.String()), nil
+}
+
+func (flavor *Flavor) UnmarshalYAML(node *yaml.Node) error {
+ return flavor.UnmarshalText([]byte(node.Value))
+}
+
+func (flavor Flavor) MarshalYAML() (any, error) {
+ return flavor.String(), nil
+}
+
+func (flavor Flavor) Enum() []any {
+ flavors := []any{}
+ for _, flavor := range Flavors() {
+ flavors = append(flavors, flavor.String())
+ }
+
+ return flavors
+}
diff --git a/api/v1alpha1/deployment_mode.go b/api/v1alpha1/deployment_mode.go
new file mode 100644
index 0000000..a787efc
--- /dev/null
+++ b/api/v1alpha1/deployment_mode.go
@@ -0,0 +1,86 @@
+package v1alpha1
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+
+ "github.com/swaggest/jsonschema-go"
+ "go.yaml.in/yaml/v3"
+)
+
+var _ yaml.Marshaler = (*Mode)(nil)
+var _ yaml.Unmarshaler = (*Mode)(nil)
+var _ json.Marshaler = (*Mode)(nil)
+var _ json.Unmarshaler = (*Mode)(nil)
+var _ fmt.Stringer = (*Mode)(nil)
+var _ jsonschema.Enum = (*Mode)(nil)
+
+var (
+ ModeDocker Mode = Mode{s: "docker"}
+ ModeSystemd Mode = Mode{s: "systemd"}
+ ModeKubernetes Mode = Mode{s: "kubernetes"}
+ ModeEC2 Mode = Mode{s: "ec2"}
+)
+
+type Mode struct {
+ s string
+}
+
+func (mode Mode) String() string {
+ return mode.s
+}
+
+func Modes() []Mode {
+ return []Mode{ModeDocker, ModeSystemd, ModeKubernetes, ModeEC2}
+}
+
+func (mode Mode) MarshalJSON() ([]byte, error) {
+ return json.Marshal(mode.String())
+}
+
+func (mode *Mode) UnmarshalJSON(text []byte) error {
+ var str string
+ if err := json.Unmarshal(text, &str); err != nil {
+ return err
+ }
+
+ return mode.UnmarshalText([]byte(str))
+}
+
+func (mode *Mode) UnmarshalText(text []byte) error {
+ for _, available := range Modes() {
+ if available.String() == string(text) {
+ *mode = available
+ return nil
+ }
+ }
+
+ if len(text) == 0 {
+ *mode = Mode{s: ""}
+ return nil
+ }
+
+ return errors.New("invalid deployment mode: " + string(text))
+}
+
+func (mode Mode) MarshalText() ([]byte, error) {
+ return []byte(mode.String()), nil
+}
+
+func (mode *Mode) UnmarshalYAML(node *yaml.Node) error {
+ return mode.UnmarshalText([]byte(node.Value))
+}
+
+func (mode Mode) MarshalYAML() (any, error) {
+ return mode.String(), nil
+}
+
+func (mode Mode) Enum() []any {
+ modes := []any{}
+ for _, mode := range Modes() {
+ modes = append(modes, mode.String())
+ }
+
+ return modes
+}
diff --git a/api/v1alpha1/deployment_platform.go b/api/v1alpha1/deployment_platform.go
new file mode 100644
index 0000000..7660bf3
--- /dev/null
+++ b/api/v1alpha1/deployment_platform.go
@@ -0,0 +1,97 @@
+package v1alpha1
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+
+ "github.com/swaggest/jsonschema-go"
+ "go.yaml.in/yaml/v3"
+)
+
+var _ yaml.Marshaler = (*Platform)(nil)
+var _ yaml.Unmarshaler = (*Platform)(nil)
+var _ json.Marshaler = (*Platform)(nil)
+var _ json.Unmarshaler = (*Platform)(nil)
+var _ fmt.Stringer = (*Platform)(nil)
+var _ jsonschema.Enum = (*Platform)(nil)
+
+var (
+ PlatformRender Platform = Platform{s: "render"}
+ PlatformCoolify Platform = Platform{s: "coolify"}
+ PlatformRailway Platform = Platform{s: "railway"}
+ PlatformECS Platform = Platform{s: "ecs"}
+ PlatformAWS Platform = Platform{s: "aws"}
+ PlatformGCP Platform = Platform{s: "gcp"}
+ PlatformAzure Platform = Platform{s: "azure"}
+)
+
+type Platform struct {
+ s string
+}
+
+func (platform Platform) String() string {
+ return platform.s
+}
+
+func Platforms() []Platform {
+ return []Platform{
+ PlatformRender,
+ PlatformCoolify,
+ PlatformRailway,
+ PlatformECS,
+ PlatformAWS,
+ PlatformGCP,
+ PlatformAzure,
+ }
+}
+
+func (platform Platform) MarshalJSON() ([]byte, error) {
+ return json.Marshal(platform.String())
+}
+
+func (platform *Platform) UnmarshalJSON(text []byte) error {
+ var str string
+ if err := json.Unmarshal(text, &str); err != nil {
+ return err
+ }
+
+ return platform.UnmarshalText([]byte(str))
+}
+
+func (platform *Platform) UnmarshalText(text []byte) error {
+ for _, available := range Platforms() {
+ if available.String() == string(text) {
+ *platform = available
+ return nil
+ }
+ }
+
+ if len(text) == 0 {
+ *platform = Platform{s: ""}
+ return nil
+ }
+
+ return errors.New("invalid deployment platform: " + string(text))
+}
+
+func (platform Platform) MarshalText() ([]byte, error) {
+ return []byte(platform.String()), nil
+}
+
+func (platform *Platform) UnmarshalYAML(node *yaml.Node) error {
+ return platform.UnmarshalText([]byte(node.Value))
+}
+
+func (platform Platform) MarshalYAML() (any, error) {
+ return platform.String(), nil
+}
+
+func (platform Platform) Enum() []any {
+ platforms := []any{}
+ for _, platform := range Platforms() {
+ platforms = append(platforms, platform.String())
+ }
+
+ return platforms
+}
diff --git a/api/v1alpha1/installation/casting.go b/api/v1alpha1/installation/casting.go
new file mode 100644
index 0000000..9794b5b
--- /dev/null
+++ b/api/v1alpha1/installation/casting.go
@@ -0,0 +1,99 @@
+package installation
+
+import (
+ "github.com/signoz/foundry/api/v1alpha1"
+ "github.com/signoz/foundry/internal/domain"
+)
+
+// Casting is the Installation kind.
+type Casting struct {
+ v1alpha1.CastingMeta `json:",inline" yaml:",inline"`
+ Spec Spec `json:"spec" yaml:"spec" required:"true" description:"Installation specification"`
+ _ struct{} `additionalProperties:"false"`
+}
+
+// Spec is the Installation-specific configuration.
+type Spec struct {
+ Deployment v1alpha1.TypeDeployment `json:"deployment" yaml:"deployment" required:"true" description:"Deployment configuration for the platform"`
+ Patches []v1alpha1.PatchEntry `json:"patches,omitempty" yaml:"patches,omitempty" description:"Patch operations to apply to generated materials"`
+ Infrastructure Infrastructure `json:"infrastructure,omitzero" yaml:"infrastructure,omitzero" description:"Infrastructure configuration for generating infrastructure manifests (e.g., Terraform)."`
+ Signoz SigNoz `json:"signoz,omitzero" yaml:"signoz,omitempty" description:"The configuration for the SigNoz molding"`
+ TelemetryStore TelemetryStore `json:"telemetrystore,omitzero" yaml:"telemetrystore,omitempty" description:"The configuration for the telemetry store molding"`
+ TelemetryKeeper TelemetryKeeper `json:"telemetrykeeper,omitzero" yaml:"telemetrykeeper,omitempty" description:"The configuration for the telemetry keeper molding"`
+ MetaStore MetaStore `json:"metastore,omitzero" yaml:"metastore,omitempty" description:"The configuration for the meta store molding"`
+ Ingester Ingester `json:"ingester,omitzero" yaml:"ingester,omitempty" description:"The configuration for the ingester molding"`
+ _ struct{} `additionalProperties:"false"`
+}
+
+var _ v1alpha1.Machinery = (*Casting)(nil)
+
+// Default returns an Installation with every molding initialised from its
+// default.
+func Default() *Casting {
+ return &Casting{
+ CastingMeta: v1alpha1.CastingMeta{
+ TypeVersion: v1alpha1.TypeVersion{APIVersion: "v1alpha1"},
+ Kind: v1alpha1.KindInstallation,
+ Metadata: v1alpha1.TypeMetadata{Name: "signoz"},
+ },
+ Spec: Spec{
+ Infrastructure: DefaultInfrastructure(),
+ Signoz: DefaultSigNoz(),
+ TelemetryStore: DefaultTelemetryStore(),
+ TelemetryKeeper: DefaultTelemetryKeeper(),
+ MetaStore: DefaultMetaStore(),
+ Ingester: DefaultIngester(),
+ },
+ }
+}
+
+// Example returns a minimal Installation; the forge pipeline fills in defaults.
+func Example() *Casting {
+ return &Casting{
+ CastingMeta: v1alpha1.CastingMeta{
+ TypeVersion: v1alpha1.TypeVersion{APIVersion: "v1alpha1"},
+ Kind: v1alpha1.KindInstallation,
+ Metadata: v1alpha1.TypeMetadata{Name: "signoz"},
+ },
+ }
+}
+
+// Kind reports the casting kind. Shadows the embedded CastingMeta.Kind field;
+// the field stays reachable as c.CastingMeta.Kind.
+func (c *Casting) Kind() v1alpha1.Kind {
+ return v1alpha1.KindInstallation
+}
+
+// MergeStatusIntoSpec folds each molding's Status into its own Spec.
+func (c *Casting) MergeStatusIntoSpec() error {
+ if err := c.Spec.Signoz.Spec.MergeStatus(c.Spec.Signoz.Status.MoldingStatus); err != nil {
+ return err
+ }
+ if err := c.Spec.TelemetryStore.Spec.MergeStatus(c.Spec.TelemetryStore.Status.MoldingStatus); err != nil {
+ return err
+ }
+ if err := c.Spec.TelemetryKeeper.Spec.MergeStatus(c.Spec.TelemetryKeeper.Status.MoldingStatus); err != nil {
+ return err
+ }
+ if err := c.Spec.MetaStore.Spec.MergeStatus(c.Spec.MetaStore.Status.MoldingStatus); err != nil {
+ return err
+ }
+ if err := c.Spec.Ingester.Spec.MergeStatus(c.Spec.Ingester.Status.MoldingStatus); err != nil {
+ return err
+ }
+ return nil
+}
+
+// TrackableProperties returns analytics tags for the casting.
+func (c *Casting) TrackableProperties() domain.Properties {
+ return domain.NewProperties().
+ Set("kind", v1alpha1.KindInstallation.String()).
+ Set("platform", c.Spec.Deployment.Platform.String()).
+ Set("mode", c.Spec.Deployment.Mode.String()).
+ Set("flavor", c.Spec.Deployment.Flavor.String()).
+ Set("patches_count", len(c.Spec.Patches)).
+ Set("infrastructure_enabled", c.Spec.Infrastructure.Enabled).
+ Set("metastore_kind", c.Spec.MetaStore.Kind.String()).
+ Set("telemetrystore_kind", c.Spec.TelemetryStore.Kind.String()).
+ Set("telemetrykeeper_kind", c.Spec.TelemetryKeeper.Kind.String())
+}
diff --git a/api/v1alpha1/installation/casting.schema.json b/api/v1alpha1/installation/casting.schema.json
new file mode 100644
index 0000000..31c7451
--- /dev/null
+++ b/api/v1alpha1/installation/casting.schema.json
@@ -0,0 +1,710 @@
+{
+ "required": [
+ "apiVersion",
+ "kind",
+ "metadata",
+ "spec"
+ ],
+ "additionalProperties": false,
+ "definitions": {
+ "InstallationInfrastructure": {
+ "additionalProperties": false,
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "status": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationIngester": {
+ "additionalProperties": false,
+ "properties": {
+ "spec": {
+ "$ref": "#/definitions/V1Alpha1MoldingSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/InstallationIngesterStatus"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationIngesterStatus": {
+ "additionalProperties": false,
+ "properties": {
+ "addresses": {
+ "$ref": "#/definitions/InstallationIngesterStatusAddresses"
+ },
+ "config": {
+ "$ref": "#/definitions/V1Alpha1TypeConfig",
+ "description": "Configuration for the molding"
+ },
+ "env": {
+ "description": "Environment variables for the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "extras": {
+ "description": "Extra information about the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationIngesterStatusAddresses": {
+ "additionalProperties": false,
+ "properties": {
+ "otlp": {
+ "items": {
+ "type": "string"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "InstallationMetaStore": {
+ "additionalProperties": false,
+ "properties": {
+ "kind": {
+ "$ref": "#/definitions/InstallationMetaStoreKind",
+ "description": "Kind of the meta store to use",
+ "examples": [
+ "postgres",
+ "sqlite"
+ ]
+ },
+ "spec": {
+ "$ref": "#/definitions/V1Alpha1MoldingSpec",
+ "description": "Specification for the meta store"
+ },
+ "status": {
+ "$ref": "#/definitions/InstallationMetaStoreStatus",
+ "description": "Status of the meta store"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationMetaStoreKind": {
+ "enum": [
+ "postgres",
+ "sqlite"
+ ],
+ "type": "string"
+ },
+ "InstallationMetaStoreStatus": {
+ "additionalProperties": false,
+ "properties": {
+ "addresses": {
+ "$ref": "#/definitions/InstallationMetaStoreStatusAddresses",
+ "description": "Addresses of the meta store"
+ },
+ "config": {
+ "$ref": "#/definitions/V1Alpha1TypeConfig",
+ "description": "Configuration for the molding"
+ },
+ "env": {
+ "description": "Environment variables for the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "extras": {
+ "description": "Extra information about the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationMetaStoreStatusAddresses": {
+ "additionalProperties": false,
+ "properties": {
+ "dsn": {
+ "description": "DSN addresses",
+ "items": {
+ "type": "string"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "InstallationSigNoz": {
+ "additionalProperties": false,
+ "properties": {
+ "spec": {
+ "$ref": "#/definitions/V1Alpha1MoldingSpec"
+ },
+ "status": {
+ "$ref": "#/definitions/InstallationSigNozStatus"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationSigNozStatus": {
+ "additionalProperties": false,
+ "properties": {
+ "addresses": {
+ "$ref": "#/definitions/InstallationSigNozStatusAddresses"
+ },
+ "config": {
+ "$ref": "#/definitions/V1Alpha1TypeConfig",
+ "description": "Configuration for the molding"
+ },
+ "env": {
+ "description": "Environment variables for the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "extras": {
+ "description": "Extra information about the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationSigNozStatusAddresses": {
+ "additionalProperties": false,
+ "properties": {
+ "apiserver": {
+ "items": {
+ "type": "string"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ },
+ "opamp": {
+ "items": {
+ "type": "string"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "InstallationSpec": {
+ "required": [
+ "deployment"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "deployment": {
+ "$ref": "#/definitions/V1Alpha1TypeDeployment",
+ "description": "Deployment configuration for the platform"
+ },
+ "infrastructure": {
+ "$ref": "#/definitions/InstallationInfrastructure",
+ "description": "Infrastructure configuration for generating infrastructure manifests (e.g., Terraform)."
+ },
+ "ingester": {
+ "$ref": "#/definitions/InstallationIngester",
+ "description": "The configuration for the ingester molding"
+ },
+ "metastore": {
+ "$ref": "#/definitions/InstallationMetaStore",
+ "description": "The configuration for the meta store molding"
+ },
+ "patches": {
+ "description": "Patch operations to apply to generated materials",
+ "items": {
+ "$ref": "#/definitions/V1Alpha1PatchEntry"
+ },
+ "type": "array"
+ },
+ "signoz": {
+ "$ref": "#/definitions/InstallationSigNoz",
+ "description": "The configuration for the SigNoz molding"
+ },
+ "telemetrykeeper": {
+ "$ref": "#/definitions/InstallationTelemetryKeeper",
+ "description": "The configuration for the telemetry keeper molding"
+ },
+ "telemetrystore": {
+ "$ref": "#/definitions/InstallationTelemetryStore",
+ "description": "The configuration for the telemetry store molding"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationTelemetryKeeper": {
+ "additionalProperties": false,
+ "properties": {
+ "kind": {
+ "$ref": "#/definitions/InstallationTelemetryKeeperKind",
+ "description": "Kind of the telemetry keeper to use",
+ "examples": [
+ "clickhousekeeper"
+ ]
+ },
+ "spec": {
+ "$ref": "#/definitions/V1Alpha1MoldingSpec",
+ "description": "Specification for the telemetry keeper"
+ },
+ "status": {
+ "$ref": "#/definitions/InstallationTelemetryKeeperStatus",
+ "description": "Status of the telemetry keeper"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationTelemetryKeeperKind": {
+ "enum": [
+ "clickhousekeeper"
+ ],
+ "type": "string"
+ },
+ "InstallationTelemetryKeeperStatus": {
+ "additionalProperties": false,
+ "properties": {
+ "addresses": {
+ "$ref": "#/definitions/InstallationTelemetryKeeperStatusAddresses",
+ "description": "Addresses of the telemetry keeper"
+ },
+ "config": {
+ "$ref": "#/definitions/V1Alpha1TypeConfig",
+ "description": "Configuration for the molding"
+ },
+ "env": {
+ "description": "Environment variables for the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "extras": {
+ "description": "Extra information about the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationTelemetryKeeperStatusAddresses": {
+ "additionalProperties": false,
+ "properties": {
+ "client": {
+ "description": "Client addresses",
+ "items": {
+ "type": "string"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ },
+ "raft": {
+ "description": "Raft addresses",
+ "items": {
+ "type": "string"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "InstallationTelemetryStore": {
+ "additionalProperties": false,
+ "properties": {
+ "kind": {
+ "$ref": "#/definitions/InstallationTelemetryStoreKind",
+ "description": "Kind of the telemetry store to use",
+ "examples": [
+ "clickhouse"
+ ]
+ },
+ "spec": {
+ "$ref": "#/definitions/V1Alpha1MoldingSpec",
+ "description": "Specification for the telemetry store"
+ },
+ "status": {
+ "$ref": "#/definitions/InstallationTelemetryStoreStatus",
+ "description": "Status of the telemetry store"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationTelemetryStoreKind": {
+ "enum": [
+ "clickhouse"
+ ],
+ "type": "string"
+ },
+ "InstallationTelemetryStoreStatus": {
+ "additionalProperties": false,
+ "properties": {
+ "addresses": {
+ "$ref": "#/definitions/InstallationTelemetryStoreStatusAddresses",
+ "description": "Addresses of the telemetry store"
+ },
+ "config": {
+ "$ref": "#/definitions/V1Alpha1TypeConfig",
+ "description": "Configuration for the molding"
+ },
+ "env": {
+ "description": "Environment variables for the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "extras": {
+ "description": "Extra information about the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "InstallationTelemetryStoreStatusAddresses": {
+ "additionalProperties": false,
+ "properties": {
+ "tcp": {
+ "description": "TCP addresses",
+ "items": {
+ "type": "string"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1Flavor": {
+ "enum": [
+ "compose",
+ "swarm",
+ "binary",
+ "kustomize",
+ "helm",
+ "blueprint",
+ "stack",
+ "template",
+ "terraform"
+ ],
+ "type": "string"
+ },
+ "V1Alpha1Kind": {
+ "enum": [
+ "Installation"
+ ],
+ "type": "string"
+ },
+ "V1Alpha1Mode": {
+ "enum": [
+ "docker",
+ "systemd",
+ "kubernetes",
+ "ec2"
+ ],
+ "type": "string"
+ },
+ "V1Alpha1MoldingSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "cluster": {
+ "$ref": "#/definitions/V1Alpha1TypeCluster",
+ "description": "Cluster configuration for the molding"
+ },
+ "config": {
+ "$ref": "#/definitions/V1Alpha1TypeConfig",
+ "description": "Configuration for the molding"
+ },
+ "enabled": {
+ "description": "Whether the molding is enabled",
+ "default": true,
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "env": {
+ "description": "Environment variables for the molding",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "image": {
+ "description": "Container image of the molding",
+ "examples": [
+ "signoz/signoz:latest"
+ ],
+ "pattern": "^[a-z0-9]+([._-][a-z0-9]+)*(/[a-z0-9]+([._-][a-z0-9]+)*)*(:[a-zA-Z0-9._-]+)?(@sha256:[a-f0-9]{64})?$",
+ "type": "string"
+ },
+ "version": {
+ "description": "The version of the molding to use",
+ "examples": [
+ "latest"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1PatchEntry": {
+ "required": [
+ "target",
+ "operations"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "operations": {
+ "description": "JSON Patch (RFC 6902) operations to apply. Used by the jsonpatch driver.",
+ "items": {
+ "$ref": "#/definitions/V1Alpha1PatchOperation"
+ },
+ "minItems": 1,
+ "type": [
+ "array",
+ "null"
+ ]
+ },
+ "target": {
+ "description": "Target output file to patch",
+ "examples": [
+ "compose.yaml",
+ "signoz/deployment.yaml",
+ "values.yaml",
+ "telemetrystore/telemtrystore-clickhouse-0-*.yaml"
+ ],
+ "minLength": 1,
+ "type": "string"
+ },
+ "type": {
+ "description": "Patch driver type. Defaults to jsonpatch.",
+ "default": "jsonpatch",
+ "examples": [
+ "jsonpatch"
+ ],
+ "enum": [
+ "",
+ "jsonpatch"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1PatchOperation": {
+ "required": [
+ "op",
+ "path"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "description": "Source JSON Pointer for move and copy operations",
+ "examples": [
+ "/services/clickhouse/old_field"
+ ],
+ "pattern": "^/",
+ "type": "string"
+ },
+ "op": {
+ "description": "JSON Patch (RFC 6902) operation type",
+ "enum": [
+ "add",
+ "remove",
+ "replace",
+ "move",
+ "copy",
+ "test"
+ ],
+ "type": "string"
+ },
+ "path": {
+ "description": "JSON Pointer (RFC 6901) to the target location",
+ "examples": [
+ "/services/clickhouse/mem_limit"
+ ],
+ "pattern": "^/",
+ "type": "string"
+ },
+ "value": {
+ "description": "Value for add, replace, or test operations"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1Platform": {
+ "enum": [
+ "render",
+ "coolify",
+ "railway",
+ "ecs",
+ "aws",
+ "gcp",
+ "azure"
+ ],
+ "type": "string"
+ },
+ "V1Alpha1Status": {
+ "additionalProperties": false,
+ "properties": {
+ "checksum": {
+ "description": "Checksum of the casting file",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1TypeCluster": {
+ "additionalProperties": false,
+ "properties": {
+ "replicas": {
+ "description": "Number of replicas for the molding.",
+ "examples": [
+ 1
+ ],
+ "minimum": 0,
+ "type": [
+ "null",
+ "integer"
+ ]
+ },
+ "shards": {
+ "description": "Number of shards for the molding",
+ "examples": [
+ 1
+ ],
+ "minimum": 1,
+ "type": [
+ "null",
+ "integer"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1TypeConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "data": {
+ "description": "Configuration data as key-value pairs.",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1TypeDeployment": {
+ "additionalProperties": false,
+ "properties": {
+ "flavor": {
+ "$ref": "#/definitions/V1Alpha1Flavor",
+ "description": "Flavor of mode for the deployment"
+ },
+ "mode": {
+ "$ref": "#/definitions/V1Alpha1Mode",
+ "description": "Type of installation method"
+ },
+ "platform": {
+ "$ref": "#/definitions/V1Alpha1Platform",
+ "description": "Provider where an installation runs on"
+ }
+ },
+ "type": "object"
+ },
+ "V1Alpha1TypeMetadata": {
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "annotations": {
+ "description": "Annotations is an unstructured key-value map for arbitrary metadata. Can be used to specify deployment-specific settings.",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": [
+ "object",
+ "null"
+ ]
+ },
+ "name": {
+ "description": "The name of this installation. This name is used to identify the installation.",
+ "default": "signoz",
+ "examples": [
+ "signoz"
+ ],
+ "maxLength": 63,
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "properties": {
+ "apiVersion": {
+ "description": "API Version of the configuration schema.",
+ "default": "v1alpha1",
+ "examples": [
+ "v1alpha1"
+ ],
+ "enum": [
+ "v1alpha1"
+ ],
+ "type": "string"
+ },
+ "kind": {
+ "$ref": "#/definitions/V1Alpha1Kind",
+ "description": "Kind of the casting resource."
+ },
+ "metadata": {
+ "$ref": "#/definitions/V1Alpha1TypeMetadata",
+ "description": "Metadata of the casting configuration"
+ },
+ "spec": {
+ "$ref": "#/definitions/InstallationSpec",
+ "description": "Installation specification"
+ },
+ "status": {
+ "$ref": "#/definitions/V1Alpha1Status",
+ "description": "Status of the casting"
+ }
+ },
+ "type": "object"
+}
\ No newline at end of file
diff --git a/api/v1alpha1/installation/infrastructure.go b/api/v1alpha1/installation/infrastructure.go
new file mode 100644
index 0000000..7baa07a
--- /dev/null
+++ b/api/v1alpha1/installation/infrastructure.go
@@ -0,0 +1,36 @@
+package installation
+
+import "encoding/json"
+
+// Infrastructure holds the configuration for infrastructure manifest generation (e.g., Terraform).
+// The cloud provider is resolved automatically from spec.deployment.platform — no provider field
+// is needed here.
+type Infrastructure struct {
+ // Whether infrastructure manifest generation is enabled
+ Enabled bool `json:"enabled" yaml:"enabled"`
+
+ // Status holds the generated IaC file contents keyed by filename (e.g. "main.tf.json").
+ // This is populated by foundry after generation and written to the lock file.
+ Status map[string]string `json:"status,omitempty" yaml:"status,omitempty"`
+
+ _ struct{} `additionalProperties:"false"`
+}
+
+// MarshalJSON implements json.Marshaler. It manually omits Status when zero
+// so that the strategic merge patch doesn't overwrite defaults with empty values.
+func (i Infrastructure) MarshalJSON() ([]byte, error) {
+ m := map[string]any{
+ "enabled": i.Enabled,
+ }
+ if len(i.Status) > 0 {
+ m["status"] = i.Status
+ }
+ return json.Marshal(m)
+}
+
+// DefaultInfrastructure returns the default Infrastructure configuration.
+func DefaultInfrastructure() Infrastructure {
+ return Infrastructure{
+ Enabled: false,
+ }
+}
diff --git a/api/v1alpha1/ingester.go b/api/v1alpha1/installation/ingester.go
similarity index 61%
rename from api/v1alpha1/ingester.go
rename to api/v1alpha1/installation/ingester.go
index d0e1f2c..3d217c2 100644
--- a/api/v1alpha1/ingester.go
+++ b/api/v1alpha1/installation/ingester.go
@@ -1,36 +1,42 @@
-package v1alpha1
+package installation
import "github.com/hanzoai/o11y-foundry/internal/types"
type Ingester struct {
// Specification for the ingester.
- Spec MoldingSpec `json:"spec" yaml:"spec" jsonschema:"description=Specification for the ingester"`
+ Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" jsonschema:"description=Specification for the ingester"`
// Status of the ingester.
Status IngesterStatus `json:"status" yaml:"status,omitempty" jsonschema:"description=Status of the ingester"`
+
+ _ struct{} `additionalProperties:"false"`
}
type IngesterStatus struct {
- MoldingStatus `json:",inline" yaml:",inline"`
+ v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
Addresses IngesterStatusAddresses `json:"addresses" yaml:"addresses,omitempty" jsonschema:"description=Addresses of the ingester"`
+
+ _ struct{} `additionalProperties:"false"`
}
type IngesterStatusAddresses struct {
OTLP []string `json:"otlp" yaml:"otlp" jsonschema:"description=OTLP addresses"`
+
+ _ struct{} `additionalProperties:"false"`
}
func DefaultIngester() Ingester {
return Ingester{
- Spec: MoldingSpec{
- Enabled: true,
- Cluster: TypeCluster{
- Replicas: types.NewIntPtr(1),
+ Spec: v1alpha1.MoldingSpec{
+ Enabled: v1alpha1.BoolPtr(true),
+ Cluster: v1alpha1.TypeCluster{
+ Replicas: v1alpha1.IntPtr(1),
},
Version: "latest",
Image: "ghcr.io/hanzoai/otel-collector:latest",
Env: map[string]string{},
- Config: TypeConfig{
+ Config: v1alpha1.TypeConfig{
Data: map[string]string{},
},
},
diff --git a/api/v1alpha1/metastore.go b/api/v1alpha1/installation/metastore.go
similarity index 66%
rename from api/v1alpha1/metastore.go
rename to api/v1alpha1/installation/metastore.go
index 235e693..d030947 100644
--- a/api/v1alpha1/metastore.go
+++ b/api/v1alpha1/installation/metastore.go
@@ -1,4 +1,4 @@
-package v1alpha1
+package installation
import (
"github.com/hanzoai/o11y-foundry/internal/types"
@@ -9,30 +9,35 @@ type MetaStore struct {
Kind MetaStoreKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the meta store to use" examples:"[\"postgres\",\"sqlite\"]"`
// Specification for the meta store.
- Spec MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the meta store"`
+ Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the meta store"`
// Status of the meta store.
Status MetaStoreStatus `json:"status" yaml:"status,omitempty" description:"Status of the meta store"`
+
+ _ struct{} `additionalProperties:"false"`
}
type MetaStoreStatus struct {
- MoldingStatus `json:",inline" yaml:",inline"`
+ v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
Addresses MetaStoreStatusAddresses `json:"addresses" yaml:"addresses,omitempty" description:"Addresses of the meta store"`
+
+ _ struct{} `additionalProperties:"false"`
}
type MetaStoreStatusAddresses struct {
// DSN addresses.
DSN []string `json:"dsn" yaml:"dsn" description:"DSN addresses"`
+ _ struct{} `additionalProperties:"false"`
}
func DefaultMetaStore() MetaStore {
return MetaStore{
Kind: MetaStoreKindPostgres,
- Spec: MoldingSpec{
- Enabled: true,
- Cluster: TypeCluster{
- Replicas: types.NewIntPtr(1),
+ Spec: v1alpha1.MoldingSpec{
+ Enabled: v1alpha1.BoolPtr(true),
+ Cluster: v1alpha1.TypeCluster{
+ Replicas: v1alpha1.IntPtr(1),
},
Version: "16",
Image: "postgres:16",
diff --git a/api/v1alpha1/metastore_kind.go b/api/v1alpha1/installation/metastore_kind.go
similarity index 85%
rename from api/v1alpha1/metastore_kind.go
rename to api/v1alpha1/installation/metastore_kind.go
index de822b1..4689a6e 100644
--- a/api/v1alpha1/metastore_kind.go
+++ b/api/v1alpha1/installation/metastore_kind.go
@@ -1,10 +1,11 @@
-package v1alpha1
+package installation
import (
"encoding/json"
"errors"
"fmt"
+ "github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
@@ -13,6 +14,7 @@ var _ yaml.Unmarshaler = (*MetaStoreKind)(nil)
var _ json.Marshaler = (*MetaStoreKind)(nil)
var _ json.Unmarshaler = (*MetaStoreKind)(nil)
var _ fmt.Stringer = (*MetaStoreKind)(nil)
+var _ jsonschema.Enum = (*MetaStoreKind)(nil)
var (
MetaStoreKindPostgres MetaStoreKind = MetaStoreKind{s: "postgres"}
@@ -69,3 +71,12 @@ func (kind *MetaStoreKind) UnmarshalYAML(node *yaml.Node) error {
func (kind MetaStoreKind) MarshalYAML() (any, error) {
return kind.String(), nil
}
+
+func (kind MetaStoreKind) Enum() []any {
+ kinds := []any{}
+ for _, kind := range MetaStoreKinds() {
+ kinds = append(kinds, kind.String())
+ }
+
+ return kinds
+}
diff --git a/api/v1alpha1/installation/schema.go b/api/v1alpha1/installation/schema.go
new file mode 100644
index 0000000..52af859
--- /dev/null
+++ b/api/v1alpha1/installation/schema.go
@@ -0,0 +1,18 @@
+package installation
+
+import (
+ _ "embed"
+
+ "github.com/google/jsonschema-go/jsonschema"
+ "github.com/signoz/foundry/api/v1alpha1"
+)
+
+//go:embed casting.schema.json
+var schemaJSON []byte
+
+var schema = v1alpha1.MustResolveSchema(schemaJSON)
+
+// Schema returns the resolved JSON schema for an Installation casting.
+func Schema() *jsonschema.Resolved {
+ return schema
+}
diff --git a/api/v1alpha1/installation/schema_test.go b/api/v1alpha1/installation/schema_test.go
new file mode 100644
index 0000000..b53fac8
--- /dev/null
+++ b/api/v1alpha1/installation/schema_test.go
@@ -0,0 +1,26 @@
+package installation
+
+import (
+ "encoding/json"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestSchema(t *testing.T) {
+ t.Parallel()
+ assert.NotNil(t, Schema())
+}
+
+func TestSchemaValidatesDefault(t *testing.T) {
+ t.Parallel()
+
+ contents, err := json.Marshal(Default())
+ require.NoError(t, err)
+
+ var payload map[string]any
+ require.NoError(t, json.Unmarshal(contents, &payload))
+
+ assert.NoError(t, Schema().Validate(payload))
+}
diff --git a/api/v1alpha1/installation/signoz.go b/api/v1alpha1/installation/signoz.go
new file mode 100644
index 0000000..15ec7a8
--- /dev/null
+++ b/api/v1alpha1/installation/signoz.go
@@ -0,0 +1,44 @@
+package installation
+
+import "github.com/signoz/foundry/api/v1alpha1"
+
+type SigNoz struct {
+ // Specification for signoz.
+ Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" jsonschema:"description=Specification for SigNoz"`
+
+ // Status of signoz.
+ Status SigNozStatus `json:"status" yaml:"status,omitempty" jsonschema:"description=Status of SigNoz"`
+
+ _ struct{} `additionalProperties:"false"`
+}
+
+type SigNozStatus struct {
+ v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
+
+ Addresses SigNozStatusAddresses `json:"addresses" yaml:"addresses,omitempty" jsonschema:"description=Addresses of SigNoz"`
+
+ _ struct{} `additionalProperties:"false"`
+}
+
+type SigNozStatusAddresses struct {
+ // API server addresses.
+ APIServer []string `json:"apiserver" yaml:"apiserver" jsonschema:"description=API server addresses"`
+
+ // Opamp server addresses.
+ Opamp []string `json:"opamp" yaml:"opamp" jsonschema:"description=Opamp server addresses"`
+
+ _ struct{} `additionalProperties:"false"`
+}
+
+func DefaultSigNoz() SigNoz {
+ return SigNoz{
+ Spec: v1alpha1.MoldingSpec{
+ Enabled: v1alpha1.BoolPtr(true),
+ Cluster: v1alpha1.TypeCluster{
+ Replicas: v1alpha1.IntPtr(1),
+ },
+ Version: "latest",
+ Image: "signoz/signoz:latest",
+ },
+ }
+}
diff --git a/api/v1alpha1/telemetrykeeper.go b/api/v1alpha1/installation/telemetrykeeper.go
similarity index 72%
rename from api/v1alpha1/telemetrykeeper.go
rename to api/v1alpha1/installation/telemetrykeeper.go
index edb614c..9a6e15f 100644
--- a/api/v1alpha1/telemetrykeeper.go
+++ b/api/v1alpha1/installation/telemetrykeeper.go
@@ -1,4 +1,4 @@
-package v1alpha1
+package installation
import (
"github.com/hanzoai/o11y-foundry/internal/types"
@@ -9,17 +9,21 @@ type TelemetryKeeper struct {
Kind TelemetryKeeperKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the telemetry keeper to use" examples:"[\"clickhousekeeper\"]"`
// Specification for the telemetry keeper.
- Spec MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the telemetry keeper"`
+ Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the telemetry keeper"`
// Status of the telemetry keeper.
Status TelemetryKeeperStatus `json:"status" yaml:"status,omitempty" description:"Status of the telemetry keeper"`
+
+ _ struct{} `additionalProperties:"false"`
}
type TelemetryKeeperStatus struct {
- MoldingStatus `json:",inline" yaml:",inline"`
+ v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
// Addresses of the telemetry keeper.
Addresses TelemetryKeeperStatusAddresses `json:"addresses" yaml:"addresses,omitempty" description:"Addresses of the telemetry keeper"`
+
+ _ struct{} `additionalProperties:"false"`
}
type TelemetryKeeperStatusAddresses struct {
@@ -28,15 +32,17 @@ type TelemetryKeeperStatusAddresses struct {
// Client addresses.
Client []string `json:"client" yaml:"client,omitempty" description:"Client addresses"`
+
+ _ struct{} `additionalProperties:"false"`
}
func DefaultTelemetryKeeper() TelemetryKeeper {
return TelemetryKeeper{
Kind: TelemetryKeeperKindClickhouseKeeper,
- Spec: MoldingSpec{
- Enabled: true,
- Cluster: TypeCluster{
- Replicas: types.NewIntPtr(1),
+ Spec: v1alpha1.MoldingSpec{
+ Enabled: v1alpha1.BoolPtr(true),
+ Cluster: v1alpha1.TypeCluster{
+ Replicas: v1alpha1.IntPtr(1),
},
Version: "25.5.6",
Image: "clickhouse/clickhouse-keeper:25.5.6",
diff --git a/api/v1alpha1/telemetrykeeper_kind.go b/api/v1alpha1/installation/telemetrykeeper_kind.go
similarity index 85%
rename from api/v1alpha1/telemetrykeeper_kind.go
rename to api/v1alpha1/installation/telemetrykeeper_kind.go
index 092e146..84ec5db 100644
--- a/api/v1alpha1/telemetrykeeper_kind.go
+++ b/api/v1alpha1/installation/telemetrykeeper_kind.go
@@ -1,10 +1,11 @@
-package v1alpha1
+package installation
import (
"encoding/json"
"errors"
"fmt"
+ "github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
@@ -13,6 +14,7 @@ var _ yaml.Unmarshaler = (*TelemetryKeeperKind)(nil)
var _ json.Marshaler = (*TelemetryKeeperKind)(nil)
var _ json.Unmarshaler = (*TelemetryKeeperKind)(nil)
var _ fmt.Stringer = (*TelemetryKeeperKind)(nil)
+var _ jsonschema.Enum = (*TelemetryKeeperKind)(nil)
var (
TelemetryKeeperKindClickhouseKeeper TelemetryKeeperKind = TelemetryKeeperKind{s: "clickhousekeeper"}
@@ -68,3 +70,12 @@ func (kind *TelemetryKeeperKind) UnmarshalYAML(node *yaml.Node) error {
func (kind TelemetryKeeperKind) MarshalYAML() (any, error) {
return kind.String(), nil
}
+
+func (kind TelemetryKeeperKind) Enum() []any {
+ kinds := []any{}
+ for _, kind := range TelemetryKeeperKinds() {
+ kinds = append(kinds, kind.String())
+ }
+
+ return kinds
+}
diff --git a/api/v1alpha1/telemetrystore.go b/api/v1alpha1/installation/telemetrystore.go
similarity index 66%
rename from api/v1alpha1/telemetrystore.go
rename to api/v1alpha1/installation/telemetrystore.go
index 99f800d..2ba1275 100644
--- a/api/v1alpha1/telemetrystore.go
+++ b/api/v1alpha1/installation/telemetrystore.go
@@ -1,4 +1,4 @@
-package v1alpha1
+package installation
import (
"github.com/hanzoai/o11y-foundry/internal/types"
@@ -9,31 +9,37 @@ type TelemetryStore struct {
Kind TelemetryStoreKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the telemetry store to use" examples:"[\"clickhouse\"]"`
// Specification for the telemetry store.
- Spec MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the telemetry store"`
+ Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the telemetry store"`
// Status of the telemetry store.
Status TelemetryStoreStatus `json:"status" yaml:"status,omitempty" description:"Status of the telemetry store"`
+
+ _ struct{} `additionalProperties:"false"`
}
type TelemetryStoreStatus struct {
- MoldingStatus `json:",inline" yaml:",inline"`
+ v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
Addresses TelemetryStoreStatusAddresses `json:"addresses" yaml:"addresses,omitempty" description:"Addresses of the telemetry store"`
+
+ _ struct{} `additionalProperties:"false"`
}
type TelemetryStoreStatusAddresses struct {
// TCP addresses.
TCP []string `json:"tcp" yaml:"tcp" description:"TCP addresses"`
+
+ _ struct{} `additionalProperties:"false"`
}
func DefaultTelemetryStore() TelemetryStore {
return TelemetryStore{
Kind: TelemetryStoreKindClickhouse,
- Spec: MoldingSpec{
- Enabled: true,
- Cluster: TypeCluster{
- Replicas: types.NewIntPtr(0),
- Shards: types.NewIntPtr(1),
+ Spec: v1alpha1.MoldingSpec{
+ Enabled: v1alpha1.BoolPtr(true),
+ Cluster: v1alpha1.TypeCluster{
+ Replicas: v1alpha1.IntPtr(0),
+ Shards: v1alpha1.IntPtr(1),
},
Version: "25.5.6",
Image: "ghcr.io/hanzoai/datastore:25.5.6",
diff --git a/api/v1alpha1/telemetrystore_kind.go b/api/v1alpha1/installation/telemetrystore_kind.go
similarity index 85%
rename from api/v1alpha1/telemetrystore_kind.go
rename to api/v1alpha1/installation/telemetrystore_kind.go
index 742171c..2dfc650 100644
--- a/api/v1alpha1/telemetrystore_kind.go
+++ b/api/v1alpha1/installation/telemetrystore_kind.go
@@ -1,10 +1,11 @@
-package v1alpha1
+package installation
import (
"encoding/json"
"errors"
"fmt"
+ "github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
@@ -13,6 +14,7 @@ var _ yaml.Unmarshaler = (*TelemetryStoreKind)(nil)
var _ json.Marshaler = (*TelemetryStoreKind)(nil)
var _ json.Unmarshaler = (*TelemetryStoreKind)(nil)
var _ fmt.Stringer = (*TelemetryStoreKind)(nil)
+var _ jsonschema.Enum = (*TelemetryStoreKind)(nil)
var (
TelemetryStoreKindClickhouse TelemetryStoreKind = TelemetryStoreKind{s: "clickhouse"}
@@ -50,10 +52,12 @@ func (kind *TelemetryStoreKind) UnmarshalText(text []byte) error {
return nil
}
}
+
if text == nil {
*kind = TelemetryStoreKind{s: ""}
return nil
}
+
return errors.New("invalid telemetry store kind: " + string(text))
}
@@ -68,3 +72,12 @@ func (kind *TelemetryStoreKind) UnmarshalYAML(node *yaml.Node) error {
func (kind TelemetryStoreKind) MarshalYAML() (any, error) {
return kind.String(), nil
}
+
+func (kind TelemetryStoreKind) Enum() []any {
+ kinds := []any{}
+ for _, kind := range TelemetryStoreKinds() {
+ kinds = append(kinds, kind.String())
+ }
+
+ return kinds
+}
diff --git a/api/v1alpha1/machinery.go b/api/v1alpha1/machinery.go
new file mode 100644
index 0000000..302f64f
--- /dev/null
+++ b/api/v1alpha1/machinery.go
@@ -0,0 +1,9 @@
+package v1alpha1
+
+import "github.com/signoz/foundry/internal/domain"
+
+// Machinery is the marker every per-Kind casting type satisfies.
+type Machinery interface {
+ Kind() Kind
+ TrackableProperties() domain.Properties
+}
diff --git a/api/v1alpha1/merge.go b/api/v1alpha1/merge.go
new file mode 100644
index 0000000..26c1d96
--- /dev/null
+++ b/api/v1alpha1/merge.go
@@ -0,0 +1,59 @@
+package v1alpha1
+
+import (
+ "encoding/json"
+ "reflect"
+
+ "github.com/signoz/foundry/internal/errors"
+ "k8s.io/apimachinery/pkg/util/strategicpatch"
+)
+
+// Merge applies an override onto a base via Kubernetes strategic merge patch
+// and mutates base in place. Both arguments must be pointers to the same
+// concrete struct type. Fields typed as any are replaced wholesale rather than
+// recursively merged.
+func Merge(base, overrides any) error {
+ if overrides == nil {
+ return nil
+ }
+
+ baseBytes, err := json.Marshal(base)
+ if err != nil {
+ return errors.Wrapf(err, errors.TypeInternal, "failed to convert current object to byte sequence")
+ }
+
+ overrideBytes, err := json.Marshal(overrides)
+ if err != nil {
+ return errors.Wrapf(err, errors.TypeInternal, "failed to convert current object to byte sequence")
+ }
+
+ patchMeta, err := strategicpatch.NewPatchMetaFromStruct(base)
+ if err != nil {
+ return errors.Wrapf(err, errors.TypeInternal, "failed to produce patch meta from struct")
+ }
+
+ patch, err := strategicpatch.CreateThreeWayMergePatch(overrideBytes, overrideBytes, baseBytes, patchMeta, true)
+ if err != nil {
+ return errors.Wrapf(err, errors.TypeInternal, "failed to create three way merge patch")
+ }
+
+ merged, err := strategicpatch.StrategicMergePatchUsingLookupPatchMeta(baseBytes, patch, patchMeta)
+ if err != nil {
+ return errors.Wrapf(err, errors.TypeInternal, "failed to apply patch")
+ }
+
+ valueOfBase := reflect.Indirect(reflect.ValueOf(base))
+
+ into := reflect.New(valueOfBase.Type())
+ if err := json.Unmarshal(merged, into.Interface()); err != nil {
+ return err
+ }
+
+ if !valueOfBase.CanSet() {
+ return errors.Newf(errors.TypeInternal, "unable to set unmarshalled value into base object")
+ }
+
+ valueOfBase.Set(reflect.Indirect(into))
+
+ return nil
+}
diff --git a/api/v1alpha1/merge_test.go b/api/v1alpha1/merge_test.go
new file mode 100644
index 0000000..bcb1de8
--- /dev/null
+++ b/api/v1alpha1/merge_test.go
@@ -0,0 +1,49 @@
+package v1alpha1
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestMerge(t *testing.T) {
+ t.Parallel()
+
+ testCases := []struct {
+ name string
+ base TypeMetadata
+ override TypeMetadata
+ want TypeMetadata
+ }{
+ {
+ name: "override Name wins over base",
+ base: TypeMetadata{Name: "base"},
+ override: TypeMetadata{Name: "override"},
+ want: TypeMetadata{Name: "override"},
+ },
+ {
+ name: "override fills in unset base fields",
+ base: TypeMetadata{},
+ override: TypeMetadata{Name: "fresh"},
+ want: TypeMetadata{Name: "fresh"},
+ },
+ {
+ name: "override Annotations (map with omitempty) does not clobber base when unset",
+ base: TypeMetadata{Name: "base", Annotations: map[string]string{"a": "1"}},
+ override: TypeMetadata{Name: "base"},
+ want: TypeMetadata{Name: "base", Annotations: map[string]string{"a": "1"}},
+ },
+ }
+
+ for _, tc := range testCases {
+ t.Run(tc.name, func(t *testing.T) {
+ t.Parallel()
+
+ base := tc.base
+ override := tc.override
+ require.NoError(t, Merge(&base, &override))
+ assert.Equal(t, tc.want, base)
+ })
+ }
+}
diff --git a/api/v1alpha1/meta.go b/api/v1alpha1/meta.go
index d1a4fc3..8c98e9c 100644
--- a/api/v1alpha1/meta.go
+++ b/api/v1alpha1/meta.go
@@ -1,16 +1,7 @@
package v1alpha1
-import (
- "encoding/json"
- "fmt"
- "reflect"
-
- "k8s.io/apimachinery/pkg/util/strategicpatch"
-)
-
type TypeVersion struct {
- // API Version of the casting configuration schema.
- APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" description:"API Version of the casting configuration schema" example:"v1alpha1"`
+ APIVersion string `json:"apiVersion" yaml:"apiVersion" required:"true" nullable:"false" enum:"v1alpha1" description:"API Version of the configuration schema." default:"v1alpha1" example:"v1alpha1"`
}
type TypeMetadata struct {
@@ -23,72 +14,25 @@ type TypeMetadata struct {
}
type TypeCluster struct {
- // Number of replicas for the component
- Replicas *int `json:"replicas,omitempty" yaml:"replicas,omitempty" description:"Number of replicas for the component" example:"1"`
-
- // Number of shards for the component
- Shards *int `json:"shards,omitempty" yaml:"shards,omitempty" description:"Number of shards for the component" example:"1"`
+ Replicas *int `json:"replicas,omitempty" yaml:"replicas,omitempty" minimum:"0" description:"Number of replicas for the molding." example:"1"`
+ Shards *int `json:"shards,omitempty" yaml:"shards,omitempty" minimum:"1" description:"Number of shards for the molding" example:"1"`
+ _ struct{} `additionalProperties:"false"`
}
type TypeConfig struct {
- // Data contains the configuration data.
- Data map[string]string `json:"data,omitempty" yaml:"data,omitempty" description:"Configuration data as key-value pairs"`
+ Data map[string]string `json:"data,omitempty" yaml:"data,omitempty" description:"Configuration data as key-value pairs."`
+ _ struct{} `additionalProperties:"false"`
}
type TypeDeployment struct {
- // Platform: Provider where an installation runs on using various cloud vendors
- // Example values: aws|gcp|azure|digitalocean|railway
- Platform string `json:"platform,omitempty" yaml:"platform,omitempty" description:"Provider where an installation runs on" examples:"[\"aws\",\"gcp\",\"azure\",\"digitalocean\",\"railway\",\"docker\",\"linux\"]"`
+ // Platform: cloud or hosting provider where an installation runs.
+ Platform Platform `json:"platform,omitzero" yaml:"platform,omitempty" description:"Provider where an installation runs on"`
- // Mode: Type of installation method that we support, currently identifies the engine or technology behind a deployment
- Mode string `json:"mode,omitempty" yaml:"mode,omitempty" description:"Type of installation method" examples:"[\"binary\",\"docker\",\"kubernetes\",\"helm\",\"nomad\",\"windows\",\"systemctl\"]"`
+ // Mode: type of installation method (engine or technology behind the deployment).
+ Mode Mode `json:"mode,omitzero" yaml:"mode,omitempty" description:"Type of installation method"`
- // Flavor: Defines the flavor of mode for the deployment, allows the user the pattern to deploy on
- Flavor string `json:"flavor,omitempty" yaml:"flavor,omitempty" description:"Flavor of mode for the deployment" examples:"[\"compose\",\"swarm\",\"helmfile\",\"helm\",\"kustomize\",\"binary\",\"rpm\",\"deb\",\"chocolatey\"]"`
-}
+ // Flavor: variant of the mode for the deployment.
+ Flavor Flavor `json:"flavor,omitzero" yaml:"flavor,omitempty" description:"Flavor of mode for the deployment"`
-func Merge(base, overrides any) error {
- if overrides == nil {
- return nil
- }
-
- baseBytes, err := json.Marshal(base)
- if err != nil {
- return fmt.Errorf("failed to convert current object to byte sequence: %w", err)
- }
-
- overrideBytes, err := json.Marshal(overrides)
- if err != nil {
- return fmt.Errorf("failed to convert current object to byte sequence: %w", err)
- }
-
- patchMeta, err := strategicpatch.NewPatchMetaFromStruct(base)
- if err != nil {
- return fmt.Errorf("failed to produce patch meta from struct: %w", err)
- }
-
- patch, err := strategicpatch.CreateThreeWayMergePatch(overrideBytes, overrideBytes, baseBytes, patchMeta, true)
- if err != nil {
- return fmt.Errorf("failed to create three way merge patch: %w", err)
- }
-
- merged, err := strategicpatch.StrategicMergePatchUsingLookupPatchMeta(baseBytes, patch, patchMeta)
- if err != nil {
- return fmt.Errorf("failed to apply patch: %w", err)
- }
-
- valueOfBase := reflect.Indirect(reflect.ValueOf(base))
-
- into := reflect.New(valueOfBase.Type())
- if err := json.Unmarshal(merged, into.Interface()); err != nil {
- return err
- }
-
- if !valueOfBase.CanSet() {
- return fmt.Errorf("unable to set unmarshalled value into base object")
- }
-
- valueOfBase.Set(reflect.Indirect(into))
-
- return nil
+ _ struct{} `additionalProperties:"false"`
}
diff --git a/api/v1alpha1/molding.go b/api/v1alpha1/molding.go
index 2add3b7..cf4bf98 100644
--- a/api/v1alpha1/molding.go
+++ b/api/v1alpha1/molding.go
@@ -4,7 +4,7 @@ import "maps"
type MoldingSpec struct {
// Whether the molding is enabled
- Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty" description:"Whether the molding is enabled" default:"true"`
+ Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" description:"Whether the molding is enabled" default:"true"`
// Cluster configuration for the molding
Cluster TypeCluster `json:"cluster" yaml:"cluster,omitempty" description:"Cluster configuration for the molding"`
@@ -20,6 +20,8 @@ type MoldingSpec struct {
// Configuration for the molding
Config TypeConfig `json:"config" yaml:"config,omitempty" description:"Configuration for the molding"`
+
+ _ struct{} `additionalProperties:"false"`
}
type MoldingStatus struct {
@@ -31,6 +33,17 @@ type MoldingStatus struct {
// Configuration for the molding
Config TypeConfig `json:"config" yaml:"config,omitempty" description:"Configuration for the molding"`
+
+ _ struct{} `additionalProperties:"false"`
+}
+
+// IsEnabled returns whether the molding is enabled.
+// Returns false if the receiver or Enabled is nil.
+func (spec *MoldingSpec) IsEnabled() bool {
+ if spec == nil || spec.Enabled == nil {
+ return false
+ }
+ return *spec.Enabled
}
func (spec *MoldingSpec) MergeStatus(status MoldingStatus) error {
@@ -42,11 +55,14 @@ func (spec *MoldingSpec) MergeStatus(status MoldingStatus) error {
status.Env = make(map[string]string)
}
- maps.Copy(spec.Env, status.Env)
+ maps.Copy(status.Env, spec.Env)
+ spec.Env = status.Env
- if err := Merge(&spec.Config, status.Config); err != nil {
+ if err := Merge(&status.Config, spec.Config); err != nil {
return err
}
+ spec.Config = status.Config
+
return nil
}
diff --git a/api/v1alpha1/patch.go b/api/v1alpha1/patch.go
new file mode 100644
index 0000000..5e157ca
--- /dev/null
+++ b/api/v1alpha1/patch.go
@@ -0,0 +1,46 @@
+package v1alpha1
+
+const (
+ // PatchTypeJSONPatch is the default patch type using JSON Patch (RFC 6902).
+ PatchTypeJSONPatch = "jsonpatch"
+)
+
+// PatchEntry is a set of patch operations targeting a specific generated file.
+type PatchEntry struct {
+ // Type selects the patch driver. Defaults to "jsonpatch" if empty.
+ Type string `json:"type,omitempty" yaml:"type,omitempty" enum:",jsonpatch" description:"Patch driver type. Defaults to jsonpatch." default:"jsonpatch" example:"jsonpatch"`
+
+ // Target is the output file to patch, relative to the pours directory.
+ Target string `json:"target" yaml:"target" required:"true" minLength:"1" description:"Target output file to patch" examples:"[\"compose.yaml\",\"signoz/deployment.yaml\",\"values.yaml\",\"telemetrystore/telemtrystore-clickhouse-0-*.yaml\"]"`
+
+ // Operations is a list of JSON Patch (RFC 6902) operations to apply. Used by the jsonpatch driver.
+ Operations []PatchOperation `json:"operations" yaml:"operations" required:"true" minItems:"1" description:"JSON Patch (RFC 6902) operations to apply. Used by the jsonpatch driver."`
+
+ _ struct{} `additionalProperties:"false"`
+}
+
+// PatchType returns the patch type, defaulting to PatchTypeJSONPatch if empty.
+func (pe PatchEntry) PatchType() string {
+ if pe.Type == "" {
+ return PatchTypeJSONPatch
+ }
+
+ return pe.Type
+}
+
+// PatchOperation is a single JSON Patch (RFC 6902) operation. Used by the jsonpatch driver.
+type PatchOperation struct {
+ // Op is the JSON Patch (RFC 6902) operation type: add, remove, replace, move, copy, test.
+ Op string `json:"op" yaml:"op" required:"true" enum:"add,remove,replace,move,copy,test" description:"JSON Patch (RFC 6902) operation type"`
+
+ // Path is a JSON Pointer (RFC 6902) to the target location.
+ Path string `json:"path" yaml:"path" required:"true" pattern:"^/" description:"JSON Pointer (RFC 6901) to the target location" example:"/services/clickhouse/mem_limit"`
+
+ // Value is the value for add, replace, or test operations.
+ Value any `json:"value,omitempty" yaml:"value,omitempty" description:"Value for add, replace, or test operations"`
+
+ // From is a JSON Pointer for the source location in move and copy operations.
+ From string `json:"from,omitempty" yaml:"from,omitempty" pattern:"^/" description:"Source JSON Pointer for move and copy operations" example:"/services/clickhouse/old_field"`
+
+ _ struct{} `additionalProperties:"false"`
+}
diff --git a/api/v1alpha1/pointer.go b/api/v1alpha1/pointer.go
new file mode 100644
index 0000000..4cf169b
--- /dev/null
+++ b/api/v1alpha1/pointer.go
@@ -0,0 +1,9 @@
+package v1alpha1
+
+func BoolPtr(v bool) *bool {
+ return &v
+}
+
+func IntPtr(v int) *int {
+ return &v
+}
diff --git a/api/v1alpha1/schema.go b/api/v1alpha1/schema.go
new file mode 100644
index 0000000..931bba0
--- /dev/null
+++ b/api/v1alpha1/schema.go
@@ -0,0 +1,20 @@
+package v1alpha1
+
+import (
+ "encoding/json"
+
+ "github.com/google/jsonschema-go/jsonschema"
+)
+
+// MustResolveSchema parses and resolves a JSON Schema, panicking on failure.
+func MustResolveSchema(bytes []byte) *jsonschema.Resolved {
+ s := new(jsonschema.Schema)
+ if err := json.Unmarshal(bytes, s); err != nil {
+ panic(err)
+ }
+ resolved, err := s.Resolve(nil)
+ if err != nil {
+ panic(err)
+ }
+ return resolved
+}
diff --git a/api/v1alpha1/schema_test.go b/api/v1alpha1/schema_test.go
new file mode 100644
index 0000000..e9d2c83
--- /dev/null
+++ b/api/v1alpha1/schema_test.go
@@ -0,0 +1,23 @@
+package v1alpha1
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestMustResolveSchema(t *testing.T) {
+ t.Parallel()
+
+ t.Run("valid schema", func(t *testing.T) {
+ t.Parallel()
+ assert.NotNil(t, MustResolveSchema([]byte(`{"type": "object"}`)))
+ })
+
+ t.Run("invalid json panics", func(t *testing.T) {
+ t.Parallel()
+ assert.Panics(t, func() {
+ MustResolveSchema([]byte(`not json`))
+ })
+ })
+}
diff --git a/cmd/foundryctl/cast.go b/cmd/foundryctl/cast.go
index cd93d81..1054703 100644
--- a/cmd/foundryctl/cast.go
+++ b/cmd/foundryctl/cast.go
@@ -3,7 +3,6 @@ package main
import (
"context"
- "fmt"
"log/slog"
"path/filepath"
@@ -17,50 +16,48 @@ func registerCastCmd(rootCmd *cobra.Command) {
castCmd := &cobra.Command{
Use: "cast",
Short: "Cast to the target environment.",
- RunE: func(cmd *cobra.Command, args []string) error {
+ RunE: recoverRunE(domain.EventCast, func(cmd *cobra.Command, args []string) (domain.Properties, error) {
ctx := cmd.Context()
- logger := instrumentation.NewLogger(commonCfg.Debug)
if !castCfg.NoGauge {
- err := runGauge(ctx, logger, commonCfg.File)
- if err != nil {
- return err
+ if props, err := runGauge(ctx, rootLogger, commonCfg.File); err != nil {
+ return props, err
}
}
if !castCfg.NoForge {
- err := runForge(ctx, logger, commonCfg.File, poursCfg.Path)
- if err != nil {
- return err
+ if props, err := runForge(ctx, rootLogger, commonCfg.File, poursCfg.Path); err != nil {
+ return props, err
}
}
- return runCast(ctx, logger, poursCfg.Path, commonCfg.File)
- },
+ return runCast(ctx, rootLogger, poursCfg.Path, commonCfg.File)
+ }),
}
rootCmd.AddCommand(castCmd)
castCfg.RegisterFlags(castCmd)
}
-func runCast(ctx context.Context, logger *slog.Logger, poursPath string, configPath string) error {
+func runCast(ctx context.Context, logger *slog.Logger, poursPath string, configPath string) (domain.Properties, error) {
foundry, err := foundry.New(logger)
if err != nil {
logger.ErrorContext(ctx, "failed to create foundry, please report this issues to developers at https://github.com/hanzoai/o11y-foundry/issues", foundryerrors.LogAttr(err))
return err
}
- // Get absolute pours path
poursPath, err = filepath.Abs(poursPath)
if err != nil {
- return fmt.Errorf("failed to resolve pours path: %w", err)
+ return domain.NewProperties(), errors.Wrapf(err, errors.TypeInternal, "failed to resolve pours path")
}
- lock, err := foundry.Config.GetV1Alpha1Lock(ctx, configPath)
+ machinery, err := foundry.Config.GetV1Alpha1Lock(ctx, configPath)
if err != nil {
- logger.ErrorContext(ctx, "failed to load generated casting.yaml.lock", foundryerrors.LogAttr(err))
- return err
+ return domain.NewProperties(), err
}
- return foundry.Cast(ctx, lock, poursPath)
+ props := machinery.TrackableProperties()
+
+ err = foundry.Cast(ctx, machinery, poursPath)
+ return props, err
}
diff --git a/cmd/foundryctl/catalog.go b/cmd/foundryctl/catalog.go
new file mode 100644
index 0000000..8a75b4f
--- /dev/null
+++ b/cmd/foundryctl/catalog.go
@@ -0,0 +1,106 @@
+package main
+
+import (
+ "encoding/json"
+ "log/slog"
+ "os"
+ "sort"
+
+ "github.com/olekukonko/tablewriter"
+ "github.com/signoz/foundry/api/v1alpha1"
+ installationcasting "github.com/signoz/foundry/internal/casting/installation"
+ "github.com/signoz/foundry/internal/domain"
+ "github.com/spf13/cobra"
+)
+
+func registerCatalogCmd(rootCmd *cobra.Command) {
+ catalogCmd := &cobra.Command{
+ Use: "catalog",
+ Short: "Show available castings",
+ RunE: recoverRunE(domain.EventCatalog, func(cmd *cobra.Command, args []string) (domain.Properties, error) {
+ return runCatalog(rootLogger)
+ }),
+ }
+
+ catalogCfg.RegisterFlags(catalogCmd)
+ rootCmd.AddCommand(catalogCmd)
+}
+
+type castingEntry struct {
+ Platform string `json:"platform"`
+ Mode string `json:"mode"`
+ Flavor string `json:"flavor"`
+ Example string `json:"example"`
+}
+
+func castingExample(d v1alpha1.TypeDeployment) string {
+ platform, mode, flavor := d.Platform.String(), d.Mode.String(), d.Flavor.String()
+ switch {
+ case platform != "" && mode != "":
+ return platform + "/" + mode + "/" + flavor
+ case platform != "":
+ return platform + "/" + flavor
+ default:
+ return mode + "/" + flavor
+ }
+}
+
+// catalogGroup returns a sort key that groups entries:
+// 0 = mode + flavor (self-hosted: docker, systemd, kubernetes).
+// 1 = mode + flavor + platform (cloud infra: ecs).
+// 2 = platform + flavor (managed platforms: coolify, render, railway).
+func catalogGroup(e castingEntry) int {
+ switch {
+ case e.Platform != "" && e.Mode != "":
+ return 1
+ case e.Platform != "":
+ return 2
+ default:
+ return 0
+ }
+}
+
+func runCatalog(logger *slog.Logger) (domain.Properties, error) {
+ registry := installationcasting.NewRegistry(logger)
+
+ var entries []castingEntry
+ for d := range registry.CastingItems() {
+ entries = append(entries, castingEntry{
+ Platform: d.Platform.String(),
+ Mode: d.Mode.String(),
+ Flavor: d.Flavor.String(),
+ Example: castingExample(d),
+ })
+ }
+
+ sort.Slice(entries, func(i, j int) bool {
+ gi, gj := catalogGroup(entries[i]), catalogGroup(entries[j])
+ if gi != gj {
+ return gi < gj
+ }
+ return entries[i].Example < entries[j].Example
+ })
+
+ props := domain.NewProperties()
+
+ if commonCfg.Format == "text" {
+ table := tablewriter.NewWriter(os.Stdout)
+ table.Header("Mode", "Flavor", "Platform", "Example")
+ for _, e := range entries {
+ _ = table.Append(e.Mode, e.Flavor, e.Platform, e.Example)
+ }
+
+ return props, table.Render()
+ }
+
+ data, err := json.MarshalIndent(map[string]any{"Castings": entries}, "", " ")
+ if err != nil {
+ return props, err
+ }
+ if catalogCfg.OutPath != "" {
+ err = os.WriteFile(catalogCfg.OutPath, data, 0644)
+ return props, err
+ }
+ _, err = os.Stdout.Write(data)
+ return props, err
+}
diff --git a/cmd/foundryctl/config.go b/cmd/foundryctl/config.go
index 77ed614..e39d0a8 100644
--- a/cmd/foundryctl/config.go
+++ b/cmd/foundryctl/config.go
@@ -7,21 +7,27 @@ var (
commonCfg commonConfig
// Stores pours configuration.
-
poursCfg poursConfig
// Stores cast configuration.
castCfg castConfig
+
+ // Stores catalog configuration.
+ catalogCfg catalogConfig
)
type commonConfig struct {
- File string
- Debug bool
+ File string
+ Debug bool
+ Format string
+ NoLedger bool
}
func (c *commonConfig) RegisterFlags(cmd *cobra.Command) {
cmd.PersistentFlags().StringVarP(&c.File, "file", "f", "casting.yaml", "Path to the casting configuration file.")
cmd.PersistentFlags().BoolVarP(&c.Debug, "debug", "d", false, "Enable debug mode.")
+ cmd.PersistentFlags().StringVar(&c.Format, "format", "json", "Output format for results and errors (json|text).")
+ cmd.PersistentFlags().BoolVar(&c.NoLedger, "no-ledger", false, "Disable anonymous usage ledger.")
}
type poursConfig struct {
@@ -41,3 +47,11 @@ func (c *castConfig) RegisterFlags(cmd *cobra.Command) {
cmd.PersistentFlags().BoolVar(&c.NoGauge, "no-gauge", false, "Do not run gauge before forge and cast.")
cmd.PersistentFlags().BoolVar(&c.NoForge, "no-forge", false, "Do not run forge before cast.")
}
+
+type catalogConfig struct {
+ OutPath string
+}
+
+func (c *catalogConfig) RegisterFlags(cmd *cobra.Command) {
+ cmd.Flags().StringVarP(&c.OutPath, "output", "o", "", "Path to write castings.json")
+}
diff --git a/cmd/foundryctl/forge.go b/cmd/foundryctl/forge.go
index 7ee637d..73d32ec 100644
--- a/cmd/foundryctl/forge.go
+++ b/cmd/foundryctl/forge.go
@@ -18,38 +18,33 @@ func registerForgeCmd(rootCmd *cobra.Command) {
Use: "forge",
Short: "Forge Configuration and Deployment Files",
Long: "Generate deployment configuration files from casting.yaml",
- RunE: func(cmd *cobra.Command, args []string) error {
- ctx := cmd.Context()
- logger := instrumentation.NewLogger(commonCfg.Debug)
-
- return runForge(ctx, logger, commonCfg.File, poursCfg.Path)
- },
+ RunE: recoverRunE(domain.EventForge, func(cmd *cobra.Command, args []string) (domain.Properties, error) {
+ return runForge(cmd.Context(), rootLogger, commonCfg.File, poursCfg.Path)
+ }),
}
rootCmd.AddCommand(forgeCmd)
}
-func runForge(ctx context.Context, logger *slog.Logger, path string, poursPath string) error {
+func runForge(ctx context.Context, logger *slog.Logger, path string, poursPath string) (domain.Properties, error) {
foundry, err := foundry.New(logger)
if err != nil {
logger.ErrorContext(ctx, "failed to create foundry, please report this issues to developers at https://github.com/hanzoai/o11y-foundry/issues", foundryerrors.LogAttr(err))
return err
}
- config, err := foundry.Config.GetV1Alpha1(ctx, path)
+ machinery, err := foundry.Config.GetV1Alpha1(ctx, path)
if err != nil {
- return err
+ return domain.NewProperties(), err
}
+ props := machinery.TrackableProperties()
+
poursAbsPath, err := filepath.Abs(poursPath)
if err != nil {
- return err
+ return props, err
}
- err = foundry.Forge(ctx, config, path, &writer.Options{Output: &os.File{}, TargetDirectory: poursAbsPath})
- if err != nil {
- return err
- }
-
- return nil
+ err = foundry.Forge(ctx, machinery, path, &writer.Options{Output: &os.File{}, TargetDirectory: poursAbsPath})
+ return props, err
}
diff --git a/cmd/foundryctl/gauge.go b/cmd/foundryctl/gauge.go
index e08f4d3..f846449 100644
--- a/cmd/foundryctl/gauge.go
+++ b/cmd/foundryctl/gauge.go
@@ -14,18 +14,15 @@ func registerGaugeCmd(rootCmd *cobra.Command) {
gaugeCmd := &cobra.Command{
Use: "gauge",
Short: "Gauge whether required tools are available.",
- RunE: func(cmd *cobra.Command, args []string) error {
- ctx := cmd.Context()
- logger := instrumentation.NewLogger(commonCfg.Debug)
-
- return runGauge(ctx, logger, commonCfg.File)
- },
+ RunE: recoverRunE(domain.EventGauge, func(cmd *cobra.Command, args []string) (domain.Properties, error) {
+ return runGauge(cmd.Context(), rootLogger, commonCfg.File)
+ }),
}
rootCmd.AddCommand(gaugeCmd)
}
-func runGauge(ctx context.Context, logger *slog.Logger, path string) error {
+func runGauge(ctx context.Context, logger *slog.Logger, path string) (domain.Properties, error) {
foundry, err := foundry.New(logger)
if err != nil {
logger.ErrorContext(ctx, "failed to create foundry, please report this issues to developers at https://github.com/hanzoai/o11y-foundry/issues", foundryerrors.LogAttr(err))
@@ -34,15 +31,11 @@ func runGauge(ctx context.Context, logger *slog.Logger, path string) error {
casting, err := foundry.Config.GetV1Alpha1(ctx, path)
if err != nil {
- logger.ErrorContext(ctx, err.Error())
- return err
+ return domain.NewProperties(), err
}
+ props := casting.TrackableProperties()
+
err = foundry.Gauge(ctx, casting)
- if err != nil {
- logger.ErrorContext(ctx, err.Error())
- return err
- }
-
- return nil
+ return props, err
}
diff --git a/cmd/foundryctl/gen.go b/cmd/foundryctl/gen.go
index c8c3286..dea3bd2 100644
--- a/cmd/foundryctl/gen.go
+++ b/cmd/foundryctl/gen.go
@@ -2,10 +2,12 @@ package main
import (
"context"
- "log"
+ "encoding/json"
"log/slog"
"os"
"path/filepath"
+ "reflect"
+ "strings"
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
@@ -16,6 +18,18 @@ import (
"github.com/swaggest/jsonschema-go"
)
+const moduleAPIPrefix = "github.com/signoz/foundry/api/v1alpha1/"
+
+type schemaTarget struct {
+ kind v1alpha1.Kind
+ val any
+}
+
+var schemaTargets = []schemaTarget{
+ {v1alpha1.KindInstallation, installation.Casting{}},
+ {v1alpha1.KindCollectionAgent, collectionagent.Casting{}},
+}
+
func registerGenCmd(rootCmd *cobra.Command) {
genCmd := &cobra.Command{
Use: "gen",
@@ -48,10 +62,7 @@ func registerGenSchemas(rootCmd *cobra.Command) {
Use: "schemas",
Short: "Generate schema files.",
RunE: func(cmd *cobra.Command, args []string) error {
- ctx := cmd.Context()
- logger := instrumentation.NewLogger(commonCfg.Debug)
-
- return runGenSchemas(ctx, logger)
+ return runGenSchemas(cmd.Context())
},
}
@@ -65,25 +76,22 @@ func runGenExamples(ctx context.Context, logger *slog.Logger) error {
return err
}
- for deployment := range foundry.Registry.CastingItems() {
+ for deployment := range registry.CastingItems() {
logger.InfoContext(ctx, "generating example files for deployment", slog.Any("deployment", deployment))
- config := v1alpha1.ExampleCasting()
+ config := installation.Example()
config.Spec.Deployment = deployment
- rootPath := filepath.Join("docs", "examples/", deployment.Platform, deployment.Mode, deployment.Flavor)
- err = os.MkdirAll(rootPath, 0755)
- if err != nil {
+ rootPath := filepath.Join("docs", "examples/", deployment.Platform.String(), deployment.Mode.String(), deployment.Flavor.String())
+ if err := os.MkdirAll(rootPath, 0755); err != nil {
return err
}
- err = os.WriteFile(filepath.Join(rootPath, "casting.yaml"), types.MustMarshalYAML(config), 0644)
- if err != nil {
+ if err := os.WriteFile(filepath.Join(rootPath, "casting.yaml"), domain.MustMarshalYAML(config), 0644); err != nil {
return err
}
- err = runForge(ctx, logger, filepath.Join(rootPath, "casting.yaml"), filepath.Join(rootPath, "pours"))
- if err != nil {
+ if _, err := runForge(ctx, logger, filepath.Join(rootPath, "casting.yaml"), filepath.Join(rootPath, "pours")); err != nil {
logger.ErrorContext(ctx, "failed to forge casting", slog.Any("deployment", deployment), foundryerrors.LogAttr(err))
continue
}
@@ -92,18 +100,52 @@ func runGenExamples(ctx context.Context, logger *slog.Logger) error {
return nil
}
-func runGenSchemas(context.Context, *slog.Logger) error {
- reflector := jsonschema.Reflector{}
+func runGenSchemas(_ context.Context) error {
+ var oneOf []jsonschema.SchemaOrBool
+ kindType := reflect.TypeFor[v1alpha1.Kind]()
- schema, err := reflector.Reflect(v1alpha1.Casting{})
- if err != nil {
- log.Fatal(err)
+ for _, t := range schemaTargets {
+ target := t
+ reflector := jsonschema.Reflector{}
+ // v1alpha1.Kind's Enum() returns all Kinds (the type permits any).
+ // For this per-Kind schema, the kind field is always this Casting's
+ // Kind, so we narrow the enum at reflection.
+ reflector.DefaultOptions = append(reflector.DefaultOptions,
+ jsonschema.InterceptSchema(func(params jsonschema.InterceptSchemaParams) (bool, error) {
+ if !params.Processed || params.Value.Type() != kindType {
+ return false, nil
+ }
+ params.Schema.Enum = []any{target.kind.String()}
+ return false, nil
+ }),
+ )
+
+ schema, err := reflector.Reflect(target.val)
+ if err != nil {
+ return foundryerrors.Wrapf(err, foundryerrors.TypeInternal, "reflect %T", target.val)
+ }
+
+ contents, err := json.MarshalIndent(schema, "", " ")
+ if err != nil {
+ return foundryerrors.Wrapf(err, foundryerrors.TypeInternal, "marshal %T", target.val)
+ }
+
+ kindDir := strings.TrimPrefix(reflect.TypeOf(target.val).PkgPath(), moduleAPIPrefix)
+ if err := os.WriteFile(filepath.Join("api", "v1alpha1", kindDir, "casting.schema.json"), contents, 0644); err != nil {
+ return err
+ }
+ ref := (&jsonschema.Schema{}).WithRef(filepath.Join(kindDir, "casting.schema.json"))
+ oneOf = append(oneOf, ref.ToSchemaOrBool())
}
- err = os.WriteFile(filepath.Join("docs", "schemas", "v1alpha1.yaml"), types.MustMarshalYAML(schema), 0644)
+ root := (&jsonschema.Schema{}).
+ WithSchema("http://json-schema.org/draft-07/schema#").
+ WithTitle("Foundry Casting").
+ WithOneOf(oneOf...)
+
+ rootContents, err := json.MarshalIndent(root, "", " ")
if err != nil {
return err
}
-
- return nil
+ return os.WriteFile(filepath.Join("api", "v1alpha1", "casting.schema.json"), rootContents, 0644)
}
diff --git a/cmd/foundryctl/main.go b/cmd/foundryctl/main.go
index 35eb7d7..c10dfef 100644
--- a/cmd/foundryctl/main.go
+++ b/cmd/foundryctl/main.go
@@ -1,7 +1,6 @@
package main
import (
- "context"
"os"
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
@@ -11,12 +10,12 @@ import (
func main() {
rootCmd := &cobra.Command{
- Use: "foundryctl",
- SilenceUsage: true,
- SilenceErrors: true,
+ Use: "foundryctl",
+ SilenceUsage: true,
CompletionOptions: cobra.CompletionOptions{
DisableDefaultCmd: true,
},
+ PersistentPreRunE: newRoot,
}
// Register configuration.
@@ -28,11 +27,12 @@ func main() {
registerForgeCmd(rootCmd)
registerCastCmd(rootCmd)
registerGenCmd(rootCmd)
+ registerCatalogCmd(rootCmd)
+ registerVersionCmd(rootCmd)
- logger := instrumentation.NewLogger(false)
+ defer closeRoot()
if err := rootCmd.Execute(); err != nil {
- logger.ErrorContext(context.Background(), "failed to run foundryctl", foundryerrors.LogAttr(err))
- os.Exit(1)
+ os.Exit(foundryerrors.ExitCode(err))
}
}
diff --git a/cmd/foundryctl/root.go b/cmd/foundryctl/root.go
new file mode 100644
index 0000000..a162ff0
--- /dev/null
+++ b/cmd/foundryctl/root.go
@@ -0,0 +1,82 @@
+package main
+
+import (
+ "log/slog"
+ "os"
+ "runtime"
+
+ "github.com/signoz/foundry/internal/domain"
+ foundryerrors "github.com/signoz/foundry/internal/errors"
+ "github.com/signoz/foundry/internal/instrumentation"
+ "github.com/signoz/foundry/internal/ledger"
+ "github.com/signoz/foundry/internal/ledger/noopledger"
+ "github.com/signoz/foundry/internal/ledger/segmentledger"
+ "github.com/signoz/foundry/internal/writer"
+ "github.com/spf13/cobra"
+)
+
+var (
+ rootLogger *slog.Logger
+ rootTracker ledger.Ledger
+)
+
+// newRoot is wired as rootCmd.PersistentPreRunE so it fires after persistent
+// flags are parsed and before any command's RunE runs.
+func newRoot(_ *cobra.Command, _ []string) error {
+ rootLogger = instrumentation.NewLogger(commonCfg.Debug)
+
+ config := ledger.NewConfig()
+ if commonCfg.NoLedger {
+ config.Enabled = false
+ }
+
+ switch config.Provider() {
+ case "segment":
+ rootTracker = segmentledger.New(config)
+ default:
+ rootTracker = noopledger.New()
+ }
+
+ return nil
+}
+
+func closeRoot() {
+ if rootTracker != nil {
+ _ = rootTracker.Close()
+ }
+}
+
+func recoverRunE(
+ event domain.Event,
+ runE func(cmd *cobra.Command, args []string) (domain.Properties, error),
+) func(cmd *cobra.Command, args []string) error {
+ return func(cmd *cobra.Command, args []string) (err error) {
+ ctx := cmd.Context()
+ props := domain.NewProperties()
+
+ defer func() {
+ if r := recover(); r != nil {
+ buf := make([]byte, 4096)
+ n := runtime.Stack(buf, false)
+
+ errp := foundryerrors.Newf(foundryerrors.TypeFatal, "%v", r).WithStacktrace(string(buf[:n]))
+ err = errp
+ }
+
+ if err != nil {
+ rootLogger.ErrorContext(ctx, event.String()+" failed", foundryerrors.LogAttr(err))
+ rootTracker.Track(ctx, event.Failed(), props.WithError(err))
+ if commonCfg.Format == "json" {
+ _ = writer.WriteOutput(os.Stdout, foundryerrors.EnvelopeOf(err))
+ cmd.SilenceErrors = true
+ }
+ return
+ }
+
+ rootTracker.Track(ctx, event.Succeeded(), props.WithSuccess())
+ }()
+
+ props, err = runE(cmd, args)
+ return err
+ }
+}
diff --git a/cmd/foundryctl/version.go b/cmd/foundryctl/version.go
new file mode 100644
index 0000000..2bbb647
--- /dev/null
+++ b/cmd/foundryctl/version.go
@@ -0,0 +1,36 @@
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/signoz/foundry/internal/version"
+ "github.com/spf13/cobra"
+)
+
+var versionCfg versionConfig
+
+type versionConfig struct {
+ Short bool
+}
+
+func (c *versionConfig) RegisterFlags(cmd *cobra.Command) {
+ cmd.Flags().BoolVar(&c.Short, "short", false, "Print version in a single line")
+}
+
+func registerVersionCmd(rootCmd *cobra.Command) {
+ versionCmd := &cobra.Command{
+ Use: "version",
+ Short: "Print the version information",
+ Run: func(cmd *cobra.Command, args []string) {
+ if versionCfg.Short {
+ _, _ = fmt.Fprintln(os.Stdout, version.Info.Short())
+ return
+ }
+ version.Info.PrettyPrint()
+ },
+ }
+
+ versionCfg.RegisterFlags(versionCmd)
+ rootCmd.AddCommand(versionCmd)
+}
diff --git a/docs/casting.md b/docs/casting.md
deleted file mode 100644
index a67b445..0000000
--- a/docs/casting.md
+++ /dev/null
@@ -1,173 +0,0 @@
-## Casting
-
-A _casting_ is one YAML file that describes a full Hanzo O11y deployment. Foundry fills in defaults; you override what you need.
-
-### How to write `casting.yaml`
-
-You’ll build the file in this order:
-
-1. **Name your deployment**: `apiVersion` and `metadata` (name, optional annotations).
-2. **Where it runs**: Deployment target: Docker, systemd, or Render.
-3. **What runs**: Moldings (Hanzo O11y, ingester, ClickHouse, metastore). Add blocks when you want to change defaults.
-4. **How it's configured**: Per-molding `spec`: images, env, scaling, config files.
-5. **Run it**: Point Foundry at the file and generate artifacts.
-
-
-#### 1. Name your deployment
-
-Top of the file: `apiVersion` and `metadata`.
-
-```yaml
-apiVersion: v1alpha1
-metadata:
- name: o11y-prod # deployment ID: used as prefix for service names
- annotations: {} # optional; required for systemd (step 2)
-```
-
-`name` is required: use something that identifies this deployment (`o11y-prod`, `o11y-dev`, whatever). `annotations` is optional unless you're on systemd/binary; then you'll put binary paths there (see step 2).
-
-> [!TIP]
-> Short, environment-specific names work best; they end up in generated service names.
-
-#### 2. Where it runs (deployment target)
-
-`spec.deployment` tells Foundry how you're deploying: Docker Compose, systemd, or Render. It uses this to pick the right mold and spit out the right artifacts.
-
-```yaml
-spec:
- deployment:
- mode: docker # or systemd
- flavor: compose # or binary | blueprint
- platform: # optional; "render" for Render
-```
-
-Pick one row:
-
-| Where you're deploying | `mode` | `flavor` | `platform` |
-| ---------------------- | ---------- | ----------- | --------- |
-| **Docker Compose** | `docker` | `compose` | (none) |
-| **Linux (systemd)** | `systemd` | `binary` | (none) |
-| **[Render](https://render.com)** | (none) | `blueprint` | `render` |
-
-> [!NOTE]
-> systemd (`mode` + `flavor: binary`):** Foundry needs the paths to your binaries. Put them in `metadata.annotations`:
->
-> | Annotation | What it's for |
-> | ---------- | ------------- |
-> | `foundry.o11y.hanzo.ai/o11y-binary-path` | Hanzo O11y binary (for example, `/opt/o11y/bin/o11y`) |
-> | `foundry.o11y.hanzo.ai/ingester-binary-path` | OTel Collector / ingester (for example, `/opt/ingester/bin/o11y-otel-collector`) |
-> | `foundry.o11y.hanzo.ai/metastore-postgres-binary-path` | PostgreSQL binary when using Postgres metastore (for example, `/usr/bin/postgres`) |
->
-> Example:
->
-> ```yaml
-> metadata:
-> name: o11y
-> annotations:
-> foundry.o11y.hanzo.ai/o11y-binary-path: /opt/o11y/bin/o11y
-> foundry.o11y.hanzo.ai/ingester-binary-path: /opt/ingester/bin/o11y-otel-collector
-> foundry.o11y.hanzo.ai/metastore-postgres-binary-path: /usr/bin/postgres
-> ```
-
-#### 3. What runs (moldings)
-
-_Moldings_ are the pieces (Hanzo O11y, ingester, ClickHouse, etc.). Foundry has defaults for all of them; add a block under `spec` when you want to change one.
-
-| Molding key in `spec` | Component |
-| --------------------- | --------- |
-| `o11y` | Hanzo O11y |
-| `ingester` | OTel Collector (ingestion & processing) |
-| `telemetrystore` | ClickHouse (logs, traces, metrics) |
-| `telemetrykeeper` | ClickHouse Keeper (coordination) |
-| `metastore` | Metadata store (PostgreSQL or SQLite) |
-
-Angle brackets are placeholders: swap `` for your ID, and pick valid `mode` / `flavor` / `platform` from the table above.
-
-```yaml
-apiVersion: v1alpha1
-metadata:
- name:
- annotations: {} # optional; required for systemd with binary paths
-spec:
- deployment:
- mode:
- flavor:
- platform: # optional
- # Override only what you need:
- o11y:
- spec: { ... }
- ingester:
- spec: { ... }
- telemetrystore:
- spec: { ... }
- telemetrykeeper:
- spec: { ... }
- metastore:
- kind: postgres # or sqlite
- spec: { ... }
-```
-
-#### 4. How it’s configured (molding spec)
-
-Override a molding by giving it a `spec` block. Whatever you set gets merged with Foundry's defaults.
-
-**Fields you'll see:**
-
-| Field | Meaning |
-| ------------------- | ------- |
-| `enabled` | Turn the component on/off (default: `true`) |
-| `image` | Container image (Docker mode) |
-| `version` | Version label (for example, for systemd or tagging) |
-| `cluster.replicas` | Number of replicas |
-| `cluster.shards` | Shards (TelemetryStore only) |
-| `env` | Environment variables (key/value map) |
-| `config.data` | Config files: **filename → file contents** |
-
-#### 5. Run it
-
-When the file's done:
-
-1. Run:
-
- ```shell
- foundry cast -f casting.yaml
- ```
-
-2. Foundry merges your overrides with defaults and writes out the artifacts (Compose files, systemd units, or Render blueprint, depending on what you picked).
-
-That's it. The casting file is the source of truth; Foundry does the rest.
-
-## Examples
-
-**Minimal: Docker Compose, all defaults:**
-
-```yaml
-apiVersion: v1alpha1
-metadata:
- name: o11y
-spec:
- deployment:
- mode: docker
- flavor: compose
-```
-
-**Same, with a few overrides (images, scaling, env):**
-
-```yaml
-apiVersion: v1alpha1
-metadata:
- name: o11y
-spec:
- deployment:
- mode: docker
- flavor: compose
- o11y:
- spec:
- image: ghcr.io/hanzoai/o11y:v0.110.0
- telemetrystore:
- spec:
- image: ghcr.io/hanzoai/datastore:25.5.6
- cluster:
- replicas: 1
- shards: 1
-```
diff --git a/docs/concepts/annotations.md b/docs/concepts/annotations.md
new file mode 100644
index 0000000..bdda900
--- /dev/null
+++ b/docs/concepts/annotations.md
@@ -0,0 +1,58 @@
+# Annotations
+
+Annotations are key-value pairs in `metadata.annotations` that provide deployment-specific configuration to Foundry. They are inputs to the generation process - Foundry reads them during forge and uses them to populate templates and configure behavior.
+
+## How annotations work
+
+Annotations live in the casting file's metadata block:
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+ annotations:
+ foundry.signoz.io/some-key: some-value
+spec:
+ deployment:
+ mode: systemd
+ flavor: binary
+```
+
+During forge, Foundry reads annotation values and injects them into the generated output. For example, systemd annotations set binary paths in the generated `.service` files. ECS annotations populate Terraform variables in the generated `terraform.tfvars.json`.
+
+## Annotations vs patches
+
+Annotations and patches serve different roles in the generation pipeline:
+
+| | Annotations | Patches |
+|---|---|---|
+| **Where** | `metadata.annotations` | `spec.patches` |
+| **When** | Before generation - Foundry reads them as input | After generation - Foundry applies them to output |
+| **What** | Deployment-specific parameters (paths, IDs, ARNs) that Foundry needs to generate files correctly | Modifications to already-generated files (resource limits, storage classes, scheduling) |
+| **Validated** | Yes - Foundry reads and uses them during template execution | No - Foundry passes them through as-is |
+
+In short: annotations tell Foundry *how to generate*, patches tell Foundry *what to change after generating*.
+
+### When to use which
+
+Use **annotations** when Foundry needs the value during generation. These are typically infrastructure identifiers, file paths, or settings that determine the shape of the generated output. You cannot achieve the same result with patches because the value must exist before files are generated.
+
+Use **patches** when you want to modify a generated file after the fact. These are typically platform-specific tuning (resource limits, scheduling, service types) that Foundry doesn't need to understand.
+
+## Which castings use annotations
+
+Not all deployment modes require annotations. Most modes (Docker Compose, Docker Swarm, Kubernetes Kustomize, Render, Coolify, Railway) work with just `metadata.name` and `spec.deployment`.
+
+| Casting | Required | Annotations |
+|---|---|---|
+| [Systemd (binary)](../examples/systemd/binary/) | Yes | Binary paths for SigNoz, ingester, and PostgreSQL |
+| [ECS EC2 (Terraform)](../examples/ecs/ec2/terraform/) | Yes | AWS region, cluster ID, subnets, security groups, IAM roles, S3 bucket |
+| [Kubernetes (Helm)](../examples/kubernetes/helm/) | No | Optional chart repo and chart name overrides |
+
+For the complete list of annotation keys and their descriptions, see [Casting File Reference](../reference/casting-file.md#annotations).
+
+## Next steps
+
+- [Patches](patches.md) - post-generation modifications
+- [Casting](casting.md) - the full casting file structure
+- [Casting file reference](../reference/casting-file.md#annotations) - complete annotation reference
diff --git a/docs/concepts/casting.md b/docs/concepts/casting.md
new file mode 100644
index 0000000..7a736fa
--- /dev/null
+++ b/docs/concepts/casting.md
@@ -0,0 +1,144 @@
+# Casting
+
+A casting is one YAML file that describes a complete SigNoz deployment. Foundry reads it, merges your overrides with built-in defaults, and generates everything needed to run the stack.
+
+The casting file is the single source of truth for your deployment. You define what you want; Foundry handles the rest.
+
+## Structure
+
+A casting has five parts:
+
+1. **Metadata** - name your deployment and set annotations
+2. **Deployment target** - where it runs (Docker, Kubernetes, systemd, cloud platform)
+3. **Moldings** - which components to include and how to configure them
+4. **Annotations** - deployment-specific parameters Foundry reads during generation
+5. **Patches** - platform-level overrides on the generated output
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name:
+spec:
+ deployment:
+ mode:
+ flavor:
+ platform: # only for cloud platforms
+ signoz:
+ spec: { ... }
+ ingester:
+ spec: { ... }
+ telemetrystore:
+ spec: { ... }
+ telemetrykeeper:
+ spec: { ... }
+ metastore:
+ kind: postgres # or sqlite
+ spec: { ... }
+ patches: [ ... ]
+```
+
+Replace `` with an identifier for this deployment (for example, `signoz-prod`). This name is used as a prefix in generated service names.
+
+## Metadata
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz-prod
+ annotations: {} # optional; required for some deployment modes
+```
+
+`name` is required. Short, environment-specific names work best since they end up in generated service names.
+
+`annotations` is optional for most deployment modes. Some modes (systemd, ECS, Helm) use annotations to pass deployment-specific parameters. See [Annotations](annotations.md) for when and how to use them.
+
+## Deployment target
+
+`spec.deployment` tells Foundry how you're deploying. It picks the right generator and produces the right artifacts.
+
+```yaml
+spec:
+ deployment:
+ mode: docker
+ flavor: compose
+```
+
+Each row below is a valid combination. Mixing values across rows is not supported.
+
+| Target | `mode` | `flavor` | `platform` |
+|---|---|---|---|
+| Docker Compose | `docker` | `compose` | - |
+| Docker Swarm | `docker` | `swarm` | - |
+| Systemd (binary) | `systemd` | `binary` | - |
+| Kubernetes (Kustomize) | `kubernetes` | `kustomize` | - |
+| Kubernetes (Helm) | `kubernetes` | `helm` | - |
+| Render | - | `blueprint` | `render` |
+| Coolify | - | `stack` | `coolify` |
+| Railway | - | `template` | `railway` |
+| AWS ECS (EC2) | `ec2` | `terraform` | `ecs` |
+
+> [!TIP]
+> Run `foundryctl gen examples` to generate a working `casting.yaml` for every supported deployment mode.
+
+## Moldings
+
+Moldings are the individual components of a SigNoz deployment. Foundry has defaults for all of them. Add a block under `spec` only when you want to change something.
+
+See [Moldings](moldings.md) for details on each component and how to configure them.
+
+## Annotations
+
+Annotations provide deployment-specific parameters that Foundry reads during generation. They are inputs to the pipeline, not modifications to the output.
+
+Most deployment modes don't require annotations. Systemd and ECS do. Helm supports optional chart overrides.
+
+See [Annotations](annotations.md) for the full guide, including how annotations differ from patches.
+
+## Patches
+
+Patches let you customize any generated output file without Foundry needing to model every platform-specific field. They use JSON Patch (RFC 6902) operations.
+
+See [Patches](patches.md) for the full guide.
+
+## Minimal example
+
+Docker Compose with all defaults:
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ mode: docker
+ flavor: compose
+```
+
+With overrides for images and scaling:
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ mode: docker
+ flavor: compose
+ signoz:
+ spec:
+ image: signoz/signoz:v0.110.0
+ telemetrystore:
+ spec:
+ image: clickhouse/clickhouse-server:25.5.6
+ cluster:
+ replicas: 1
+ shards: 1
+```
+
+## Next steps
+
+- [Moldings](moldings.md) - configure individual components
+- [Annotations](annotations.md) - deployment-specific parameters
+- [Patches](patches.md) - platform-level overrides
+- [Casting file reference](../reference/casting-file.md) - complete field-by-field reference
+- [Examples](../examples/) - working examples for every deployment mode
diff --git a/docs/concepts/moldings.md b/docs/concepts/moldings.md
new file mode 100644
index 0000000..7f7a5a3
--- /dev/null
+++ b/docs/concepts/moldings.md
@@ -0,0 +1,107 @@
+# Moldings
+
+Moldings are the individual components that make up a SigNoz deployment. Each molding maps to a service (ClickHouse, PostgreSQL, OTel Collector, etc.) and generates the configuration and deployment files for that service.
+
+Foundry ships with sensible defaults for every molding. Override only what you need by adding a block under `spec` in your casting.
+
+## Components
+
+| Key in `spec` | Component | Role |
+|---|---|---|
+| `telemetrykeeper` | ClickHouse Keeper | Cluster coordination for ClickHouse |
+| `telemetrystore` | ClickHouse | Stores logs, traces, and metrics |
+| `metastore` | PostgreSQL or SQLite | Stores metadata (dashboards, alerts, users) |
+| `signoz` | SigNoz | UI and API server |
+| `ingester` | SigNoz OTel Collector | Receives, processes, and writes telemetry data |
+
+### Processing order
+
+Foundry processes moldings in dependency order during forge:
+
+```
+TelemetryKeeper -> TelemetryStore -> MetaStore -> SigNoz -> Ingester
+```
+
+This ensures each component's configuration can reference its dependencies.
+
+## Configuring a molding
+
+Override a molding by giving it a `spec` block. Whatever you set gets merged with Foundry's defaults.
+
+```yaml
+spec:
+ telemetrystore:
+ spec:
+ image: clickhouse/clickhouse-server:25.5.6
+ cluster:
+ replicas: 1
+ shards: 1
+```
+
+### Spec fields
+
+| Field | Description |
+|---|---|
+| `enabled` | Turn the component on or off (default: `true`) |
+| `image` | Container image (Docker and Kubernetes modes) |
+| `version` | Version label (systemd mode, tagging) |
+| `cluster.replicas` | Number of replicas |
+| `cluster.shards` | Number of shards (TelemetryStore only) |
+| `env` | Environment variables as a key-value map |
+| `config.data` | Config file overrides: filename to file contents |
+
+### Disabling a molding
+
+Set `enabled: false` to exclude a component from the deployment:
+
+```yaml
+spec:
+ telemetrykeeper:
+ spec:
+ enabled: false
+```
+
+### Custom config files
+
+Use `config.data` to override the contents of a component's config files. The key is the filename; the value is the file contents.
+
+```yaml
+spec:
+ ingester:
+ spec:
+ config:
+ data:
+ ingester.yaml: |
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: 0.0.0.0:4317
+```
+
+> [!NOTE]
+> `config.data` overrides application-level config files that Foundry understands and manages. For platform-level files (compose files, service units, Kubernetes manifests), use [patches](patches.md) instead.
+
+### MetaStore kind
+
+The metastore supports two backends. Set the `kind` field to choose:
+
+```yaml
+spec:
+ metastore:
+ kind: postgres # default
+ spec:
+ image: postgres:16
+```
+
+| Kind | Backend | Notes |
+|---|---|---|
+| `postgres` | PostgreSQL | Default. Recommended for production. |
+| `sqlite` | SQLite | Embedded, no external dependency. Single-node only. |
+
+## Next steps
+
+- [Casting](casting.md) - the full casting file structure
+- [Annotations](annotations.md) - deployment-specific parameters
+- [Patches](patches.md) - platform-level overrides on generated files
+- [Casting file reference](../reference/casting-file.md) - complete field reference
diff --git a/docs/concepts/patches.md b/docs/concepts/patches.md
new file mode 100644
index 0000000..dea50f1
--- /dev/null
+++ b/docs/concepts/patches.md
@@ -0,0 +1,120 @@
+# Patches
+
+Patches let you customize any generated output file using JSON Patch (RFC 6902) operations. They are applied during forge, after Foundry generates materials and before writing to `pours/`.
+
+## Two-tier model
+
+Foundry separates configuration into two layers:
+
+- **`spec.`** is the application domain. Foundry understands, validates, and enriches it.
+- **`spec.patches`** is the platform domain. Foundry applies it as-is, no validation.
+
+This gives you full coverage over the generated output without Foundry needing to model every platform-specific field. Use `spec.` for component configuration (images, replicas, env, config files). Use `patches` for everything else (resource limits, storage classes, service types, scheduling constraints).
+
+## Patch entry fields
+
+| Field | Required | Description |
+|---|---|---|
+| `type` | No | Patch driver. Defaults to `jsonpatch`. |
+| `target` | Yes | Output file to patch. Supports exact path, basename, or glob. |
+| `operations` | Yes | List of JSON Patch (RFC 6902) operations. |
+
+## JSON Patch operations
+
+| Operation | Description | Required fields |
+|---|---|---|
+| `add` | Add a value at path. Append to array with `/-`. | `op`, `path`, `value` |
+| `remove` | Remove the value at path. | `op`, `path` |
+| `replace` | Replace the value at path. Path must exist. | `op`, `path`, `value` |
+| `move` | Move a value from one path to another. | `op`, `from`, `path` |
+| `copy` | Copy a value from one path to another. | `op`, `from`, `path` |
+| `test` | Assert a value equals the given value. Fails if not. | `op`, `path`, `value` |
+
+## Target matching
+
+- **Exact path:** `target: "deployment/compose.yaml"`
+- **Glob:** `target: "deployment/telemetrystore-*.yaml"` matches multiple files
+
+> [!TIP]
+> Run `foundryctl forge` first without patches to see the generated file names and structure, then write patches against them.
+
+## Examples
+
+### Docker Compose
+
+Set a memory limit on ClickHouse and add a custom environment variable to SigNoz:
+
+```yaml
+spec:
+ patches:
+ - target: "compose.yaml"
+ operations:
+ - op: replace
+ path: /services/clickhouse/mem_limit
+ value: "4G"
+ - op: add
+ path: /services/signoz/environment/-
+ value: "CUSTOM_VAR=value"
+```
+
+### Systemd
+
+Change the restart policy and add a memory limit on a service unit:
+
+```yaml
+spec:
+ patches:
+ - target: "signoz-ingester.service"
+ operations:
+ - op: replace
+ path: /Service/Restart
+ value: always
+ - op: add
+ path: /Service/MemoryMax
+ value: "4G"
+```
+
+### Kubernetes (Kustomize)
+
+Set resource limits on ClickHouse:
+
+```yaml
+spec:
+ patches:
+ - target: "deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml"
+ operations:
+ - op: replace
+ path: /spec/templates/podTemplates/0/spec/containers/0/resources
+ value:
+ requests:
+ cpu: "2"
+ memory: "4Gi"
+ limits:
+ cpu: "4"
+ memory: "8Gi"
+```
+
+For complete Kubernetes examples with storage classes, tolerations, nodeSelector, and LoadBalancer configuration, see:
+- [Kustomize with patches](../examples/kubernetes/kustomize-patches/)
+- [Helm with patches](../examples/kubernetes/helm-patches/)
+
+## When to use patches vs config.data
+
+| Use case | Use |
+|---|---|
+| Application config files (OTel Collector config, ClickHouse config) | `config.data` in the molding spec |
+| Platform files (compose files, service units, Kubernetes manifests, Helm values) | `spec.patches` |
+
+> [!NOTE]
+> Config files like `otel-collector-config.yaml` or `clickhouse-config.yaml` don't need patches. Use `config.data` in the [molding spec](moldings.md#custom-config-files) instead.
+
+## Patches vs annotations
+
+Patches modify generated output *after* generation. [Annotations](annotations.md) provide parameters *before* generation. If Foundry needs a value to generate files correctly (binary paths, AWS resource IDs), use annotations. If you want to tweak something in the generated output (resource limits, service types), use patches.
+
+## Next steps
+
+- [Annotations](annotations.md) - deployment-specific parameters (pre-generation)
+- [Casting](casting.md) - the full casting file structure
+- [Moldings](moldings.md) - component configuration
+- [Casting file reference](../reference/casting-file.md) - complete field reference
diff --git a/docs/examples/README.md b/docs/examples/README.md
new file mode 100644
index 0000000..d44789c
--- /dev/null
+++ b/docs/examples/README.md
@@ -0,0 +1,13 @@
+### Examples
+
+| Platform | Mode | Flavor | Example |
+| --- | --- | --- | --- |
+| - | docker | compose | [docker/compose](docker/compose/) |
+| - | docker | swarm | [docker/swarm](docker/swarm/) |
+| - | kubernetes | helm | [kubernetes/helm](kubernetes/helm/) |
+| - | kubernetes | kustomize | [kubernetes/kustomize](kubernetes/kustomize/) |
+| - | systemd | binary | [systemd/binary](systemd/binary/) |
+| ecs | ec2 | terraform | [ecs/ec2/terraform](ecs/ec2/terraform/) |
+| coolify | - | stack | [coolify/stack](coolify/stack/) |
+| railway | - | template | [railway/template](railway/template/) |
+| render | - | blueprint | [render/blueprint](render/blueprint/) |
diff --git a/docs/examples/README.md.gotmpl b/docs/examples/README.md.gotmpl
new file mode 100644
index 0000000..0c05203
--- /dev/null
+++ b/docs/examples/README.md.gotmpl
@@ -0,0 +1,7 @@
+### Examples
+
+| Platform | Mode | Flavor | Example |
+| --- | --- | --- | --- |
+{{- range .Castings }}
+| {{ or .platform "-" }} | {{ or .mode "-" }} | {{ or .flavor "-" }} | [{{ .example }}]({{ .example }}/) |
+{{- end }}
diff --git a/docs/examples/castings.json b/docs/examples/castings.json
new file mode 100644
index 0000000..ded6771
--- /dev/null
+++ b/docs/examples/castings.json
@@ -0,0 +1,58 @@
+{
+ "Castings": [
+ {
+ "platform": "",
+ "mode": "docker",
+ "flavor": "compose",
+ "example": "docker/compose"
+ },
+ {
+ "platform": "",
+ "mode": "docker",
+ "flavor": "swarm",
+ "example": "docker/swarm"
+ },
+ {
+ "platform": "",
+ "mode": "kubernetes",
+ "flavor": "helm",
+ "example": "kubernetes/helm"
+ },
+ {
+ "platform": "",
+ "mode": "kubernetes",
+ "flavor": "kustomize",
+ "example": "kubernetes/kustomize"
+ },
+ {
+ "platform": "",
+ "mode": "systemd",
+ "flavor": "binary",
+ "example": "systemd/binary"
+ },
+ {
+ "platform": "ecs",
+ "mode": "ec2",
+ "flavor": "terraform",
+ "example": "ecs/ec2/terraform"
+ },
+ {
+ "platform": "coolify",
+ "mode": "",
+ "flavor": "stack",
+ "example": "coolify/stack"
+ },
+ {
+ "platform": "railway",
+ "mode": "",
+ "flavor": "template",
+ "example": "railway/template"
+ },
+ {
+ "platform": "render",
+ "mode": "",
+ "flavor": "blueprint",
+ "example": "render/blueprint"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docs/examples/coolify/README.md b/docs/examples/coolify/README.md
new file mode 100644
index 0000000..fb88e23
--- /dev/null
+++ b/docs/examples/coolify/README.md
@@ -0,0 +1,5 @@
+# Coolify
+
+| Flavor | Description |
+| --- | --- |
+| [stack](stack/) | Deploy SigNoz on Coolify as a stack |
diff --git a/docs/examples/coolify/stack/README.md b/docs/examples/coolify/stack/README.md
new file mode 100644
index 0000000..c0ee3ed
--- /dev/null
+++ b/docs/examples/coolify/stack/README.md
@@ -0,0 +1,50 @@
+# Coolify Stack
+
+| Field | Value |
+| --- | --- |
+| **Mode** | `-` |
+| **Flavor** | `stack` |
+| **Platform** | `coolify` |
+
+## Overview
+
+Generates a `coolify.yaml` stack definition for deploying SigNoz on a Coolify-managed server. Deployment is manual via the Coolify dashboard.
+
+> [!NOTE]
+> `foundryctl cast` does not deploy to Coolify automatically. It generates the files and prints instructions for manual deployment.
+
+## Prerequisites
+
+- A [Coolify](https://coolify.io) instance (self-hosted or cloud)
+
+## Configuration
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: stack
+ platform: coolify
+```
+
+## Deploy
+
+```bash
+# Generate the stack definition
+foundryctl forge -f casting.yaml
+```
+
+After forging, deploy the generated `coolify.yaml` using the [Coolify stack feature](https://coolify.io/docs/knowledge-base/docker/compose).
+
+## Generated output
+
+```text
+pours/deployment/
+ coolify.yaml
+```
+
+## Customization
+
+For changes to the generated `coolify.yaml`, use [patches](../../../concepts/patches.md).
diff --git a/docs/examples/coolify/stack/casting.yaml b/docs/examples/coolify/stack/casting.yaml
new file mode 100644
index 0000000..07456cf
--- /dev/null
+++ b/docs/examples/coolify/stack/casting.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: stack
+ platform: coolify
diff --git a/docs/examples/coolify/stack/casting.yaml.lock b/docs/examples/coolify/stack/casting.yaml.lock
new file mode 100644
index 0000000..31dea54
--- /dev/null
+++ b/docs/examples/coolify/stack/casting.yaml.lock
@@ -0,0 +1,648 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: stack
+ platform: coolify
+ ingester:
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
+ enabled: true
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ image: signoz/signoz-otel-collector:latest
+ version: latest
+ status:
+ addresses:
+ otlp:
+ - tcp://signoz-ingester:4318
+ - tcp://signoz-ingester:4317
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ metastore:
+ kind: postgres
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ image: postgres:16
+ version: "16"
+ status:
+ addresses:
+ dsn:
+ - tcp://signoz-metastore-postgres-0:5432
+ config: {}
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ signoz:
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres-0:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ image: signoz/signoz:latest
+ version: latest
+ status:
+ addresses:
+ apiserver:
+ - tcp://signoz-signoz-0:8080
+ opamp:
+ - ws://signoz-signoz-0:4320
+ config: {}
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres-0:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ telemetrykeeper:
+ kind: clickhousekeeper
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ enabled: true
+ image: clickhouse/clickhouse-keeper:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ client:
+ - tcp://signoz-telemetrykeeper-clickhousekeeper-0:9181
+ raft:
+ - tcp://signoz-telemetrykeeper-clickhousekeeper-0:9234
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ telemetrystore:
+ kind: clickhouse
+ spec:
+ cluster:
+ replicas: 0
+ shards: 1
+ config:
+ data:
+ config-0-0.yaml: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: signoz-telemetrystore-clickhouse-0-0
+ port: 9000
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ enabled: true
+ image: clickhouse/clickhouse-server:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ tcp:
+ - tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ config:
+ data:
+ config-0-0.yaml: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: signoz-telemetrystore-clickhouse-0-0
+ port: 9000
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
diff --git a/docs/examples/coolify/stack/pours/deployment/coolify.yaml b/docs/examples/coolify/stack/pours/deployment/coolify.yaml
new file mode 100644
index 0000000..6ebfd68
--- /dev/null
+++ b/docs/examples/coolify/stack/pours/deployment/coolify.yaml
@@ -0,0 +1,484 @@
+services:
+ ingester:
+ command:
+ - -c
+ - |
+ /signoz-otel-collector migrate sync check &&
+ /signoz-otel-collector --config=/etc/otel-collector-config.yaml --manager-config=/etc/opamp-config.yaml --copy-path=/var/tmp/collector-config.yaml
+ depends_on:
+ signoz-signoz-0:
+ condition: service_started
+ signoz-telemetrystore-clickhouse-0-0:
+ condition: service_healthy
+ signoz-telemetrystore-migrator:
+ condition: service_completed_successfully
+ deploy:
+ replicas: 1
+ entrypoint:
+ - /bin/sh
+ environment:
+ - OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
+ - LOW_CARDINAL_EXCEPTION_GROUPING=false
+ - SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
+ image: signoz/signoz-otel-collector:latest
+ logging:
+ options:
+ max-file: "3"
+ max-size: 50m
+ networks:
+ default:
+ aliases:
+ - signoz-ingester
+ volumes:
+ - content: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ source: ./configs/ingester/ingester.yaml
+ target: /etc/otel-collector-config.yaml
+ type: bind
+ - content: |
+ server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
+ source: ./configs/ingester/opamp.yaml
+ target: /etc/opamp-config.yaml
+ type: bind
+ signoz-metastore-postgres-0:
+ environment:
+ - POSTGRES_USER=signoz
+ - POSTGRES_PASSWORD=signoz
+ - POSTGRES_DB=signoz
+ healthcheck:
+ interval: 30s
+ retries: 3
+ test:
+ - CMD-SHELL
+ - pg_isready -U signoz -d signoz
+ timeout: 5s
+ image: postgres:16
+ logging:
+ options:
+ max-file: "3"
+ max-size: 50m
+ volumes:
+ - source: signoz-metastore-0-data
+ target: /var/lib/postgresql/data
+ type: volume
+ signoz-signoz-0:
+ container_name: signoz-signoz-0
+ depends_on:
+ signoz-metastore-postgres-0:
+ condition: service_healthy
+ signoz-telemetrystore-clickhouse-0-0:
+ condition: service_healthy
+ signoz-telemetrystore-migrator:
+ condition: service_completed_successfully
+ environment:
+ - SIGNOZ_SQLSTORE_POSTGRES_DSN=postgres://signoz:signoz@signoz-metastore-postgres-0:5432/signoz?sslmode=disable
+ - SIGNOZ_SQLSTORE_PROVIDER=postgres
+ - SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ - SIGNOZ_TELEMETRYSTORE_PROVIDER=clickhouse
+ healthcheck:
+ interval: 30s
+ retries: 3
+ test:
+ - CMD
+ - wget
+ - --spider
+ - -q
+ - localhost:8080/api/v1/health
+ timeout: 5s
+ image: signoz/signoz:latest
+ logging:
+ options:
+ max-file: "3"
+ max-size: 50m
+ volumes:
+ - source: signoz-signoz-0-data
+ target: /var/lib/signoz/
+ type: volume
+ signoz-telemetrykeeper-clickhousekeeper-0:
+ entrypoint:
+ - /usr/bin/clickhouse-keeper
+ - --config-file=/etc/clickhouse-keeper/keeper.yaml
+ healthcheck:
+ interval: 30s
+ retries: 3
+ start_period: 40s
+ test:
+ - CMD
+ - clickhouse-keeper-client
+ - -h
+ - localhost
+ - -p
+ - "9181"
+ - -q
+ - ls
+ timeout: 10s
+ image: clickhouse/clickhouse-keeper:25.5.6
+ logging:
+ options:
+ max-file: "3"
+ max-size: 50m
+ volumes:
+ - source: signoz-telemetrykeeper-0-data
+ target: /var/lib/clickhouse-keeper
+ type: volume
+ - content: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ source: ./configs/telemetrykeeper/keeper-0.yaml
+ target: /etc/clickhouse-keeper/keeper.yaml
+ type: bind
+ signoz-telemetrystore-clickhouse-0-0:
+ depends_on:
+ signoz-telemetrykeeper-clickhousekeeper-0:
+ condition: service_healthy
+ signoz-telemetrystore-clickhouse-user-scripts:
+ condition: service_completed_successfully
+ environment:
+ - CLICKHOUSE_SKIP_USER_SETUP=1
+ - CLICKHOUSE_CONFIG=/etc/clickhouse-server/config.yaml
+ healthcheck:
+ interval: 30s
+ retries: 3
+ test:
+ - CMD
+ - wget
+ - --spider
+ - -q
+ - 0.0.0.0:8123/ping
+ timeout: 5s
+ image: clickhouse/clickhouse-server:25.5.6
+ logging:
+ options:
+ max-file: "3"
+ max-size: 50m
+ volumes:
+ - source: signoz-telemetrystore-0-0-data
+ target: /var/lib/clickhouse/
+ type: volume
+ - read_only: true
+ source: signoz-telemetrystore-user-scripts
+ target: /var/lib/clickhouse/user_scripts
+ type: volume
+ - content: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: signoz-telemetrystore-clickhouse-0-0
+ port: 9000
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ source: ./configs/telemetrystore/config-0-0.yaml
+ target: /etc/clickhouse-server/config.yaml
+ type: bind
+ - content: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ source: ./configs/telemetrystore/functions.yaml
+ target: /etc/clickhouse-server/functions.yaml
+ type: bind
+ signoz-telemetrystore-clickhouse-user-scripts:
+ command:
+ - bash
+ - -c
+ - |
+ version="v0.0.1"
+ node_os=$$(uname -s | tr '[:upper:]' '[:lower:]')
+ node_arch=$$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
+ echo "Fetching histogram-binary for $${node_os}/$${node_arch}"
+ cd /tmp
+ wget -O histogram-quantile.tar.gz "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F$${version}/histogram-quantile_$${node_os}_$${node_arch}.tar.gz"
+ tar -xvzf histogram-quantile.tar.gz
+ mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
+ exclude_from_hc: true
+ image: clickhouse/clickhouse-server:25.5.6
+ logging:
+ options:
+ max-file: "3"
+ max-size: 50m
+ restart: "no"
+ volumes:
+ - source: signoz-telemetrystore-user-scripts
+ target: /var/lib/clickhouse/user_scripts
+ type: volume
+ signoz-telemetrystore-migrator:
+ command:
+ - /signoz-otel-collector migrate bootstrap --clickhouse-dsn tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ - /signoz-otel-collector migrate sync up --clickhouse-dsn tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ - /signoz-otel-collector migrate async up --clickhouse-dsn tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ depends_on:
+ signoz-telemetrystore-clickhouse-0-0:
+ condition: service_healthy
+ entrypoint:
+ - /bin/sh
+ - -c
+ environment:
+ - SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
+ exclude_from_hc: true
+ image: signoz/signoz-otel-collector:latest
+ logging:
+ options:
+ max-file: "3"
+ max-size: 50m
+ restart: on-failure
+volumes:
+ signoz-metastore-0-data:
+ name: signoz-metastore-0-data
+ signoz-signoz-0-data:
+ name: signoz-signoz-0-data
+ signoz-telemetrykeeper-0-data:
+ name: signoz-telemetrykeeper-0-data
+ signoz-telemetrystore-0-0-data:
+ name: signoz-telemetrystore-0-0-data
+ signoz-telemetrystore-user-scripts:
+ name: signoz-telemetrystore-user-scripts
diff --git a/docs/examples/docker/README.md b/docs/examples/docker/README.md
new file mode 100644
index 0000000..592c01c
--- /dev/null
+++ b/docs/examples/docker/README.md
@@ -0,0 +1,6 @@
+# Docker
+
+| Flavor | Description |
+| --- | --- |
+| [compose](compose/) | Single-node Docker Compose deployment |
+| [swarm](swarm/) | Multi-node Docker Swarm cluster |
diff --git a/docs/examples/docker/compose/README.md b/docs/examples/docker/compose/README.md
new file mode 100644
index 0000000..22e8b5a
--- /dev/null
+++ b/docs/examples/docker/compose/README.md
@@ -0,0 +1,85 @@
+# Docker Compose
+
+| Field | Value |
+| --- | --- |
+| **Mode** | `docker` |
+| **Flavor** | `compose` |
+| **Platform** | `-` |
+
+## Overview
+
+Deploys SigNoz using Docker Compose with all Foundry defaults. This is the simplest way to run SigNoz locally or on a single node.
+
+## Prerequisites
+
+- Docker Engine 20.10+
+- Docker Compose v2
+
+## Configuration
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: compose
+ mode: docker
+```
+
+## Deploy
+
+```bash
+foundryctl cast -f casting.yaml
+```
+
+Or step by step:
+
+```bash
+# Validate prerequisites
+foundryctl gauge -f casting.yaml
+
+# Generate compose files
+foundryctl forge -f casting.yaml
+
+# Start the stack
+cd pours/deployment && docker compose up -d
+```
+
+## Generated output
+
+```text
+pours/deployment/
+ compose.yaml
+ configs/
+ ingester/
+ ingester.yaml
+ opamp.yaml
+ telemetrykeeper/
+ clickhousekeeper/
+ keeper-0.yaml
+ telemetrystore/
+ clickhouse/
+ config.yaml
+ functions.yaml
+```
+
+## After deployment
+
+```bash
+# Check running containers
+docker ps
+
+# View logs for a specific service
+docker compose -f pours/deployment/compose.yaml logs -f signoz
+
+# Stop the stack
+cd pours/deployment && docker compose down
+```
+
+> [!NOTE]
+> - `foundryctl cast` detects whether `docker compose` (v2 plugin) or `docker-compose` (legacy standalone) is available and uses whichever it finds, preferring the v2 plugin.
+
+## Customization
+
+Override component images, replicas, or environment variables in the casting spec. For platform-level changes to the generated `compose.yaml` (memory limits, networks, volumes), use [patches](../../../concepts/patches.md).
diff --git a/docs/examples/docker/compose/casting.yaml b/docs/examples/docker/compose/casting.yaml
index 2f57ae0..e05f7f0 100644
--- a/docs/examples/docker/compose/casting.yaml
+++ b/docs/examples/docker/compose/casting.yaml
@@ -1,4 +1,5 @@
apiVersion: v1alpha1
+kind: Installation
metadata:
name: o11y
spec:
diff --git a/docs/examples/docker/compose/casting.yaml.lock b/docs/examples/docker/compose/casting.yaml.lock
index f0fbeed..d934011 100644
--- a/docs/examples/docker/compose/casting.yaml.lock
+++ b/docs/examples/docker/compose/casting.yaml.lock
@@ -1,4 +1,5 @@
apiVersion: v1alpha1
+kind: Installation
metadata:
name: o11y
spec:
@@ -28,9 +29,9 @@ spec:
endpoint: "0.0.0.0:4318"
processors:
batch:
- send_batch_size: 20000
- send_batch_max_size: 25000
- timeout: 1s
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
@@ -90,6 +91,12 @@ spec:
timeout: 45s
sending_queue:
enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
extensions:
o11y_health_check:
endpoint: "0.0.0.0:13133"
@@ -163,9 +170,9 @@ spec:
endpoint: "0.0.0.0:4318"
processors:
batch:
- send_batch_size: 20000
- send_batch_max_size: 25000
- timeout: 1s
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
@@ -225,6 +232,12 @@ spec:
timeout: 45s
sending_queue:
enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
extensions:
o11y_health_check:
endpoint: "0.0.0.0:13133"
@@ -337,6 +350,9 @@ spec:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
@@ -368,6 +384,9 @@ spec:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
@@ -385,7 +404,7 @@ spec:
shards: 1
config:
data:
- config.yaml: |
+ config-0-0.yaml: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
@@ -405,13 +424,13 @@ spec:
level: information
size: 1000M
macros:
- replica: "01"
- shard: "01"
+ replica: "00"
+ shard: "00"
profiles:
default:
+ allow_simdjson: 0
load_balancing: random
log_queries: 1
- max_memory_usage: 10000000000
quotas:
default:
interval:
@@ -434,6 +453,40 @@ spec:
node:
- host: o11y-telemetrykeeper-clickhousekeeper-0
port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
@@ -471,7 +524,7 @@ spec:
- tcp://o11y-telemetrystore-clickhouse-0-0:9000
config:
data:
- config.yaml: |
+ config-0-0.yaml: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
@@ -491,13 +544,13 @@ spec:
level: information
size: 1000M
macros:
- replica: "01"
- shard: "01"
+ replica: "00"
+ shard: "00"
profiles:
default:
+ allow_simdjson: 0
load_balancing: random
log_queries: 1
- max_memory_usage: 10000000000
quotas:
default:
interval:
@@ -520,6 +573,40 @@ spec:
node:
- host: o11y-telemetrykeeper-clickhousekeeper-0
port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
diff --git a/docs/examples/docker/compose/pours/deployment/compose.yaml b/docs/examples/docker/compose/pours/deployment/compose.yaml
index 55c11a2..59517b9 100644
--- a/docs/examples/docker/compose/pours/deployment/compose.yaml
+++ b/docs/examples/docker/compose/pours/deployment/compose.yaml
@@ -1,3 +1,4 @@
+name: signoz
networks:
o11y-network:
name: o11y-network
@@ -45,7 +46,7 @@ services:
- CMD-SHELL
- pg_isready -U o11y -d o11y
timeout: 10s
- image: docker.io/postgres:16
+ image: postgres:16
networks:
- o11y-network
volumes:
@@ -57,7 +58,8 @@ services:
o11y-telemetrystore-clickhouse-0-0:
condition: service_healthy
deploy:
- replicas: 1
+ restart_policy:
+ condition: on-failure
environment:
- HANZO_ALERTMANAGER_PROVIDER=o11y
- HANZO_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://o11y-telemetrystore-clickhouse-0-0:9000
@@ -77,7 +79,7 @@ services:
- wget
- --spider
- -q
- - http://localhost:3301/api/v1/health
+ - http://localhost:8080/api/v1/health
timeout: 10s
image: ghcr.io/hanzoai/o11y:latest
networks:
diff --git a/docs/examples/docker/compose/pours/deployment/configs/ingester/opamp.yaml b/docs/examples/docker/compose/pours/deployment/configs/ingester/opamp.yaml
deleted file mode 100644
index 4073483..0000000
--- a/docs/examples/docker/compose/pours/deployment/configs/ingester/opamp.yaml
+++ /dev/null
@@ -1 +0,0 @@
-server_endpoint: ws://o11y-o11y:4320/v1/opamp
diff --git a/docs/examples/docker/compose/pours/deployment/configs/ingester/ingester.yaml b/docs/examples/docker/compose/pours/deployment/ingester/ingester.yaml
similarity index 97%
rename from docs/examples/docker/compose/pours/deployment/configs/ingester/ingester.yaml
rename to docs/examples/docker/compose/pours/deployment/ingester/ingester.yaml
index f7df397..4cfa3da 100644
--- a/docs/examples/docker/compose/pours/deployment/configs/ingester/ingester.yaml
+++ b/docs/examples/docker/compose/pours/deployment/ingester/ingester.yaml
@@ -36,9 +36,9 @@ extensions:
endpoint: 0.0.0.0:13133
processors:
batch:
- send_batch_max_size: 25000
- send_batch_size: 20000
- timeout: 1s
+ send_batch_max_size: 55000
+ send_batch_size: 50000
+ timeout: 5s
batch/meter:
send_batch_max_size: 25000
send_batch_size: 20000
diff --git a/docs/examples/docker/compose/pours/deployment/ingester/opamp.yaml b/docs/examples/docker/compose/pours/deployment/ingester/opamp.yaml
new file mode 100644
index 0000000..2672ddb
--- /dev/null
+++ b/docs/examples/docker/compose/pours/deployment/ingester/opamp.yaml
@@ -0,0 +1 @@
+server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
diff --git a/docs/examples/docker/compose/pours/deployment/telemetrykeeper/clickhousekeeper/keeper-0.yaml b/docs/examples/docker/compose/pours/deployment/telemetrykeeper/clickhousekeeper/keeper-0.yaml
new file mode 100644
index 0000000..5c1e6fc
--- /dev/null
+++ b/docs/examples/docker/compose/pours/deployment/telemetrykeeper/clickhousekeeper/keeper-0.yaml
@@ -0,0 +1,22 @@
+keeper_server:
+ coordination_settings:
+ force_sync: false
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ four_letter_word_white_list: '*'
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-telemetrykeeper-clickhousekeeper-0
+ id: 0
+ port: 9234
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+listen_host: 0.0.0.0
+logger:
+ console: true
+ level: information
diff --git a/docs/examples/docker/compose/pours/deployment/configs/telemetrystore/config.yaml b/docs/examples/docker/compose/pours/deployment/telemetrystore/clickhouse/config-0-0.yaml
similarity index 54%
rename from docs/examples/docker/compose/pours/deployment/configs/telemetrystore/config.yaml
rename to docs/examples/docker/compose/pours/deployment/telemetrystore/clickhouse/config-0-0.yaml
index 38bdaff..8e9ac45 100644
--- a/docs/examples/docker/compose/pours/deployment/configs/telemetrystore/config.yaml
+++ b/docs/examples/docker/compose/pours/deployment/telemetrystore/clickhouse/config-0-0.yaml
@@ -1,10 +1,16 @@
+asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
dictionaries_config: '*_dictionary.xml'
display_name: cluster
distributed_ddl:
path: /clickhouse/task_queue/ddl
+error_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
format_schema_path: /var/lib/clickhouse/format_schemas/
http_port: 8123
interserver_http_port: 9009
+latency_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
listen_host: 0.0.0.0
logger:
console: 1
@@ -14,14 +20,32 @@ logger:
level: information
size: 1000M
macros:
- replica: "01"
- shard: "01"
+ replica: "00"
+ shard: "00"
+metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
path: /var/lib/clickhouse/
+processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
profiles:
default:
+ allow_simdjson: 0
load_balancing: random
log_queries: 1
- max_memory_usage: 10000000000
+query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
quotas:
default:
interval:
@@ -37,8 +61,16 @@ remote_servers:
- replica:
host: o11y-telemetrystore-clickhouse-0-0
port: 9000
+session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
tcp_port: 9000
+text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
tmp_path: /var/lib/clickhouse/tmp/
+trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
user_defined_executable_functions_config: '*function.yaml'
user_directories:
users_xml:
@@ -60,3 +92,5 @@ zookeeper:
node:
- host: o11y-telemetrykeeper-clickhousekeeper-0
port: 9181
+zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
diff --git a/docs/examples/docker/compose/pours/deployment/configs/telemetrystore/functions.yaml b/docs/examples/docker/compose/pours/deployment/telemetrystore/clickhouse/functions.yaml
similarity index 100%
rename from docs/examples/docker/compose/pours/deployment/configs/telemetrystore/functions.yaml
rename to docs/examples/docker/compose/pours/deployment/telemetrystore/clickhouse/functions.yaml
diff --git a/docs/examples/docker/swarm/README.md b/docs/examples/docker/swarm/README.md
new file mode 100644
index 0000000..e81b5a4
--- /dev/null
+++ b/docs/examples/docker/swarm/README.md
@@ -0,0 +1,79 @@
+# Docker Swarm
+
+| Field | Value |
+| --- | --- |
+| **Mode** | `docker` |
+| **Flavor** | `swarm` |
+| **Platform** | `-` |
+
+## Overview
+
+Deploys SigNoz on a Docker Swarm cluster. Foundry generates a Compose file and deploys it as a stack using `docker stack deploy`.
+
+## Prerequisites
+
+- Docker Engine 20.10+ with Swarm mode initialized (`docker swarm init`)
+- At least one manager node
+
+## Configuration
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: swarm
+ mode: docker
+```
+
+## Deploy
+
+```bash
+foundryctl cast -f casting.yaml
+```
+
+Or step by step:
+
+```bash
+# Generate the compose file
+foundryctl forge -f casting.yaml
+
+# Deploy manually
+docker stack deploy -c pours/deployment/compose.yaml signoz
+```
+
+## Generated output
+
+```text
+pours/deployment/
+ compose.yaml
+ configs/
+ ingester/
+ ingester.yaml
+ opamp.yaml
+ telemetrykeeper/
+ clickhousekeeper/
+ keeper-0.yaml
+ telemetrystore/
+ clickhouse/
+ config.yaml
+ functions.yaml
+```
+
+## After deployment
+
+```bash
+# List services in the stack
+docker stack services signoz
+
+# View logs for a service
+docker service logs signoz_signoz -f
+
+# Remove the stack
+docker stack rm signoz
+```
+
+## Customization
+
+For platform-level changes to the generated `compose.yaml`, use [patches](../../../concepts/patches.md).
diff --git a/docs/examples/docker/swarm/casting.yaml b/docs/examples/docker/swarm/casting.yaml
new file mode 100644
index 0000000..5fb97fb
--- /dev/null
+++ b/docs/examples/docker/swarm/casting.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: swarm
+ mode: docker
diff --git a/docs/examples/docker/swarm/casting.yaml.lock b/docs/examples/docker/swarm/casting.yaml.lock
new file mode 100644
index 0000000..0f633e4
--- /dev/null
+++ b/docs/examples/docker/swarm/casting.yaml.lock
@@ -0,0 +1,648 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: swarm
+ mode: docker
+ ingester:
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
+ enabled: true
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ image: signoz/signoz-otel-collector:latest
+ version: latest
+ status:
+ addresses:
+ otlp:
+ - tcp://signoz-ingester:4318
+ - tcp://signoz-ingester:4317
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ metastore:
+ kind: postgres
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ image: postgres:16
+ version: "16"
+ status:
+ addresses:
+ dsn:
+ - tcp://signoz-metastore-postgres-0:5432
+ config: {}
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ signoz:
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres-0:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ image: signoz/signoz:latest
+ version: latest
+ status:
+ addresses:
+ apiserver:
+ - tcp://signoz-signoz-0:8080
+ opamp:
+ - ws://signoz-signoz-0:4320
+ config: {}
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres-0:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ telemetrykeeper:
+ kind: clickhousekeeper
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ enabled: true
+ image: clickhouse/clickhouse-keeper:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ client:
+ - tcp://signoz-telemetrykeeper-clickhousekeeper-0:9181
+ raft:
+ - tcp://signoz-telemetrykeeper-clickhousekeeper-0:9234
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ telemetrystore:
+ kind: clickhouse
+ spec:
+ cluster:
+ replicas: 0
+ shards: 1
+ config:
+ data:
+ config-0-0.yaml: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: signoz-telemetrystore-clickhouse-0-0
+ port: 9000
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ enabled: true
+ image: clickhouse/clickhouse-server:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ tcp:
+ - tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ config:
+ data:
+ config-0-0.yaml: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: signoz-telemetrystore-clickhouse-0-0
+ port: 9000
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
diff --git a/docs/examples/docker/swarm/pours/deployment/compose.yaml b/docs/examples/docker/swarm/pours/deployment/compose.yaml
new file mode 100644
index 0000000..f8926ee
--- /dev/null
+++ b/docs/examples/docker/swarm/pours/deployment/compose.yaml
@@ -0,0 +1,197 @@
+configs:
+ ingester-config:
+ file: ingester/ingester.yaml
+ manager-config:
+ file: ingester/opamp.yaml
+ telemetrykeeper-0:
+ file: telemetrykeeper/clickhousekeeper/keeper-0.yaml
+ telemetrystore-config-0-0:
+ file: telemetrystore/clickhouse/config-0-0.yaml
+ telemetrystore-functions:
+ file: telemetrystore/clickhouse/functions.yaml
+networks:
+ signoz-network:
+ attachable: true
+ driver: overlay
+ name: signoz-network
+services:
+ ingester:
+ command:
+ - -c
+ - |
+ /signoz-otel-collector migrate sync check &&
+ /signoz-otel-collector --config=/etc/otel-collector-config.yaml --manager-config=/etc/opamp-config.yaml --copy-path=/var/tmp/collector-config.yaml
+ configs:
+ - source: ingester-config
+ target: /etc/otel-collector-config.yaml
+ - source: manager-config
+ target: /etc/opamp-config.yaml
+ deploy:
+ replicas: 1
+ entrypoint:
+ - /bin/sh
+ environment:
+ - SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ - SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
+ image: signoz/signoz-otel-collector:latest
+ networks:
+ signoz-network:
+ aliases:
+ - signoz-ingester
+ ports:
+ - 4317:4317
+ - 4318:4318
+ signoz-metastore-postgres-0:
+ deploy:
+ restart_policy:
+ condition: on-failure
+ environment:
+ - POSTGRES_DB=signoz
+ - POSTGRES_PASSWORD=signoz
+ - POSTGRES_USER=signoz
+ healthcheck:
+ interval: 30s
+ retries: 3
+ start_period: 30s
+ test:
+ - CMD-SHELL
+ - pg_isready -U signoz -d signoz
+ timeout: 10s
+ image: postgres:16
+ networks:
+ - signoz-network
+ volumes:
+ - signoz-metastore-postgres-0-data:/var/lib/postgresql/data
+ signoz-signoz-0:
+ deploy:
+ restart_policy:
+ condition: on-failure
+ environment:
+ - SIGNOZ_SQLSTORE_POSTGRES_DSN=postgres://signoz:signoz@signoz-metastore-postgres-0:5432/signoz?sslmode=disable
+ - SIGNOZ_SQLSTORE_PROVIDER=postgres
+ - SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ - SIGNOZ_TELEMETRYSTORE_PROVIDER=clickhouse
+ healthcheck:
+ interval: 30s
+ retries: 3
+ start_period: 60s
+ test:
+ - CMD
+ - wget
+ - --spider
+ - -q
+ - http://localhost:8080/api/v1/health
+ timeout: 10s
+ image: signoz/signoz:latest
+ networks:
+ - signoz-network
+ ports:
+ - 8080:8080
+ signoz-telemetrykeeper-clickhousekeeper-0:
+ configs:
+ - source: telemetrykeeper-0
+ target: /etc/clickhouse-keeper/keeper.yaml
+ deploy:
+ restart_policy:
+ condition: on-failure
+ entrypoint:
+ - /usr/bin/clickhouse-keeper
+ - --config-file=/etc/clickhouse-keeper/keeper.yaml
+ healthcheck:
+ interval: 30s
+ retries: 3
+ start_period: 40s
+ test:
+ - CMD
+ - clickhouse-keeper-client
+ - -h
+ - localhost
+ - -p
+ - "9181"
+ - -q
+ - ls
+ timeout: 10s
+ image: clickhouse/clickhouse-keeper:25.5.6
+ networks:
+ - signoz-network
+ volumes:
+ - signoz-telemetrykeeper-0-data:/var/lib/clickhouse-keeper
+ signoz-telemetrystore-clickhouse-0-0:
+ configs:
+ - source: telemetrystore-config-0-0
+ target: /etc/clickhouse-server/config.yaml
+ - source: telemetrystore-functions
+ target: /etc/clickhouse-server/functions.yaml
+ deploy:
+ restart_policy:
+ condition: on-failure
+ environment:
+ - CLICKHOUSE_SKIP_USER_SETUP=1
+ - CLICKHOUSE_CONFIG=/etc/clickhouse-server/config.yaml
+ healthcheck:
+ interval: 30s
+ retries: 3
+ start_period: 40s
+ test:
+ - CMD
+ - wget
+ - --spider
+ - -q
+ - http://localhost:8123/ping
+ timeout: 10s
+ hostname: signoz-telemetrystore-clickhouse-0-0
+ image: clickhouse/clickhouse-server:25.5.6
+ networks:
+ - signoz-network
+ volumes:
+ - signoz-telemetrystore-0-0-data:/var/lib/clickhouse
+ - signoz-telemetrystore-user-scripts:/var/lib/clickhouse/user_scripts:ro
+ signoz-telemetrystore-clickhouse-user-scripts:
+ command:
+ - bash
+ - -c
+ - |-
+ version="v0.0.1"
+ node_os=$$(uname -s | tr '[:upper:]' '[:lower:]')
+ node_arch=$$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
+ echo "Fetching histogram-binary for $${node_os}/$${node_arch}"
+ cd /tmp
+ wget -O histogram-quantile.tar.gz "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F$${version}/histogram-quantile_$${node_os}_$${node_arch}.tar.gz"
+ tar -xvzf histogram-quantile.tar.gz
+ mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
+ deploy:
+ mode: global
+ restart_policy:
+ condition: none
+ image: clickhouse/clickhouse-server:25.5.6
+ networks:
+ - signoz-network
+ volumes:
+ - signoz-telemetrystore-user-scripts:/var/lib/clickhouse/user_scripts
+ signoz-telemetrystore-migrator:
+ command:
+ - -c
+ - |
+ /signoz-otel-collector migrate ready &&
+ /signoz-otel-collector migrate bootstrap &&
+ /signoz-otel-collector migrate sync up &&
+ /signoz-otel-collector migrate async up
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ max_attempts: 3
+ entrypoint:
+ - /bin/sh
+ environment:
+ - SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://signoz-telemetrystore-clickhouse-0-0:9000
+ - SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
+ image: signoz/signoz-otel-collector:latest
+ networks:
+ - signoz-network
+version: "3"
+volumes:
+ signoz-metastore-postgres-0-data: null
+ signoz-telemetrykeeper-0-data: null
+ signoz-telemetrystore-0-0-data: null
+ signoz-telemetrystore-user-scripts: null
diff --git a/docs/examples/docker/swarm/pours/deployment/ingester/ingester.yaml b/docs/examples/docker/swarm/pours/deployment/ingester/ingester.yaml
new file mode 100644
index 0000000..44e476e
--- /dev/null
+++ b/docs/examples/docker/swarm/pours/deployment/ingester/ingester.yaml
@@ -0,0 +1,132 @@
+connectors:
+ signozmeter:
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ metrics_flush_interval: 1h
+exporters:
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_logs
+ sending_queue:
+ enabled: false
+ timeout: 45s
+ use_new_schema: true
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ sending_queue:
+ enabled: false
+ timeout: 45s
+ use_new_schema: true
+ metadataexporter:
+ cache:
+ provider: in_memory
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
+ enabled: true
+ timeout: 45s
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_meter
+ sending_queue:
+ enabled: false
+ timeout: 45s
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metrics
+ sending_queue:
+ enabled: false
+ timeout: 45s
+extensions:
+ pprof:
+ endpoint: 0.0.0.0:1777
+ signoz_health_check:
+ endpoint: 0.0.0.0:13133
+processors:
+ batch:
+ send_batch_max_size: 55000
+ send_batch_size: 50000
+ timeout: 5s
+ batch/meter:
+ send_batch_max_size: 25000
+ send_batch_size: 20000
+ timeout: 5s
+ signozspanmetrics/delta:
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ dimensions:
+ - default: default
+ name: service.namespace
+ - default: default
+ name: deployment.environment
+ - name: signoz.collector.id
+ - name: service.version
+ dimensions_cache_size: 100000
+ enable_exp_histogram: true
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: 0.0.0.0:4317
+ http:
+ endpoint: 0.0.0.0:4318
+service:
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ logs:
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ processors:
+ - batch
+ receivers:
+ - otlp
+ metrics:
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ processors:
+ - batch
+ receivers:
+ - otlp
+ metrics/meter:
+ exporters:
+ - signozclickhousemeter
+ processors:
+ - batch/meter
+ receivers:
+ - signozmeter
+ traces:
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ receivers:
+ - otlp
+ telemetry:
+ logs:
+ encoding: json
diff --git a/docs/examples/docker/swarm/pours/deployment/ingester/opamp.yaml b/docs/examples/docker/swarm/pours/deployment/ingester/opamp.yaml
new file mode 100644
index 0000000..2672ddb
--- /dev/null
+++ b/docs/examples/docker/swarm/pours/deployment/ingester/opamp.yaml
@@ -0,0 +1 @@
+server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
diff --git a/docs/examples/docker/compose/pours/deployment/configs/telemetrykeeper/keeper-0.yaml b/docs/examples/docker/swarm/pours/deployment/telemetrykeeper/clickhousekeeper/keeper-0.yaml
similarity index 86%
rename from docs/examples/docker/compose/pours/deployment/configs/telemetrykeeper/keeper-0.yaml
rename to docs/examples/docker/swarm/pours/deployment/telemetrykeeper/clickhousekeeper/keeper-0.yaml
index e1ca33d..1606da9 100644
--- a/docs/examples/docker/compose/pours/deployment/configs/telemetrykeeper/keeper-0.yaml
+++ b/docs/examples/docker/swarm/pours/deployment/telemetrykeeper/clickhousekeeper/keeper-0.yaml
@@ -1,8 +1,11 @@
keeper_server:
coordination_settings:
+ force_sync: false
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
four_letter_word_white_list: '*'
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
diff --git a/docs/examples/docker/swarm/pours/deployment/telemetrystore/clickhouse/config-0-0.yaml b/docs/examples/docker/swarm/pours/deployment/telemetrystore/clickhouse/config-0-0.yaml
new file mode 100644
index 0000000..34d42ff
--- /dev/null
+++ b/docs/examples/docker/swarm/pours/deployment/telemetrystore/clickhouse/config-0-0.yaml
@@ -0,0 +1,96 @@
+asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+dictionaries_config: '*_dictionary.xml'
+display_name: cluster
+distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+error_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+format_schema_path: /var/lib/clickhouse/format_schemas/
+http_port: 8123
+interserver_http_port: 9009
+latency_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+listen_host: 0.0.0.0
+logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+macros:
+ replica: "00"
+ shard: "00"
+metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+path: /var/lib/clickhouse/
+processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: signoz-telemetrystore-clickhouse-0-0
+ port: 9000
+session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+tcp_port: 9000
+text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+tmp_path: /var/lib/clickhouse/tmp/
+trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+user_defined_executable_functions_config: '*function.yaml'
+user_directories:
+ users_xml:
+ path: users.xml
+user_files_path: /var/lib/clickhouse/user_files/
+user_scripts_path: /var/lib/clickhouse/user_scripts/
+users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-clickhousekeeper-0
+ port: 9181
+zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
diff --git a/docs/examples/systemd/binary/pours/deployment/configs/telemetrystore/functions.yaml b/docs/examples/docker/swarm/pours/deployment/telemetrystore/clickhouse/functions.yaml
similarity index 100%
rename from docs/examples/systemd/binary/pours/deployment/configs/telemetrystore/functions.yaml
rename to docs/examples/docker/swarm/pours/deployment/telemetrystore/clickhouse/functions.yaml
diff --git a/docs/examples/ecs/README.md b/docs/examples/ecs/README.md
new file mode 100644
index 0000000..64e980b
--- /dev/null
+++ b/docs/examples/ecs/README.md
@@ -0,0 +1,5 @@
+# AWS ECS
+
+| Mode | Flavor | Description |
+| --- | --- | --- |
+| [ec2/terraform](ec2/terraform/) | `terraform` | ECS on EC2 with Terraform-managed infrastructure |
diff --git a/docs/examples/ecs/ec2/terraform/README.md b/docs/examples/ecs/ec2/terraform/README.md
new file mode 100644
index 0000000..8b1a3f1
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/README.md
@@ -0,0 +1,266 @@
+# ECS EC2 with Terraform
+
+| Field | Value |
+| --- | --- |
+| **Mode** | `ec2` |
+| **Flavor** | `terraform` |
+| **Platform** | `ecs` |
+
+## Overview
+
+Deploys SigNoz on AWS ECS (EC2 launch type) using Terraform. Each component runs as a separate ECS service with AWS Cloud Map for service discovery.
+
+Components:
+- ClickHouse Keeper (telemetry keeper)
+- ClickHouse (telemetry store)
+- PostgreSQL (metadata store)
+- SigNoz (UI + API server on port 8080)
+- OTel Collector (ingester)
+- Schema migrator (Fargate one-shot task)
+
+## Prerequisites
+
+- An existing ECS cluster with an EC2 capacity provider
+- A VPC with private subnets
+- An S3 bucket for storing component configs
+- IAM roles for ECS task and task execution
+- [Terraform](https://developer.hashicorp.com/terraform/install) >= 1.0
+
+## Configuration
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+ annotations:
+ foundry.signoz.io/ecs/region: us-east-1
+ foundry.signoz.io/ecs/cluster-id: arn:aws:ecs:us-east-1:123456789012:cluster/my-cluster
+ foundry.signoz.io/ecs/subnet-ids: subnet-abc123,subnet-def456
+ foundry.signoz.io/ecs/security-group-ids: sg-abc123
+ foundry.signoz.io/ecs/vpc-id: vpc-abc123
+ foundry.signoz.io/ecs/config-bucket: my-signoz-configs
+ foundry.signoz.io/ecs/task-role-arn: arn:aws:iam::123456789012:role/ecs-task-role
+ foundry.signoz.io/ecs/task-execution-role-arn: arn:aws:iam::123456789012:role/ecs-execution-role
+ foundry.signoz.io/ecs/capacity-provider: my-capacity-provider
+spec:
+ deployment:
+ platform: ecs
+ mode: ec2
+ flavor: terraform
+```
+
+## Deploy
+
+Run the full pipeline (generate Terraform files and apply):
+
+```bash
+foundryctl cast -f casting.yaml
+```
+
+> [!NOTE]
+> `foundryctl cast` runs `terraform init` followed by `terraform apply -auto-approve`. If you prefer to review the plan before applying, use the step-by-step approach below.
+
+Step-by-step alternative:
+
+```bash
+# 1. Generate Terraform files
+foundryctl forge -f casting.yaml
+
+# 2. Initialize and apply Terraform
+cd pours/deployment
+terraform init
+terraform apply
+```
+
+## Generated output
+
+```text
+pours/deployment/
+ main.tf.json
+ variables.tf.json
+ terraform.tfvars.json
+ module/
+ main.tf.json
+ variables.tf.json
+ outputs.tf.json
+ telemetrykeeper.tf.json
+ telemetrystore.tf.json
+ telemetrystore_migrator.tf.json
+ metastore.tf.json
+ signoz.tf.json
+ ingester.tf.json
+ telemetrykeeper/
+ clickhousekeeper/
+ keeper-0.yaml
+ telemetrystore/
+ clickhouse/
+ config.yaml
+ functions.yaml
+ ingester/
+ ingester.yaml
+ opamp.yaml
+```
+
+## After deployment
+
+Verify the ECS services are running:
+
+```bash
+aws ecs list-services --cluster my-cluster --region us-east-1
+aws ecs describe-services \
+ --cluster my-cluster \
+ --services signoz-signoz signoz-ingester signoz-telemetrystore-clickhouse \
+ --region us-east-1
+```
+
+Check that Cloud Map service discovery is healthy:
+
+```bash
+aws servicediscovery list-services --region us-east-1
+```
+
+Access the SigNoz UI by setting up an ALB pointing to the SigNoz service on port 8080.
+
+## Customization
+
+The module ships with sensible defaults for CPU and memory. To override them, use `spec.patches` on the generated module files:
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+ annotations:
+ # ... (same annotations as above)
+spec:
+ deployment:
+ platform: ecs
+ mode: ec2
+ flavor: terraform
+ patches:
+ - target: "deployment/module/signoz.tf.json"
+ type: jsonpatch
+ operations:
+ - op: replace
+ path: /locals/containers/0/cpu
+ value: 1024
+ - op: replace
+ path: /locals/containers/0/memory
+ value: 1024
+ - op: replace
+ path: /locals/containers/0/memoryReservation
+ value: 1024
+ - target: "deployment/module/telemetrystore.tf.json"
+ type: jsonpatch
+ operations:
+ - op: replace
+ path: /locals/containers/2/cpu
+ value: 2048
+ - op: replace
+ path: /locals/containers/2/memory
+ value: 4096
+ - op: replace
+ path: /locals/containers/2/memoryReservation
+ value: 4096
+```
+
+Run `foundryctl forge` to see the generated files and identify the JSON paths you want to patch.
+
+## Annotations
+
+Annotations populate `terraform.tfvars.json` so Foundry can generate a ready-to-apply Terraform configuration.
+
+| Annotation | Maps to tfvar | Description |
+| --- | --- | --- |
+| `foundry.signoz.io/ecs/region` | `region` | AWS region |
+| `foundry.signoz.io/ecs/cluster-id` | `ecs_cluster_id` | ECS cluster ARN or ID |
+| `foundry.signoz.io/ecs/subnet-ids` | `subnet_ids` | Comma-separated subnet IDs |
+| `foundry.signoz.io/ecs/security-group-ids` | `security_group_ids` | Comma-separated security group IDs |
+| `foundry.signoz.io/ecs/vpc-id` | `vpc_id` | VPC ID for Cloud Map namespace |
+| `foundry.signoz.io/ecs/config-bucket` | `config_bucket` | S3 bucket for component configs |
+| `foundry.signoz.io/ecs/task-role-arn` | `task_role_arn` | IAM role ARN for ECS tasks |
+| `foundry.signoz.io/ecs/task-execution-role-arn` | `task_execution_role_arn` | IAM role ARN for task execution |
+| `foundry.signoz.io/ecs/capacity-provider` | `capacity_provider` | ECS capacity provider name |
+
+## Platform details
+
+### Providers
+
+| Provider | Version | Purpose |
+| --- | --- | --- |
+| `hashicorp/aws` | `>= 5.0` | ECS, Cloud Map, S3 |
+
+### Resources
+
+The module creates the following AWS resources:
+
+| Resource | Count | Description |
+| --- | --- | --- |
+| `aws_service_discovery_private_dns_namespace` | 1 | Cloud Map namespace (`{name}.local`) |
+| `aws_ecs_task_definition` | 6 | One per component (including migrator) |
+| `aws_ecs_service` | 5 | One per long-running component |
+| `aws_service_discovery_service` | 5 | One per long-running component |
+| `aws_s3_object` | N | Config files for ClickHouse, Keeper, and Ingester |
+| `aws_ecs_task_execution` (data) | 1 | Runs the migrator as a Fargate task |
+
+### Variables
+
+| Variable | Type | Description |
+| --- | --- | --- |
+| `region` | `string` | AWS region |
+| `ecs_cluster_id` | `string` | ID of the existing ECS cluster |
+| `subnet_ids` | `list(string)` | Subnet IDs for ECS service networking (awsvpc) |
+| `security_group_ids` | `list(string)` | Security group IDs for ECS service networking |
+| `vpc_id` | `string` | VPC ID for the Cloud Map private DNS namespace |
+| `config_bucket` | `string` | S3 bucket for storing component config files |
+| `task_role_arn` | `string` | IAM role ARN for ECS tasks |
+| `task_execution_role_arn` | `string` | IAM role ARN for ECS task execution (pull images, write logs) |
+| `capacity_provider` | `string` | Name of the ECS capacity provider |
+
+### Outputs
+
+| Output | Description |
+| --- | --- |
+| `namespace_id` | Cloud Map private DNS namespace ID |
+| `namespace_name` | Cloud Map private DNS namespace name |
+| `signoz_service_arn` | SigNoz ECS service ARN (target for ALB on port 8080) |
+| `signoz_service_name` | SigNoz ECS service name |
+| `ingester_service_arn` | Ingester ECS service ARN (target for NLB on port 4317/4318) |
+| `ingester_service_name` | Ingester ECS service name |
+| `telemetrystore_service_name` | ClickHouse ECS service name |
+| `telemetrykeeper_service_name` | ClickHouse Keeper ECS service name |
+| `metastore_service_name` | PostgreSQL ECS service name |
+
+### Service discovery
+
+Components communicate via Cloud Map DNS within the `{name}.local` namespace:
+
+| Component | DNS name | Port |
+| --- | --- | --- |
+| ClickHouse Keeper | `telemetrykeeper-clickhousekeeper.{name}.local` | 9181 (client), 9234 (raft) |
+| ClickHouse | `telemetrystore-clickhouse.{name}.local` | 9000 (native), 8123 (HTTP) |
+| PostgreSQL | `metastore-postgresql.{name}.local` | 5432 |
+| SigNoz | `signoz.{name}.local` | 8080 (API), 4320 (OpAMP) |
+| Ingester | `ingester.{name}.local` | 4317 (gRPC), 4318 (HTTP) |
+
+### IAM requirements
+
+The **task execution role** (`task_execution_role_arn`) needs:
+- `ecr:GetAuthorizationToken`, `ecr:BatchGetImage`, `ecr:GetDownloadUrlForLayer` (pull images)
+- `logs:CreateLogStream`, `logs:PutLogEvents` (CloudWatch logs)
+
+The **task role** (`task_role_arn`) needs:
+- `s3:GetObject` on the config bucket (config-fetcher sidecar reads configs from S3)
+
+### Security groups
+
+ECS services use `awsvpc` networking. Security groups must allow:
+
+| From | To | Port | Purpose |
+| --- | --- | --- | --- |
+| Ingester | ClickHouse | 9000 | Telemetry writes |
+| SigNoz | ClickHouse | 9000 | Query reads |
+| SigNoz | PostgreSQL | 5432 | Metadata |
+| SigNoz | Ingester | 4320 | OpAMP management |
+| ClickHouse | ClickHouse Keeper | 9181 | Coordination |
+| External | SigNoz | 8080 | UI/API access (via ALB) |
+| External | Ingester | 4317, 4318 | Telemetry ingestion (via NLB) |
diff --git a/docs/examples/ecs/ec2/terraform/casting.yaml b/docs/examples/ecs/ec2/terraform/casting.yaml
new file mode 100644
index 0000000..1426460
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/casting.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: terraform
+ mode: ec2
+ platform: ecs
diff --git a/docs/examples/ecs/ec2/terraform/casting.yaml.lock b/docs/examples/ecs/ec2/terraform/casting.yaml.lock
new file mode 100644
index 0000000..2c2fe18
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/casting.yaml.lock
@@ -0,0 +1,647 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: terraform
+ mode: ec2
+ platform: ecs
+ ingester:
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz.signoz.local:4320/v1/opamp
+ enabled: true
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ image: signoz/signoz-otel-collector:latest
+ version: latest
+ status:
+ addresses:
+ otlp: null
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz.signoz.local:4320/v1/opamp
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ metastore:
+ kind: postgres
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ image: postgres:16
+ version: "16"
+ status:
+ addresses:
+ dsn:
+ - tcp://metastore-postgres.signoz.local:5432
+ config: {}
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ signoz:
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@metastore-postgres.signoz.local:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://telemetrystore-clickhouse.signoz.local:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ image: signoz/signoz:latest
+ version: latest
+ status:
+ addresses:
+ apiserver:
+ - tcp://signoz.signoz.local:8080
+ opamp:
+ - ws://signoz.signoz.local:4320
+ config: {}
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@metastore-postgres.signoz.local:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://telemetrystore-clickhouse.signoz.local:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ telemetrykeeper:
+ kind: clickhousekeeper
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: telemetrykeeper-clickhousekeeper.signoz.local
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ enabled: true
+ image: clickhouse/clickhouse-keeper:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ client:
+ - tcp://telemetrykeeper-clickhousekeeper.signoz.local:9181
+ raft:
+ - tcp://telemetrykeeper-clickhousekeeper.signoz.local:9234
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: telemetrykeeper-clickhousekeeper.signoz.local
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ telemetrystore:
+ kind: clickhouse
+ spec:
+ cluster:
+ replicas: 0
+ shards: 1
+ config:
+ data:
+ config-0-0.yaml: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: telemetrystore-clickhouse.signoz.local
+ port: 9000
+ zookeeper:
+ node:
+ - host: telemetrykeeper-clickhousekeeper.signoz.local
+ port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ enabled: true
+ image: clickhouse/clickhouse-server:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ tcp:
+ - tcp://telemetrystore-clickhouse.signoz.local:9000
+ config:
+ data:
+ config-0-0.yaml: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: telemetrystore-clickhouse.signoz.local
+ port: 9000
+ zookeeper:
+ node:
+ - host: telemetrykeeper-clickhousekeeper.signoz.local
+ port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/main.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/main.tf.json
new file mode 100644
index 0000000..7cdd6a4
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/main.tf.json
@@ -0,0 +1,30 @@
+{
+ "terraform": {
+ "required_version": ">= 1.0",
+ "required_providers": {
+ "aws": {
+ "source": "hashicorp/aws",
+ "version": ">= 5.0"
+ }
+ }
+ },
+ "provider": {
+ "aws": {
+ "region": "${var.region}"
+ }
+ },
+ "module": {
+ "signoz": {
+ "source": "./module",
+ "region": "${var.region}",
+ "ecs_cluster_id": "${var.ecs_cluster_id}",
+ "subnet_ids": "${var.subnet_ids}",
+ "security_group_ids": "${var.security_group_ids}",
+ "vpc_id": "${var.vpc_id}",
+ "config_bucket": "${var.config_bucket}",
+ "task_role_arn": "${var.task_role_arn}",
+ "task_execution_role_arn": "${var.task_execution_role_arn}",
+ "capacity_provider": "${var.capacity_provider}"
+ }
+ }
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/ingester.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/module/ingester.tf.json
new file mode 100644
index 0000000..40e043d
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/ingester.tf.json
@@ -0,0 +1,125 @@
+{
+ "locals": {
+ "containers": [
+ {
+ "name": "config-fetcher",
+ "image": "amazon/aws-cli:2.27.32",
+ "essential": false,
+ "entryPoint": ["/bin/sh", "-c"],
+ "command": ["aws s3 cp s3://${var.config_bucket}/signoz/ingester/ /configs/ingester/ --recursive"],
+ "mountPoints": [
+ {
+ "sourceVolume": "ingester-config",
+ "containerPath": "/configs/ingester"
+ }
+ ],
+ "cpu": 10,
+ "memory": 102,
+ "memoryReservation": 102
+ },
+ {
+ "name": "ingester",
+ "image": "signoz/signoz-otel-collector:latest",
+ "essential": true,
+ "entryPoint": ["/bin/sh", "-c"],
+ "command": ["/signoz-otel-collector migrate sync check && /signoz-otel-collector --config=/conf/ingester.yaml --manager-config=/conf/opamp.yaml --copy-path=/var/tmp/collector-config.yaml"],
+ "environment": [{"name":"SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN","value":"tcp://telemetrystore-clickhouse.signoz.local:9000"},{"name":"SIGNOZ_OTEL_COLLECTOR_TIMEOUT","value":"10m"}],
+ "portMappings": [
+ {"name": "grpc", "containerPort": 4317, "protocol": "tcp", "appProtocol": "grpc"},
+ {"name": "http", "containerPort": 4318, "protocol": "tcp", "appProtocol": "http"}
+ ],
+ "mountPoints": [
+ {
+ "sourceVolume": "ingester-config",
+ "containerPath": "/conf"
+ }
+ ],
+ "dependsOn": [
+ {"containerName": "config-fetcher", "condition": "SUCCESS"}
+ ],
+ "cpu": 512,
+ "memory": 512,
+ "memoryReservation": 512,
+ "healthCheck": {
+ "command": ["CMD-SHELL", "wget --spider -q localhost:13133 || exit 1"],
+ "interval": 30,
+ "timeout": 5,
+ "retries": 3,
+ "startPeriod": 30
+ }
+ }
+ ]
+ },
+ "resource": {
+ "aws_s3_object": {
+ "ingester_configs": {
+ "for_each": "${fileset(\"${path.module}/ingester\", \"*.yaml\")}",
+ "bucket": "${var.config_bucket}",
+ "key": "signoz/ingester/${each.value}",
+ "source": "${path.module}/ingester/${each.value}",
+ "etag": "${filemd5(\"${path.module}/ingester/${each.value}\")}"
+ }
+ },
+ "aws_ecs_task_definition": {
+ "ingester": {
+ "family": "signoz-ingester",
+ "network_mode": "awsvpc",
+ "requires_compatibilities": ["EC2"],
+ "task_role_arn": "${var.task_role_arn}",
+ "execution_role_arn": "${var.task_execution_role_arn}",
+ "container_definitions": "${jsonencode(local.containers)}",
+ "volume": [
+ {
+ "name": "ingester-config",
+ "docker_volume_configuration": {
+ "scope": "task",
+ "driver": "local"
+ }
+ }
+ ],
+ "depends_on": ["aws_s3_object.ingester_configs"]
+ }
+ },
+ "aws_service_discovery_service": {
+ "ingester": {
+ "name": "ingester",
+ "dns_config": {
+ "namespace_id": "${aws_service_discovery_private_dns_namespace.main.id}",
+ "dns_records": [
+ {
+ "ttl": 10,
+ "type": "A"
+ }
+ ],
+ "routing_policy": "MULTIVALUE"
+ }
+ }
+ },
+ "aws_ecs_service": {
+ "ingester": {
+ "name": "signoz-ingester",
+ "cluster": "${var.ecs_cluster_id}",
+ "task_definition": "${aws_ecs_task_definition.ingester.arn}",
+ "desired_count": 1,
+ "capacity_provider_strategy": [
+ {
+ "capacity_provider": "${var.capacity_provider}",
+ "weight": 1,
+ "base": 0
+ }
+ ],
+ "network_configuration": {
+ "subnets": "${var.subnet_ids}",
+ "security_groups": "${var.security_group_ids}"
+ },
+ "service_registries": {
+ "registry_arn": "${aws_service_discovery_service.ingester.arn}"
+ },
+"depends_on": [
+ "aws_ecs_service.signoz",
+ "aws_ecs_service.telemetrystore"
+ ]
+ }
+ }
+ }
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/ingester/ingester.yaml b/docs/examples/ecs/ec2/terraform/pours/deployment/module/ingester/ingester.yaml
new file mode 100644
index 0000000..0e5b7c8
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/ingester/ingester.yaml
@@ -0,0 +1,132 @@
+connectors:
+ signozmeter:
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ metrics_flush_interval: 1h
+exporters:
+ clickhouselogsexporter:
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_logs
+ sending_queue:
+ enabled: false
+ timeout: 45s
+ use_new_schema: true
+ clickhousetraces:
+ datasource: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ sending_queue:
+ enabled: false
+ timeout: 45s
+ use_new_schema: true
+ metadataexporter:
+ cache:
+ provider: in_memory
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_metadata
+ enabled: true
+ timeout: 45s
+ signozclickhousemeter:
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_meter
+ sending_queue:
+ enabled: false
+ timeout: 45s
+ signozclickhousemetrics:
+ dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_metrics
+ sending_queue:
+ enabled: false
+ timeout: 45s
+extensions:
+ pprof:
+ endpoint: 0.0.0.0:1777
+ signoz_health_check:
+ endpoint: 0.0.0.0:13133
+processors:
+ batch:
+ send_batch_max_size: 55000
+ send_batch_size: 50000
+ timeout: 5s
+ batch/meter:
+ send_batch_max_size: 25000
+ send_batch_size: 20000
+ timeout: 5s
+ signozspanmetrics/delta:
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ dimensions:
+ - default: default
+ name: service.namespace
+ - default: default
+ name: deployment.environment
+ - name: signoz.collector.id
+ - name: service.version
+ dimensions_cache_size: 100000
+ enable_exp_histogram: true
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: 0.0.0.0:4317
+ http:
+ endpoint: 0.0.0.0:4318
+service:
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ logs:
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ processors:
+ - batch
+ receivers:
+ - otlp
+ metrics:
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ processors:
+ - batch
+ receivers:
+ - otlp
+ metrics/meter:
+ exporters:
+ - signozclickhousemeter
+ processors:
+ - batch/meter
+ receivers:
+ - signozmeter
+ traces:
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ receivers:
+ - otlp
+ telemetry:
+ logs:
+ encoding: json
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/ingester/opamp.yaml b/docs/examples/ecs/ec2/terraform/pours/deployment/module/ingester/opamp.yaml
new file mode 100644
index 0000000..46c46c2
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/ingester/opamp.yaml
@@ -0,0 +1 @@
+server_endpoint: ws://signoz.signoz.local:4320/v1/opamp
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/main.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/module/main.tf.json
new file mode 100644
index 0000000..9868aa9
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/main.tf.json
@@ -0,0 +1,10 @@
+{
+ "resource": {
+ "aws_service_discovery_private_dns_namespace": {
+ "main": {
+ "name": "signoz.local",
+ "vpc": "${var.vpc_id}"
+ }
+ }
+ }
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/metastore.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/module/metastore.tf.json
new file mode 100644
index 0000000..df1ccf2
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/metastore.tf.json
@@ -0,0 +1,89 @@
+{
+ "locals": {
+ "containers": [
+ {
+ "name": "signoz-metastore-postgres-0",
+ "image": "postgres:16",
+ "essential": true,
+ "environment": [{"name":"POSTGRES_DB","value":"signoz"},{"name":"POSTGRES_PASSWORD","value":"signoz"},{"name":"POSTGRES_USER","value":"signoz"}],
+ "portMappings": [
+ {"name": "postgres", "containerPort": 5432, "protocol": "tcp"}
+ ],
+ "mountPoints": [
+ {
+ "sourceVolume": "postgres-data",
+ "containerPath": "/var/lib/postgresql/data"
+ }
+ ],
+ "cpu": 256,
+ "memory": 256,
+ "memoryReservation": 256,
+ "healthCheck": {
+ "command": ["CMD-SHELL", "pg_isready -U postgres || exit 1"],
+ "interval": 30,
+ "timeout": 5,
+ "retries": 3,
+ "startPeriod": 30
+ }
+ }
+ ]
+ },
+ "resource": {
+ "aws_ecs_task_definition": {
+ "metastore": {
+ "family": "signoz-metastore-postgres-0",
+ "network_mode": "awsvpc",
+ "requires_compatibilities": ["EC2"],
+ "task_role_arn": "${var.task_role_arn}",
+ "execution_role_arn": "${var.task_execution_role_arn}",
+ "container_definitions": "${jsonencode(local.containers)}",
+ "volume": [
+ {
+ "name": "postgres-data",
+ "docker_volume_configuration": {
+ "scope": "task",
+ "driver": "local"
+ }
+ }
+ ]
+ }
+ },
+ "aws_service_discovery_service": {
+ "metastore": {
+ "name": "metastore-postgres",
+ "dns_config": {
+ "namespace_id": "${aws_service_discovery_private_dns_namespace.main.id}",
+ "dns_records": [
+ {
+ "ttl": 10,
+ "type": "A"
+ }
+ ],
+ "routing_policy": "MULTIVALUE"
+ }
+ }
+ },
+ "aws_ecs_service": {
+ "metastore": {
+ "name": "signoz-metastore-postgres-0",
+ "cluster": "${var.ecs_cluster_id}",
+ "task_definition": "${aws_ecs_task_definition.metastore.arn}",
+ "desired_count": 1,
+ "capacity_provider_strategy": [
+ {
+ "capacity_provider": "${var.capacity_provider}",
+ "weight": 1,
+ "base": 0
+ }
+ ],
+ "network_configuration": {
+ "subnets": "${var.subnet_ids}",
+ "security_groups": "${var.security_group_ids}"
+ },
+ "service_registries": {
+ "registry_arn": "${aws_service_discovery_service.metastore.arn}"
+ }
+ }
+ }
+ }
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/outputs.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/module/outputs.tf.json
new file mode 100644
index 0000000..d2799c0
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/outputs.tf.json
@@ -0,0 +1,52 @@
+{
+ "output": {
+ "ecs_cluster_id": {
+ "description": "ECS cluster ID",
+ "value": "${var.ecs_cluster_id}"
+ },
+ "namespace_id": {
+ "description": "Cloud Map private DNS namespace ID",
+ "value": "${aws_service_discovery_private_dns_namespace.main.id}"
+ },
+ "namespace_name": {
+ "description": "Cloud Map private DNS namespace name",
+ "value": "${aws_service_discovery_private_dns_namespace.main.name}"
+ },
+ "subnet_ids": {
+ "description": "Subnet IDs used by ECS services",
+ "value": "${var.subnet_ids}"
+ },
+ "security_group_ids": {
+ "description": "Security group IDs used by ECS services",
+ "value": "${var.security_group_ids}"
+ },
+ "signoz_service_arn": {
+ "description": "SigNoz ECS service ARN (target for ALB on port 8080)",
+ "value": "${aws_ecs_service.signoz.id}"
+ },
+ "signoz_service_name": {
+ "description": "SigNoz ECS service name",
+ "value": "${aws_ecs_service.signoz.name}"
+ },
+ "ingester_service_arn": {
+ "description": "Ingester ECS service ARN (target for NLB on port 4317/4318)",
+ "value": "${aws_ecs_service.ingester.id}"
+ },
+ "ingester_service_name": {
+ "description": "Ingester ECS service name",
+ "value": "${aws_ecs_service.ingester.name}"
+ },
+ "telemetrystore_service_name": {
+ "description": "TelemetryStore ECS service name",
+ "value": "${aws_ecs_service.telemetrystore.name}"
+ },
+ "telemetrykeeper_service_name": {
+ "description": "TelemetryKeeper ECS service name",
+ "value": "${aws_ecs_service.telemetrykeeper.name}"
+ },
+ "metastore_service_name": {
+ "description": "MetaStore ECS service name",
+ "value": "${aws_ecs_service.metastore.name}"
+ }
+ }
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/signoz.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/module/signoz.tf.json
new file mode 100644
index 0000000..e3f57a5
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/signoz.tf.json
@@ -0,0 +1,79 @@
+{
+ "locals": {
+ "containers": [
+ {
+ "name": "signoz",
+ "image": "signoz/signoz:latest",
+ "essential": true,
+ "environment": [{"name":"SIGNOZ_SQLSTORE_POSTGRES_DSN","value":"postgres://signoz:signoz@metastore-postgres.signoz.local:5432/signoz?sslmode=disable"},{"name":"SIGNOZ_SQLSTORE_PROVIDER","value":"postgres"},{"name":"SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN","value":"tcp://telemetrystore-clickhouse.signoz.local:9000"},{"name":"SIGNOZ_TELEMETRYSTORE_PROVIDER","value":"clickhouse"}],
+ "portMappings": [
+ {"name": "http", "containerPort": 8080, "protocol": "tcp", "appProtocol": "http"},
+ {"name": "opamp", "containerPort": 4320, "protocol": "tcp"}
+ ],
+ "cpu": 512,
+ "memory": 512,
+ "memoryReservation": 512,
+ "healthCheck": {
+ "command": ["CMD-SHELL", "wget --spider -q localhost:8080/api/v1/health || exit 1"],
+ "interval": 30,
+ "timeout": 5,
+ "retries": 3,
+ "startPeriod": 30
+ }
+ }
+ ]
+ },
+ "resource": {
+ "aws_ecs_task_definition": {
+ "signoz": {
+ "family": "signoz-signoz",
+ "network_mode": "awsvpc",
+ "requires_compatibilities": ["EC2"],
+ "task_role_arn": "${var.task_role_arn}",
+ "execution_role_arn": "${var.task_execution_role_arn}",
+ "container_definitions": "${jsonencode(local.containers)}"
+ }
+ },
+ "aws_service_discovery_service": {
+ "signoz": {
+ "name": "signoz",
+ "dns_config": {
+ "namespace_id": "${aws_service_discovery_private_dns_namespace.main.id}",
+ "dns_records": [
+ {
+ "ttl": 10,
+ "type": "A"
+ }
+ ],
+ "routing_policy": "MULTIVALUE"
+ }
+ }
+ },
+ "aws_ecs_service": {
+ "signoz": {
+ "name": "signoz-signoz",
+ "cluster": "${var.ecs_cluster_id}",
+ "task_definition": "${aws_ecs_task_definition.signoz.arn}",
+ "desired_count": 1,
+ "capacity_provider_strategy": [
+ {
+ "capacity_provider": "${var.capacity_provider}",
+ "weight": 1,
+ "base": 0
+ }
+ ],
+ "network_configuration": {
+ "subnets": "${var.subnet_ids}",
+ "security_groups": "${var.security_group_ids}"
+ },
+ "service_registries": {
+ "registry_arn": "${aws_service_discovery_service.signoz.arn}"
+ },
+"depends_on": [
+ "aws_ecs_service.metastore",
+ "aws_ecs_service.telemetrystore"
+ ]
+ }
+ }
+ }
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrykeeper.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrykeeper.tf.json
new file mode 100644
index 0000000..68c126d
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrykeeper.tf.json
@@ -0,0 +1,130 @@
+{
+ "locals": {
+ "containers": [
+ {
+ "name": "config-fetcher",
+ "image": "amazon/aws-cli:2.27.32",
+ "essential": false,
+ "entryPoint": ["/bin/sh", "-c"],
+ "command": ["aws s3 cp s3://${var.config_bucket}/signoz/telemetrykeeper/clickhousekeeper/ /configs/telemetrykeeper/ --recursive"],
+ "mountPoints": [
+ {
+ "sourceVolume": "keeper-config",
+ "containerPath": "/configs/telemetrykeeper"
+ }
+ ],
+ "cpu": 10,
+ "memory": 102,
+ "memoryReservation": 102
+ },
+ {
+ "name": "signoz-telemetrykeeper-clickhousekeeper-0",
+ "image": "clickhouse/clickhouse-keeper:25.5.6",
+ "essential": true,
+ "entryPoint": ["/usr/bin/clickhouse-keeper", "--config-file=/etc/clickhouse-keeper/keeper.yaml"],
+ "portMappings": [
+ {"name": "client", "containerPort": 9181, "protocol": "tcp"},
+ {"name": "raft", "containerPort": 9234, "protocol": "tcp"}
+ ],
+ "mountPoints": [
+ {
+ "sourceVolume": "keeper-data",
+ "containerPath": "/var/lib/clickhouse-keeper"
+ },
+ {
+ "sourceVolume": "keeper-config",
+ "containerPath": "/etc/clickhouse-keeper"
+ }
+ ],
+ "dependsOn": [
+ {"containerName": "config-fetcher", "condition": "SUCCESS"}
+ ],
+ "cpu": 256,
+ "memory": 512,
+ "memoryReservation": 512,
+ "healthCheck": {
+ "command": ["CMD-SHELL", "echo ruok | nc localhost 9181 || exit 1"],
+ "interval": 30,
+ "timeout": 5,
+ "retries": 3,
+ "startPeriod": 30
+ }
+ }
+ ]
+ },
+ "resource": {
+ "aws_s3_object": {
+ "telemetrykeeper_configs": {
+ "for_each": "${fileset(\"${path.module}/telemetrykeeper/clickhousekeeper\", \"**\")}",
+ "bucket": "${var.config_bucket}",
+ "key": "signoz/telemetrykeeper/clickhousekeeper/${each.value}",
+ "source": "${path.module}/telemetrykeeper/clickhousekeeper/${each.value}",
+ "etag": "${filemd5(\"${path.module}/telemetrykeeper/clickhousekeeper/${each.value}\")}"
+ }
+ },
+ "aws_ecs_task_definition": {
+ "telemetrykeeper": {
+ "family": "signoz-telemetrykeeper-clickhousekeeper-0",
+ "network_mode": "awsvpc",
+ "requires_compatibilities": ["EC2"],
+ "task_role_arn": "${var.task_role_arn}",
+ "execution_role_arn": "${var.task_execution_role_arn}",
+ "container_definitions": "${jsonencode(local.containers)}",
+ "volume": [
+ {
+ "name": "keeper-config",
+ "docker_volume_configuration": {
+ "scope": "task",
+ "driver": "local"
+ }
+ },
+ {
+ "name": "keeper-data",
+ "docker_volume_configuration": {
+ "scope": "task",
+ "driver": "local"
+ }
+ }
+ ],
+ "depends_on": ["aws_s3_object.telemetrykeeper_configs"]
+ }
+ },
+ "aws_service_discovery_service": {
+ "telemetrykeeper": {
+ "name": "telemetrykeeper-clickhousekeeper",
+ "dns_config": {
+ "namespace_id": "${aws_service_discovery_private_dns_namespace.main.id}",
+ "dns_records": [
+ {
+ "ttl": 10,
+ "type": "A"
+ }
+ ],
+ "routing_policy": "MULTIVALUE"
+ }
+ }
+ },
+ "aws_ecs_service": {
+ "telemetrykeeper": {
+ "name": "signoz-telemetrykeeper-clickhousekeeper-0",
+ "cluster": "${var.ecs_cluster_id}",
+ "task_definition": "${aws_ecs_task_definition.telemetrykeeper.arn}",
+ "desired_count": 1,
+ "capacity_provider_strategy": [
+ {
+ "capacity_provider": "${var.capacity_provider}",
+ "weight": 1,
+ "base": 0
+ }
+ ],
+ "network_configuration": {
+ "subnets": "${var.subnet_ids}",
+ "security_groups": "${var.security_group_ids}"
+ },
+ "service_registries": {
+ "registry_arn": "${aws_service_discovery_service.telemetrykeeper.arn}"
+ }
+ }
+ }
+ }
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrykeeper/clickhousekeeper/keeper-0.yaml b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrykeeper/clickhousekeeper/keeper-0.yaml
new file mode 100644
index 0000000..89dd46c
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrykeeper/clickhousekeeper/keeper-0.yaml
@@ -0,0 +1,22 @@
+keeper_server:
+ coordination_settings:
+ force_sync: false
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ four_letter_word_white_list: '*'
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: telemetrykeeper-clickhousekeeper.signoz.local
+ id: 0
+ port: 9234
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+listen_host: 0.0.0.0
+logger:
+ console: true
+ level: information
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore.tf.json
new file mode 100644
index 0000000..4afa75e
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore.tf.json
@@ -0,0 +1,161 @@
+{
+ "locals": {
+ "containers": [
+ {
+ "name": "init-clickhouse",
+ "image": "alpine:3.18.2",
+ "essential": false,
+ "command": ["/bin/sh", "-c", "cd /tmp && wget -O histogram-quantile.tar.gz 'https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2Fv0.0.1/histogram-quantile_linux_amd64.tar.gz' && tar -xzf histogram-quantile.tar.gz && mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile"],
+ "mountPoints": [
+ {
+ "sourceVolume": "shared-binary-volume",
+ "containerPath": "/var/lib/clickhouse/user_scripts"
+ }
+ ],
+ "cpu": 256,
+ "memory": 256,
+ "memoryReservation": 256
+ },
+ {
+ "name": "config-fetcher",
+ "image": "amazon/aws-cli:2.27.32",
+ "essential": false,
+ "entryPoint": ["/bin/sh", "-c"],
+ "command": ["aws s3 cp s3://${var.config_bucket}/signoz/telemetrystore/clickhouse/ /configs/telemetrystore/ --recursive"],
+ "mountPoints": [
+ {
+ "sourceVolume": "telemetrystore-clickhouse-config",
+ "containerPath": "/configs/telemetrystore"
+ }
+ ],
+ "cpu": 10,
+ "memory": 102,
+ "memoryReservation": 102
+ },
+ {
+ "name": "signoz-telemetrystore-clickhouse-0-0",
+ "image": "clickhouse/clickhouse-server:25.5.6",
+ "essential": true,
+ "environment": [{"name":"CLICKHOUSE_SKIP_USER_SETUP","value":"1"}],
+ "portMappings": [
+ {"name": "native", "containerPort": 9000, "protocol": "tcp"},
+ {"name": "http", "containerPort": 8123, "protocol": "tcp", "appProtocol": "http"},
+ {"name": "prometheus", "containerPort": 9363, "protocol": "tcp", "appProtocol": "http"}
+ ],
+ "mountPoints": [
+ {
+ "sourceVolume": "shared-binary-volume",
+ "containerPath": "/var/lib/clickhouse/user_scripts"
+ },
+ {
+ "sourceVolume": "telemetrystore-clickhouse-config",
+ "containerPath": "/etc/clickhouse-server/config.d"
+ },
+ {
+ "sourceVolume": "clickhouse-data",
+ "containerPath": "/var/lib/clickhouse"
+ }
+ ],
+ "dependsOn": [
+ {"containerName": "init-clickhouse", "condition": "SUCCESS"},
+ {"containerName": "config-fetcher", "condition": "SUCCESS"}
+ ],
+ "cpu": 1024,
+ "memory": 512,
+ "memoryReservation": 512,
+ "healthCheck": {
+ "command": ["CMD-SHELL", "wget --spider -q 0.0.0.0:8123/ping || exit 1"],
+ "interval": 30,
+ "timeout": 5,
+ "retries": 3,
+ "startPeriod": 30
+ }
+ }
+ ]
+ },
+ "resource": {
+ "aws_s3_object": {
+ "telemetrystore_configs": {
+ "for_each": "${fileset(\"${path.module}/telemetrystore/clickhouse\", \"**\")}",
+ "bucket": "${var.config_bucket}",
+ "key": "signoz/telemetrystore/clickhouse/${each.value}",
+ "source": "${path.module}/telemetrystore/clickhouse/${each.value}",
+ "etag": "${filemd5(\"${path.module}/telemetrystore/clickhouse/${each.value}\")}"
+ }
+ },
+ "aws_ecs_task_definition": {
+ "telemetrystore": {
+ "family": "signoz-telemetrystore-clickhouse-0-0",
+ "network_mode": "awsvpc",
+ "requires_compatibilities": ["EC2"],
+ "task_role_arn": "${var.task_role_arn}",
+ "execution_role_arn": "${var.task_execution_role_arn}",
+ "container_definitions": "${jsonencode(local.containers)}",
+ "volume": [
+ {
+ "name": "shared-binary-volume",
+ "docker_volume_configuration": {
+ "scope": "task",
+ "driver": "local"
+ }
+ },
+ {
+ "name": "telemetrystore-clickhouse-config",
+ "docker_volume_configuration": {
+ "scope": "task",
+ "driver": "local"
+ }
+ },
+ {
+ "name": "clickhouse-data",
+ "docker_volume_configuration": {
+ "scope": "task",
+ "driver": "local"
+ }
+ }
+ ],
+ "depends_on": ["aws_s3_object.telemetrystore_configs"]
+ }
+ },
+ "aws_service_discovery_service": {
+ "telemetrystore": {
+ "name": "telemetrystore-clickhouse",
+ "dns_config": {
+ "namespace_id": "${aws_service_discovery_private_dns_namespace.main.id}",
+ "dns_records": [
+ {
+ "ttl": 10,
+ "type": "A"
+ }
+ ],
+ "routing_policy": "MULTIVALUE"
+ }
+ }
+ },
+ "aws_ecs_service": {
+ "telemetrystore": {
+ "name": "signoz-telemetrystore-clickhouse-0-0",
+ "cluster": "${var.ecs_cluster_id}",
+ "task_definition": "${aws_ecs_task_definition.telemetrystore.arn}",
+ "desired_count": 1,
+ "capacity_provider_strategy": [
+ {
+ "capacity_provider": "${var.capacity_provider}",
+ "weight": 1,
+ "base": 0
+ }
+ ],
+ "network_configuration": {
+ "subnets": "${var.subnet_ids}",
+ "security_groups": "${var.security_group_ids}"
+ },
+ "service_registries": {
+ "registry_arn": "${aws_service_discovery_service.telemetrystore.arn}"
+ },
+"depends_on": [
+ "aws_ecs_service.telemetrykeeper"
+ ]
+ }
+ }
+ }
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore/clickhouse/config-0-0.yaml b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore/clickhouse/config-0-0.yaml
new file mode 100644
index 0000000..ff2ff57
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore/clickhouse/config-0-0.yaml
@@ -0,0 +1,96 @@
+asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+dictionaries_config: '*_dictionary.xml'
+display_name: cluster
+distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+error_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+format_schema_path: /var/lib/clickhouse/format_schemas/
+http_port: 8123
+interserver_http_port: 9009
+latency_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+listen_host: 0.0.0.0
+logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+macros:
+ replica: "00"
+ shard: "00"
+metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+path: /var/lib/clickhouse/
+processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: telemetrystore-clickhouse.signoz.local
+ port: 9000
+session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+tcp_port: 9000
+text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+tmp_path: /var/lib/clickhouse/tmp/
+trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+user_defined_executable_functions_config: '*function.yaml'
+user_directories:
+ users_xml:
+ path: users.xml
+user_files_path: /var/lib/clickhouse/user_files/
+user_scripts_path: /var/lib/clickhouse/user_scripts/
+users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+zookeeper:
+ node:
+ - host: telemetrykeeper-clickhousekeeper.signoz.local
+ port: 9181
+zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore/clickhouse/functions.yaml b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore/clickhouse/functions.yaml
new file mode 100644
index 0000000..9a88469
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore/clickhouse/functions.yaml
@@ -0,0 +1,13 @@
+functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore_migrator.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore_migrator.tf.json
new file mode 100644
index 0000000..9019493
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/telemetrystore_migrator.tf.json
@@ -0,0 +1,48 @@
+{
+ "locals": {
+ "containers": [
+ {
+ "name": "telemetrystore-migrator",
+ "image": "signoz/signoz-otel-collector:latest",
+ "essential": true,
+ "entryPoint": ["/bin/sh", "-c"],
+ "command": ["/signoz-otel-collector migrate ready && /signoz-otel-collector migrate bootstrap && /signoz-otel-collector migrate sync up && /signoz-otel-collector migrate async up"],
+ "environment": [{"name":"SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN","value":"tcp://telemetrystore-clickhouse.signoz.local:9000"},{"name":"SIGNOZ_OTEL_COLLECTOR_TIMEOUT","value":"10m"}],
+ "cpu": 256,
+ "memory": 512
+ }
+ ]
+ },
+ "resource": {
+ "aws_ecs_task_definition": {
+ "telemetrystore_migrator": {
+ "family": "signoz-telemetrystore-migrator",
+ "network_mode": "awsvpc",
+ "requires_compatibilities": ["FARGATE"],
+ "cpu": 256,
+ "memory": 512,
+ "task_role_arn": "${var.task_role_arn}",
+ "execution_role_arn": "${var.task_execution_role_arn}",
+ "container_definitions": "${jsonencode(local.containers)}"
+ }
+ }
+ },
+ "data": {
+ "aws_ecs_task_execution": {
+ "telemetrystore_migrator": {
+ "cluster": "${var.ecs_cluster_id}",
+ "task_definition": "${aws_ecs_task_definition.telemetrystore_migrator.arn}",
+ "desired_count": 1,
+ "launch_type": "FARGATE",
+ "network_configuration": {
+ "subnets": "${var.subnet_ids}",
+ "security_groups": "${var.security_group_ids}",
+ "assign_public_ip": false
+ },
+ "depends_on": [
+ "aws_ecs_service.telemetrystore"
+ ]
+ }
+ }
+ }
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/module/variables.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/module/variables.tf.json
new file mode 100644
index 0000000..fd7e081
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/module/variables.tf.json
@@ -0,0 +1,40 @@
+{
+ "variable": {
+ "region": {
+ "description": "AWS region",
+ "type": "string"
+ },
+ "ecs_cluster_id": {
+ "description": "ID of the existing ECS cluster to deploy services into",
+ "type": "string"
+ },
+ "subnet_ids": {
+ "description": "List of subnet IDs for ECS service networking (awsvpc)",
+ "type": "list(string)"
+ },
+ "security_group_ids": {
+ "description": "List of security group IDs for ECS service networking (awsvpc)",
+ "type": "list(string)"
+ },
+ "vpc_id": {
+ "description": "VPC ID for the private DNS namespace",
+ "type": "string"
+ },
+ "config_bucket": {
+ "description": "S3 bucket name for storing config files",
+ "type": "string"
+ },
+ "task_role_arn": {
+ "description": "IAM role ARN for ECS tasks",
+ "type": "string"
+ },
+ "task_execution_role_arn": {
+ "description": "IAM role ARN for ECS task execution (pull images, write logs)",
+ "type": "string"
+ },
+ "capacity_provider": {
+ "description": "Name of the ECS capacity provider",
+ "type": "string"
+ }
+ }
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/terraform.tfvars.json b/docs/examples/ecs/ec2/terraform/pours/deployment/terraform.tfvars.json
new file mode 100644
index 0000000..cceaa20
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/terraform.tfvars.json
@@ -0,0 +1,11 @@
+{
+ "region": "",
+ "ecs_cluster_id": "",
+ "subnet_ids": [""],
+ "security_group_ids": [""],
+ "vpc_id": "",
+ "config_bucket": "",
+ "task_role_arn": "",
+ "task_execution_role_arn": "",
+ "capacity_provider": ""
+}
diff --git a/docs/examples/ecs/ec2/terraform/pours/deployment/variables.tf.json b/docs/examples/ecs/ec2/terraform/pours/deployment/variables.tf.json
new file mode 100644
index 0000000..fd7e081
--- /dev/null
+++ b/docs/examples/ecs/ec2/terraform/pours/deployment/variables.tf.json
@@ -0,0 +1,40 @@
+{
+ "variable": {
+ "region": {
+ "description": "AWS region",
+ "type": "string"
+ },
+ "ecs_cluster_id": {
+ "description": "ID of the existing ECS cluster to deploy services into",
+ "type": "string"
+ },
+ "subnet_ids": {
+ "description": "List of subnet IDs for ECS service networking (awsvpc)",
+ "type": "list(string)"
+ },
+ "security_group_ids": {
+ "description": "List of security group IDs for ECS service networking (awsvpc)",
+ "type": "list(string)"
+ },
+ "vpc_id": {
+ "description": "VPC ID for the private DNS namespace",
+ "type": "string"
+ },
+ "config_bucket": {
+ "description": "S3 bucket name for storing config files",
+ "type": "string"
+ },
+ "task_role_arn": {
+ "description": "IAM role ARN for ECS tasks",
+ "type": "string"
+ },
+ "task_execution_role_arn": {
+ "description": "IAM role ARN for ECS task execution (pull images, write logs)",
+ "type": "string"
+ },
+ "capacity_provider": {
+ "description": "Name of the ECS capacity provider",
+ "type": "string"
+ }
+ }
+}
diff --git a/docs/examples/kubernetes/README.md b/docs/examples/kubernetes/README.md
new file mode 100644
index 0000000..34309f7
--- /dev/null
+++ b/docs/examples/kubernetes/README.md
@@ -0,0 +1,6 @@
+# Kubernetes
+
+| Flavor | Description |
+| --- | --- |
+| [kustomize](kustomize/) | Kubernetes manifests with Kustomize overlays |
+| [helm](helm/) | Helm chart values file |
diff --git a/docs/examples/kubernetes/helm-patches/README.md b/docs/examples/kubernetes/helm-patches/README.md
new file mode 100644
index 0000000..84e2e06
--- /dev/null
+++ b/docs/examples/kubernetes/helm-patches/README.md
@@ -0,0 +1,129 @@
+# Helm with Patches
+
+| Field | Value |
+| --- | --- |
+| **Mode** | `kubernetes` |
+| **Flavor** | `helm` |
+| **Platform** | `-` |
+
+## Overview
+
+Extends the base [kubernetes/helm](../helm/) example with production patches for AWS. Demonstrates setting resource limits, dedicated node scheduling, and persistence configuration on the generated `values.yaml` using `spec.patches`.
+
+For patch reference, see [Patches](../../../concepts/patches.md).
+
+## Prerequisites
+
+- Kubernetes cluster (1.24+)
+- Helm 3.x
+- SigNoz Helm chart repo (`https://charts.signoz.io`)
+
+## Configuration
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: helm
+ mode: kubernetes
+ patches:
+ # Resource limits on ClickHouse
+ - target: "deployment/values.yaml"
+ operations:
+ - op: add
+ path: /clickhouse/resources
+ value:
+ requests:
+ cpu: "2"
+ memory: "4Gi"
+ limits:
+ cpu: "4"
+ memory: "8Gi"
+
+ # Resource limits on SigNoz
+ - target: "deployment/values.yaml"
+ operations:
+ - op: add
+ path: /signoz/resources
+ value:
+ requests:
+ cpu: "500m"
+ memory: "1Gi"
+ limits:
+ cpu: "1"
+ memory: "2Gi"
+
+ # Tolerations and nodeSelector for dedicated nodes
+ - target: "deployment/values.yaml"
+ operations:
+ - op: add
+ path: /signoz/tolerations
+ value:
+ - key: "dedicated"
+ operator: "Equal"
+ value: "signoz"
+ effect: "NoSchedule"
+ - op: add
+ path: /signoz/nodeSelector
+ value:
+ node-role.kubernetes.io/observability: ""
+
+ # Resource limits on OTel Collector (ingester)
+ - target: "deployment/values.yaml"
+ operations:
+ - op: add
+ path: /otelCollector/resources
+ value:
+ requests:
+ cpu: "1"
+ memory: "2Gi"
+ limits:
+ cpu: "2"
+ memory: "4Gi"
+
+ # ClickHouse persistence
+ - target: "deployment/values.yaml"
+ operations:
+ - op: add
+ path: /clickhouse/persistence
+ value:
+ enabled: true
+ storageClass: gp3
+ size: 100Gi
+```
+
+## Deploy
+
+```bash
+foundryctl cast -f casting.yaml
+```
+
+Or step by step:
+
+```bash
+foundryctl forge -f casting.yaml
+helm install signoz signoz/signoz -f pours/deployment/values.yaml -n signoz --create-namespace
+```
+
+## Generated output
+
+```text
+pours/deployment/
+ values.yaml
+```
+
+## Customization
+
+### Resource limits
+
+Each component maps to a top-level key in the Helm chart values: `clickhouse`, `signoz`, `otelCollector`. Set `resources.requests` and `resources.limits` on each.
+
+### Tolerations and nodeSelector
+
+Schedules SigNoz on nodes labeled `node-role.kubernetes.io/observability` with a `dedicated=signoz:NoSchedule` toleration.
+
+### Persistence
+
+Configures ClickHouse persistent storage with a cloud provider storage class. Adjust `storageClass` for your provider: `gp3` on AWS, `pd-ssd` on GCP, `managed-premium` on Azure.
diff --git a/docs/examples/kubernetes/helm-patches/casting.yaml b/docs/examples/kubernetes/helm-patches/casting.yaml
new file mode 100644
index 0000000..a6b8695
--- /dev/null
+++ b/docs/examples/kubernetes/helm-patches/casting.yaml
@@ -0,0 +1,71 @@
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: helm
+ mode: kubernetes
+ patches:
+ # 1. Set resource requests and limits on ClickHouse
+ - target: "deployment/values.yaml"
+ operations:
+ - op: add
+ path: /clickhouse/resources
+ value:
+ requests:
+ cpu: "2"
+ memory: "4Gi"
+ limits:
+ cpu: "4"
+ memory: "8Gi"
+
+ # 2. Set resource requests and limits on SigNoz
+ - target: "deployment/values.yaml"
+ operations:
+ - op: add
+ path: /signoz/resources
+ value:
+ requests:
+ cpu: "500m"
+ memory: "1Gi"
+ limits:
+ cpu: "1"
+ memory: "2Gi"
+
+ # 3. Add tolerations and nodeSelector for dedicated observability nodes
+ - target: "deployment/values.yaml"
+ operations:
+ - op: add
+ path: /signoz/tolerations
+ value:
+ - key: "dedicated"
+ operator: "Equal"
+ value: "signoz"
+ effect: "NoSchedule"
+ - op: add
+ path: /signoz/nodeSelector
+ value:
+ node-role.kubernetes.io/observability: ""
+
+ # 4. Set resource requests and limits on OTel Collector (ingester)
+ - target: "deployment/values.yaml"
+ operations:
+ - op: add
+ path: /otelCollector/resources
+ value:
+ requests:
+ cpu: "1"
+ memory: "2Gi"
+ limits:
+ cpu: "2"
+ memory: "4Gi"
+
+ # 5. Set persistence on ClickHouse
+ - target: "deployment/values.yaml"
+ operations:
+ - op: add
+ path: /clickhouse/persistence
+ value:
+ enabled: true
+ storageClass: gp3
+ size: 100Gi
diff --git a/docs/examples/kubernetes/helm-patches/casting.yaml.lock b/docs/examples/kubernetes/helm-patches/casting.yaml.lock
new file mode 100644
index 0000000..476dca2
--- /dev/null
+++ b/docs/examples/kubernetes/helm-patches/casting.yaml.lock
@@ -0,0 +1,603 @@
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: helm
+ mode: kubernetes
+ ingester:
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 1s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 1s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: tcp://signoz:4320/v1/opamp
+ enabled: true
+ image: signoz/signoz-otel-collector:latest
+ version: latest
+ status:
+ addresses:
+ otlp: null
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 1s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 1s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: tcp://signoz:4320/v1/opamp
+ metastore:
+ kind: postgres
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ image: postgres:16
+ version: "16"
+ status:
+ addresses:
+ dsn:
+ - postgres://signoz-metastore-postgres:5432
+ config: {}
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ patches:
+ - operations:
+ - op: add
+ path: /clickhouse/resources
+ value:
+ limits:
+ cpu: "4"
+ memory: 8Gi
+ requests:
+ cpu: "2"
+ memory: 4Gi
+ target: deployment/values.yaml
+ - operations:
+ - op: add
+ path: /signoz/resources
+ value:
+ limits:
+ cpu: "1"
+ memory: 2Gi
+ requests:
+ cpu: 500m
+ memory: 1Gi
+ target: deployment/values.yaml
+ - operations:
+ - op: add
+ path: /signoz/tolerations
+ value:
+ - effect: NoSchedule
+ key: dedicated
+ operator: Equal
+ value: signoz
+ - op: add
+ path: /signoz/nodeSelector
+ value:
+ node-role.kubernetes.io/observability: ""
+ target: deployment/values.yaml
+ - operations:
+ - op: add
+ path: /otelCollector/resources
+ value:
+ limits:
+ cpu: "2"
+ memory: 4Gi
+ requests:
+ cpu: "1"
+ memory: 2Gi
+ target: deployment/values.yaml
+ - operations:
+ - op: add
+ path: /clickhouse/persistence
+ value:
+ enabled: true
+ size: 100Gi
+ storageClass: gp3
+ target: deployment/values.yaml
+ signoz:
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ image: signoz/signoz:latest
+ version: latest
+ status:
+ addresses:
+ apiserver: null
+ opamp:
+ - tcp://signoz:4320
+ config: {}
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ telemetrykeeper:
+ kind: clickhousekeeper
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-telemetrykeeper-zookeeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ enabled: true
+ image: clickhouse/clickhouse-keeper:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ client:
+ - tcp://signoz-telemetrykeeper-zookeeper-0:9181
+ raft:
+ - tcp://signoz-telemetrykeeper-zookeeper-0:9234
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-telemetrykeeper-zookeeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ telemetrystore:
+ kind: clickhouse
+ spec:
+ cluster:
+ replicas: 0
+ shards: 1
+ config:
+ data:
+ config.yaml: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "01"
+ shard: "01"
+ profiles:
+ default:
+ load_balancing: random
+ log_queries: 1
+ max_memory_usage: 10000000000
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ host: signoz-telemetrystore-clickhouse
+ port: 9000
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-zookeeper-0
+ port: 9181
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ enabled: true
+ image: clickhouse/clickhouse-server:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ tcp:
+ - tcp://signoz-telemetrystore-clickhouse:9000
+ config:
+ data:
+ config.yaml: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "01"
+ shard: "01"
+ profiles:
+ default:
+ load_balancing: random
+ log_queries: 1
+ max_memory_usage: 10000000000
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ host: signoz-telemetrystore-clickhouse
+ port: 9000
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-zookeeper-0
+ port: 9181
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
diff --git a/docs/examples/kubernetes/helm-patches/pours/deployment/values.yaml b/docs/examples/kubernetes/helm-patches/pours/deployment/values.yaml
new file mode 100644
index 0000000..e88b6dc
--- /dev/null
+++ b/docs/examples/kubernetes/helm-patches/pours/deployment/values.yaml
@@ -0,0 +1,96 @@
+clickhouse:
+ enabled: true
+ fullnameOverride: signoz-telemetrystore-clickhouse
+ image:
+ repository: clickhouse/clickhouse-server
+ tag: 25.5.6
+ layout:
+ replicasCount: 0
+ shardsCount: 1
+ persistence:
+ enabled: true
+ size: 100Gi
+ storageClass: gp3
+ resources:
+ limits:
+ cpu: "4"
+ memory: 8Gi
+ requests:
+ cpu: "2"
+ memory: 4Gi
+ zookeeper:
+ enabled: true
+ fullnameOverride: signoz-telemetrykeeper-zookeeper
+ image:
+ repository: signoz/zookeeper
+ tag: 3.7.1
+ replicaCount: 1
+fullnameOverride: signoz
+otelCollector:
+ enabled: true
+ image:
+ repository: signoz/signoz-otel-collector
+ tag: latest
+ name: ingester
+ ports:
+ otlp:
+ containerPort: 4317
+ enabled: true
+ protocol: TCP
+ servicePort: 4317
+ otlp-http:
+ containerPort: 4318
+ enabled: true
+ protocol: TCP
+ servicePort: 4318
+ replicaCount: 1
+ resources:
+ limits:
+ cpu: "2"
+ memory: 4Gi
+ requests:
+ cpu: "1"
+ memory: 2Gi
+postgresql:
+ auth:
+ database: signoz
+ password: signoz
+ username: signoz
+ enabled: true
+ fullnameOverride: signoz-metastore-postgres
+ image:
+ repository: postgres
+ tag: 16
+signoz:
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ image:
+ repository: signoz/signoz
+ tag: latest
+ name: signoz
+ nodeSelector:
+ node-role.kubernetes.io/observability: ""
+ replicaCount: 1
+ resources:
+ limits:
+ cpu: "1"
+ memory: 2Gi
+ requests:
+ cpu: 500m
+ memory: 1Gi
+ service:
+ internalPort: 8085
+ opampPort: 4320
+ port: 8080
+ type: ClusterIP
+ tolerations:
+ - effect: NoSchedule
+ key: dedicated
+ operator: Equal
+ value: signoz
+telemetryStoreMigrator:
+ enabled: true
+ name: signoz-telemetrystore-migrator
diff --git a/docs/examples/kubernetes/helm/README.md b/docs/examples/kubernetes/helm/README.md
new file mode 100644
index 0000000..9090003
--- /dev/null
+++ b/docs/examples/kubernetes/helm/README.md
@@ -0,0 +1,100 @@
+# Kubernetes with Helm
+
+| Field | Value |
+| --- | --- |
+| **Mode** | `kubernetes` |
+| **Flavor** | `helm` |
+| **Platform** | `-` |
+
+## Overview
+
+Generates a `values.yaml` for the SigNoz Helm chart. Foundry translates the casting spec into Helm values so you can deploy with a single `helm install`.
+
+## Prerequisites
+
+- Kubernetes cluster (1.24+)
+- Helm 3.x
+- SigNoz Helm chart repo (`https://charts.signoz.io`)
+
+## Configuration
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: helm
+ mode: kubernetes
+```
+
+## Deploy
+
+```bash
+foundryctl cast -f casting.yaml
+```
+
+Or step by step:
+
+```bash
+# Generate values.yaml
+foundryctl forge -f casting.yaml
+
+# Add the SigNoz Helm repo
+helm repo add signoz https://charts.signoz.io
+
+# Install with Helm
+helm install signoz signoz/signoz -f pours/deployment/values.yaml -n signoz --create-namespace
+```
+
+> [!NOTE]
+> `foundryctl cast` is idempotent. It detects whether a Helm release already exists and runs `helm upgrade` instead of `helm install` accordingly.
+
+## Generated output
+
+```text
+pours/deployment/
+ values.yaml
+```
+
+## After deployment
+
+```bash
+# Check pod status
+kubectl get pods -n signoz
+
+# Port-forward the SigNoz UI
+kubectl port-forward svc/signoz -n signoz 8080:8080
+```
+
+Open `http://localhost:8080` to access the SigNoz UI.
+
+## Customization
+
+To set resource limits, storage classes, or scheduling constraints on the generated `values.yaml`, use [patches](../../../concepts/patches.md). See the [helm-patches](../helm-patches/) example for a complete working configuration.
+
+## Annotations
+
+Optional annotations to override the default Helm chart source. These are not required for standard deployments.
+
+| Annotation | Default | Description |
+| --- | --- | --- |
+| `foundry.signoz.io/kubernetes-helm-casting-chart` | `signoz/signoz` | Helm chart reference |
+| `foundry.signoz.io/kubernetes-helm-casting-repo-url` | `https://charts.signoz.io` | Helm chart repository URL |
+| `foundry.signoz.io/kubernetes-helm-casting-repo-name` | `signoz` | Helm chart repository name |
+| `foundry.signoz.io/kubernetes-helm-casting-forge-chart` | - | Set to `true` to download and bundle the chart locally during forge |
+
+Example with a custom chart repo:
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+ annotations:
+ foundry.signoz.io/kubernetes-helm-casting-repo-url: https://my-registry.example.com/charts
+ foundry.signoz.io/kubernetes-helm-casting-chart: my-registry/signoz
+spec:
+ deployment:
+ flavor: helm
+ mode: kubernetes
+```
diff --git a/docs/examples/kubernetes/helm/casting.yaml b/docs/examples/kubernetes/helm/casting.yaml
new file mode 100644
index 0000000..b1f88da
--- /dev/null
+++ b/docs/examples/kubernetes/helm/casting.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: helm
+ mode: kubernetes
diff --git a/docs/examples/kubernetes/helm/casting.yaml.lock b/docs/examples/kubernetes/helm/casting.yaml.lock
new file mode 100644
index 0000000..7a12988
--- /dev/null
+++ b/docs/examples/kubernetes/helm/casting.yaml.lock
@@ -0,0 +1,645 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: helm
+ mode: kubernetes
+ ingester:
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: tcp://signoz:4320/v1/opamp
+ enabled: true
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ image: signoz/signoz-otel-collector:latest
+ version: latest
+ status:
+ addresses:
+ otlp: null
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: tcp://signoz:4320/v1/opamp
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ metastore:
+ kind: postgres
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ image: postgres:16
+ version: "16"
+ status:
+ addresses:
+ dsn:
+ - postgres://signoz-metastore-postgres:5432
+ config: {}
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ signoz:
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ image: signoz/signoz:latest
+ version: latest
+ status:
+ addresses:
+ apiserver: null
+ opamp:
+ - tcp://signoz:4320
+ config: {}
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ telemetrykeeper:
+ kind: clickhousekeeper
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-telemetrykeeper-zookeeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ enabled: true
+ image: clickhouse/clickhouse-keeper:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ client:
+ - tcp://signoz-telemetrykeeper-zookeeper-0:9181
+ raft:
+ - tcp://signoz-telemetrykeeper-zookeeper-0:9234
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-telemetrykeeper-zookeeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ telemetrystore:
+ kind: clickhouse
+ spec:
+ cluster:
+ replicas: 0
+ shards: 1
+ config:
+ data:
+ config-0-0.yaml: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: signoz-telemetrystore-clickhouse
+ port: 9000
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-zookeeper-0
+ port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ enabled: true
+ image: clickhouse/clickhouse-server:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ tcp:
+ - tcp://signoz-telemetrystore-clickhouse:9000
+ config:
+ data:
+ config-0-0.yaml: |
+ path: /var/lib/clickhouse/
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_files_path: /var/lib/clickhouse/user_files/
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ http_port: 8123
+ interserver_http_port: 9009
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ user_directories:
+ users_xml:
+ path: users.xml
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: signoz-telemetrystore-clickhouse
+ port: 9000
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-zookeeper-0
+ port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ tcp_port: 9000
+ user_defined_executable_functions_config: '*function.yaml'
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
diff --git a/docs/examples/kubernetes/helm/pours/deployment/values.yaml b/docs/examples/kubernetes/helm/pours/deployment/values.yaml
new file mode 100644
index 0000000..24a2bb0
--- /dev/null
+++ b/docs/examples/kubernetes/helm/pours/deployment/values.yaml
@@ -0,0 +1,68 @@
+clickhouse:
+ enabled: true
+ fullnameOverride: signoz-telemetrystore-clickhouse
+ image:
+ repository: clickhouse/clickhouse-server
+ tag: 25.5.6
+ layout:
+ replicasCount: 0
+ shardsCount: 1
+ zookeeper:
+ enabled: true
+ fullnameOverride: signoz-telemetrykeeper-zookeeper
+ image:
+ repository: signoz/zookeeper
+ tag: 3.7.1
+ replicaCount: 1
+fullnameOverride: signoz
+otelCollector:
+ enabled: true
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ image:
+ repository: signoz/signoz-otel-collector
+ tag: latest
+ name: ingester
+ ports:
+ otlp:
+ containerPort: 4317
+ enabled: true
+ protocol: TCP
+ servicePort: 4317
+ otlp-http:
+ containerPort: 4318
+ enabled: true
+ protocol: TCP
+ servicePort: 4318
+ replicaCount: 1
+postgresql:
+ auth:
+ database: signoz
+ password: signoz
+ username: signoz
+ enabled: true
+ fullnameOverride: signoz-metastore-postgres
+ image:
+ repository: postgres
+ tag: 16
+signoz:
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ image:
+ repository: signoz/signoz
+ tag: latest
+ name: signoz
+ replicaCount: 1
+ service:
+ internalPort: 8085
+ opampPort: 4320
+ port: 8080
+ type: ClusterIP
+telemetryStoreMigrator:
+ enabled: true
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ name: signoz-telemetrystore-migrator
diff --git a/docs/examples/kubernetes/kustomize-patches/README.md b/docs/examples/kubernetes/kustomize-patches/README.md
new file mode 100644
index 0000000..646ce6d
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/README.md
@@ -0,0 +1,159 @@
+# Kustomize with Patches
+
+| Field | Value |
+| --- | --- |
+| **Mode** | `kubernetes` |
+| **Flavor** | `kustomize` |
+| **Platform** | `-` |
+
+## Overview
+
+Extends the base [kubernetes/kustomize](../kustomize/) example with production patches for AWS. Demonstrates setting storage classes, resource limits, dedicated node scheduling, and a LoadBalancer service using `spec.patches`.
+
+For patch reference, see [Patches](../../../concepts/patches.md).
+
+## Prerequisites
+
+- Kubernetes cluster (1.24+)
+- `kubectl` with kustomize support
+- Cloud provider storage class (for example, `gp3` on AWS)
+
+## Configuration
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: kustomize
+ mode: kubernetes
+ patches:
+ # Storage class and size on ClickHouse data volumes
+ - target: "deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml"
+ operations:
+ - op: add
+ path: /spec/templates/volumeClaimTemplates/0/spec/storageClassName
+ value: gp3
+ - op: replace
+ path: /spec/templates/volumeClaimTemplates/0/spec/resources/requests/storage
+ value: 100Gi
+ - op: add
+ path: /spec/templates/volumeClaimTemplates/1/spec/storageClassName
+ value: gp3
+
+ # Resource limits on ClickHouse
+ - target: "deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml"
+ operations:
+ - op: replace
+ path: /spec/templates/podTemplates/0/spec/containers/0/resources
+ value:
+ requests:
+ cpu: "2"
+ memory: "4Gi"
+ limits:
+ cpu: "4"
+ memory: "8Gi"
+
+ # Resource limits on SigNoz
+ - target: "deployment/signoz/statefulset.yaml"
+ operations:
+ - op: replace
+ path: /spec/template/spec/containers/0/resources
+ value:
+ requests:
+ memory: "1Gi"
+ cpu: "500m"
+ limits:
+ memory: "2Gi"
+ cpu: "1"
+
+ # Tolerations and nodeSelector for dedicated nodes
+ - target: "deployment/signoz/statefulset.yaml"
+ operations:
+ - op: add
+ path: /spec/template/spec/tolerations
+ value:
+ - key: "dedicated"
+ operator: "Equal"
+ value: "signoz"
+ effect: "NoSchedule"
+ - op: add
+ path: /spec/template/spec/nodeSelector
+ value:
+ node-role.kubernetes.io/observability: ""
+
+ # LoadBalancer with AWS NLB
+ - target: "deployment/signoz/service.yaml"
+ operations:
+ - op: replace
+ path: /spec/type
+ value: LoadBalancer
+ - op: add
+ path: /metadata/annotations
+ value:
+ service.beta.kubernetes.io/aws-load-balancer-type: nlb
+
+ # Resource limits on ingester
+ - target: "deployment/ingester/deployment.yaml"
+ operations:
+ - op: replace
+ path: /spec/template/spec/containers/0/resources
+ value:
+ requests:
+ cpu: "1"
+ memory: "2Gi"
+ limits:
+ cpu: "2"
+ memory: "4Gi"
+
+ # Storage class on PostgreSQL metastore
+ - target: "deployment/metastore/postgres/statefulset.yaml"
+ operations:
+ - op: add
+ path: /spec/volumeClaimTemplates/0/spec/storageClassName
+ value: gp3
+ - op: replace
+ path: /spec/volumeClaimTemplates/0/spec/resources/requests/storage
+ value: 20Gi
+```
+
+## Deploy
+
+```bash
+foundryctl cast -f casting.yaml
+```
+
+Or step by step:
+
+```bash
+foundryctl forge -f casting.yaml
+kubectl apply -k pours/deployment/
+```
+
+## Generated output
+
+Same structure as [kubernetes/kustomize](../kustomize/), with patches applied to the generated manifests.
+
+## Customization
+
+### Storage class and size
+
+Sets the storage class on volume claim templates. Adjust for your cloud provider: `gp3` on AWS, `pd-ssd` on GCP, `managed-premium` on Azure.
+
+ClickHouse has two volume claim templates (`data-0` and `default`). Both should use the same storage class.
+
+### Resource limits
+
+Sets CPU and memory requests/limits per component. The JSON Patch path varies by resource kind:
+
+- ClickHouseInstallation: `/spec/templates/podTemplates/0/spec/containers/0/resources`
+- StatefulSet or Deployment: `/spec/template/spec/containers/0/resources`
+
+### Tolerations and nodeSelector
+
+Schedules SigNoz on nodes labeled `node-role.kubernetes.io/observability` with a `dedicated=signoz:NoSchedule` toleration.
+
+### LoadBalancer with AWS NLB
+
+Changes the SigNoz Service to `LoadBalancer` with `service.beta.kubernetes.io/aws-load-balancer-type: nlb`.
diff --git a/docs/examples/kubernetes/kustomize-patches/casting.yaml b/docs/examples/kubernetes/kustomize-patches/casting.yaml
new file mode 100644
index 0000000..c988250
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/casting.yaml
@@ -0,0 +1,96 @@
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: kustomize
+ mode: kubernetes
+ patches:
+ # 1. Set storage class and size on ClickHouse data volumes
+ # Required for cloud providers (gp3 on AWS, pd-ssd on GCP, managed-premium on Azure)
+ - target: "deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml"
+ operations:
+ - op: add
+ path: /spec/templates/volumeClaimTemplates/0/spec/storageClassName
+ value: gp3
+ - op: replace
+ path: /spec/templates/volumeClaimTemplates/0/spec/resources/requests/storage
+ value: 100Gi
+ - op: add
+ path: /spec/templates/volumeClaimTemplates/1/spec/storageClassName
+ value: gp3
+
+ # 2. Set resource limits on ClickHouse for production sizing
+ - target: "deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml"
+ operations:
+ - op: replace
+ path: /spec/templates/podTemplates/0/spec/containers/0/resources
+ value:
+ requests:
+ cpu: "2"
+ memory: "4Gi"
+ limits:
+ cpu: "4"
+ memory: "8Gi"
+
+ # 3. Set resource limits and requests on SigNoz
+ - target: "deployment/signoz/statefulset.yaml"
+ operations:
+ - op: replace
+ path: /spec/template/spec/containers/0/resources
+ value:
+ requests:
+ memory: "1Gi"
+ cpu: "500m"
+ limits:
+ memory: "2Gi"
+ cpu: "1"
+
+ # 4. Add tolerations and nodeSelector for dedicated observability nodes
+ - target: "deployment/signoz/statefulset.yaml"
+ operations:
+ - op: add
+ path: /spec/template/spec/tolerations
+ value:
+ - key: "dedicated"
+ operator: "Equal"
+ value: "signoz"
+ effect: "NoSchedule"
+ - op: add
+ path: /spec/template/spec/nodeSelector
+ value:
+ node-role.kubernetes.io/observability: ""
+
+ # 5. Change SigNoz service to LoadBalancer with AWS NLB
+ - target: "deployment/signoz/service.yaml"
+ operations:
+ - op: replace
+ path: /spec/type
+ value: LoadBalancer
+ - op: add
+ path: /metadata/annotations
+ value:
+ service.beta.kubernetes.io/aws-load-balancer-type: nlb
+
+ # 6. Set resource limits on ingester
+ - target: "deployment/ingester/deployment.yaml"
+ operations:
+ - op: replace
+ path: /spec/template/spec/containers/0/resources
+ value:
+ requests:
+ cpu: "1"
+ memory: "2Gi"
+ limits:
+ cpu: "2"
+ memory: "4Gi"
+
+ # 7. Set storage class on PostgreSQL metastore
+ - target: "deployment/metastore/postgres/statefulset.yaml"
+ operations:
+ - op: add
+ path: /spec/volumeClaimTemplates/0/spec/storageClassName
+ value: gp3
+ - op: replace
+ path: /spec/volumeClaimTemplates/0/spec/resources/requests/storage
+ value: 20Gi
diff --git a/docs/examples/kubernetes/kustomize-patches/casting.yaml.lock b/docs/examples/kubernetes/kustomize-patches/casting.yaml.lock
new file mode 100644
index 0000000..3e83f4a
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/casting.yaml.lock
@@ -0,0 +1,819 @@
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: kustomize
+ mode: kubernetes
+ ingester:
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 1s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 1s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-clickhouse:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-clickhouse:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz-signoz:4320/v1/opamp
+ enabled: true
+ image: signoz/signoz-otel-collector:latest
+ version: latest
+ status:
+ addresses:
+ otlp: null
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 1s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 1s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-clickhouse:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-clickhouse:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz-signoz:4320/v1/opamp
+ metastore:
+ kind: postgres
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ image: postgres:16
+ version: "16"
+ status:
+ addresses:
+ dsn:
+ - postgres://signoz-metastore:5432
+ config: {}
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ patches:
+ - operations:
+ - op: add
+ path: /spec/templates/volumeClaimTemplates/0/spec/storageClassName
+ value: gp3
+ - op: replace
+ path: /spec/templates/volumeClaimTemplates/0/spec/resources/requests/storage
+ value: 100Gi
+ - op: add
+ path: /spec/templates/volumeClaimTemplates/1/spec/storageClassName
+ value: gp3
+ target: deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml
+ - operations:
+ - op: replace
+ path: /spec/templates/podTemplates/0/spec/containers/0/resources
+ value:
+ limits:
+ cpu: "4"
+ memory: 8Gi
+ requests:
+ cpu: "2"
+ memory: 4Gi
+ target: deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml
+ - operations:
+ - op: replace
+ path: /spec/template/spec/containers/0/resources
+ value:
+ limits:
+ cpu: "1"
+ memory: 2Gi
+ requests:
+ cpu: 500m
+ memory: 1Gi
+ target: deployment/signoz/statefulset.yaml
+ - operations:
+ - op: add
+ path: /spec/template/spec/tolerations
+ value:
+ - effect: NoSchedule
+ key: dedicated
+ operator: Equal
+ value: signoz
+ - op: add
+ path: /spec/template/spec/nodeSelector
+ value:
+ node-role.kubernetes.io/observability: ""
+ target: deployment/signoz/statefulset.yaml
+ - operations:
+ - op: replace
+ path: /spec/type
+ value: LoadBalancer
+ - op: add
+ path: /metadata/annotations
+ value:
+ service.beta.kubernetes.io/aws-load-balancer-type: nlb
+ target: deployment/signoz/service.yaml
+ - operations:
+ - op: replace
+ path: /spec/template/spec/containers/0/resources
+ value:
+ limits:
+ cpu: "2"
+ memory: 4Gi
+ requests:
+ cpu: "1"
+ memory: 2Gi
+ target: deployment/ingester/deployment.yaml
+ - operations:
+ - op: add
+ path: /spec/volumeClaimTemplates/0/spec/storageClassName
+ value: gp3
+ - op: replace
+ path: /spec/volumeClaimTemplates/0/spec/resources/requests/storage
+ value: 20Gi
+ target: deployment/metastore/postgres/statefulset.yaml
+ signoz:
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-clickhouse:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ image: signoz/signoz:latest
+ version: latest
+ status:
+ addresses:
+ apiserver: null
+ opamp:
+ - ws://signoz-signoz:4320
+ config: {}
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-clickhouse:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ telemetrykeeper:
+ kind: clickhousekeeper
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-clickhouse-keeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ enabled: true
+ image: clickhouse/clickhouse-keeper:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ client:
+ - tcp://signoz-clickhouse-keeper-0:9181
+ raft:
+ - tcp://signoz-clickhouse-keeper-0:9234
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-clickhouse-keeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ telemetrystore:
+ kind: clickhouse
+ spec:
+ cluster:
+ replicas: 0
+ shards: 1
+ config:
+ data:
+ config.yaml: |
+ async_load_databases: false
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ error_log:
+ ttl: event_date + INTERVAL 7 DAY DELETE
+ format_schema_path: /etc/clickhouse-server/config.d/
+ http_port: 8123
+ interserver_http_port: 9009
+ latency_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ names:
+ date_time: date_time
+ level: level
+ logger_name: logger_name
+ message: message
+ query_id: query_id
+ source_file: source_file
+ source_line: source_line
+ thread_id: thread_id
+ thread_name: thread_name
+ type: json
+ level: information
+ size: 1000M
+ macros:
+ replica: "01"
+ shard: "01"
+ merge_tree:
+ storage_policy: data
+ path: /var/lib/clickhouse/
+ profiles:
+ admin:
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ default:
+ allow_experimental_window_functions: "1"
+ allow_nondeterministic_mutations: "1"
+ load_balancing: random
+ log_queries: 1
+ max_memory_usage: 10000000000
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ prometheus:
+ endpoint: /metrics
+ port: 9363
+ query_metric_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ host: signoz-clickhouse
+ port: 9000
+ send_crash_reports:
+ enabled: false
+ storage_configuration:
+ disks:
+ data0:
+ keep_free_space_bytes: 10485760
+ path: /mnt/data-0/
+ default: {}
+ policies:
+ data:
+ volumes:
+ data0:
+ disk: data0
+ default:
+ volumes:
+ default:
+ disk: default
+ tcp_port: 9000
+ text_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_defined_executable_functions_config: /etc/clickhouse-server/functions/custom-functions.xml
+ user_directories:
+ users_xml:
+ path: users.xml
+ user_files_path: /var/lib/clickhouse/user_files/
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ admin:
+ networks:
+ ip:
+ - 10.0.0.0/8
+ - 100.64.0.0/10
+ - 172.16.0.0/12
+ - 192.0.0.0/24
+ - 198.18.0.0/15
+ - 192.168.0.0/16
+ password: 27ff0399-0d3a-4bd8-919d-17c2181e6fb9
+ profile: default
+ quota: default
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ zookeeper:
+ node:
+ - host: signoz-clickhouse-keeper-0
+ port: 9181
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ enabled: true
+ image: clickhouse/clickhouse-server:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ tcp:
+ - tcp://signoz-clickhouse:9000
+ config:
+ data:
+ config.yaml: |
+ async_load_databases: false
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ error_log:
+ ttl: event_date + INTERVAL 7 DAY DELETE
+ format_schema_path: /etc/clickhouse-server/config.d/
+ http_port: 8123
+ interserver_http_port: 9009
+ latency_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ names:
+ date_time: date_time
+ level: level
+ logger_name: logger_name
+ message: message
+ query_id: query_id
+ source_file: source_file
+ source_line: source_line
+ thread_id: thread_id
+ thread_name: thread_name
+ type: json
+ level: information
+ size: 1000M
+ macros:
+ replica: "01"
+ shard: "01"
+ merge_tree:
+ storage_policy: data
+ path: /var/lib/clickhouse/
+ profiles:
+ admin:
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ default:
+ allow_experimental_window_functions: "1"
+ allow_nondeterministic_mutations: "1"
+ load_balancing: random
+ log_queries: 1
+ max_memory_usage: 10000000000
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ prometheus:
+ endpoint: /metrics
+ port: 9363
+ query_metric_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ host: signoz-clickhouse
+ port: 9000
+ send_crash_reports:
+ enabled: false
+ storage_configuration:
+ disks:
+ data0:
+ keep_free_space_bytes: 10485760
+ path: /mnt/data-0/
+ default: {}
+ policies:
+ data:
+ volumes:
+ data0:
+ disk: data0
+ default:
+ volumes:
+ default:
+ disk: default
+ tcp_port: 9000
+ text_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_defined_executable_functions_config: /etc/clickhouse-server/functions/custom-functions.xml
+ user_directories:
+ users_xml:
+ path: users.xml
+ user_files_path: /var/lib/clickhouse/user_files/
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ admin:
+ networks:
+ ip:
+ - 10.0.0.0/8
+ - 100.64.0.0/10
+ - 172.16.0.0/12
+ - 192.0.0.0/24
+ - 198.18.0.0/15
+ - 192.168.0.0/16
+ password: 27ff0399-0d3a-4bd8-919d-17c2181e6fb9
+ profile: default
+ quota: default
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ zookeeper:
+ node:
+ - host: signoz-clickhouse-keeper-0
+ port: 9181
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ extras:
+ _overrides: |
+ async_load_databases: false
+ error_log:
+ ttl: event_date + INTERVAL 7 DAY DELETE
+ format_schema_path: /etc/clickhouse-server/config.d/
+ latency_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ logger:
+ formatting:
+ names:
+ date_time: date_time
+ level: level
+ logger_name: logger_name
+ message: message
+ query_id: query_id
+ source_file: source_file
+ source_line: source_line
+ thread_id: thread_id
+ thread_name: thread_name
+ type: json
+ merge_tree:
+ storage_policy: data
+ profiles:
+ admin:
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ default:
+ allow_experimental_window_functions: "1"
+ allow_nondeterministic_mutations: "1"
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ prometheus:
+ endpoint: /metrics
+ port: 9363
+ query_metric_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ send_crash_reports:
+ enabled: false
+ storage_configuration:
+ disks:
+ data0:
+ keep_free_space_bytes: 10485760
+ path: /mnt/data-0/
+ default: {}
+ policies:
+ data:
+ volumes:
+ data0:
+ disk: data0
+ default:
+ volumes:
+ default:
+ disk: default
+ text_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ user_defined_executable_functions_config: /etc/clickhouse-server/functions/custom-functions.xml
+ users:
+ admin:
+ networks:
+ ip:
+ - 10.0.0.0/8
+ - 100.64.0.0/10
+ - 172.16.0.0/12
+ - 192.0.0.0/24
+ - 198.18.0.0/15
+ - 192.168.0.0/16
+ password: 27ff0399-0d3a-4bd8-919d-17c2181e6fb9
+ profile: default
+ quota: default
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/clusterrole.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/clusterrole.yaml
new file mode 100644
index 0000000..4cbeaa5
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/clusterrole.yaml
@@ -0,0 +1,184 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator
+rules:
+- apiGroups:
+ - ""
+ resources:
+ - configmaps
+ - services
+ - persistentvolumeclaims
+ - secrets
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - create
+ - delete
+- apiGroups:
+ - ""
+ resources:
+ - endpoints
+ verbs:
+ - get
+ - list
+ - watch
+- apiGroups:
+ - ""
+ resources:
+ - events
+ verbs:
+ - create
+- apiGroups:
+ - ""
+ resources:
+ - persistentvolumes
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+- apiGroups:
+ - ""
+ resources:
+ - pods
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - delete
+- apiGroups:
+ - ""
+ resources:
+ - secrets
+ verbs:
+ - get
+ - list
+- apiGroups:
+ - apps
+ resources:
+ - statefulsets
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - create
+ - delete
+- apiGroups:
+ - apps
+ resources:
+ - replicasets
+ verbs:
+ - get
+ - patch
+ - update
+ - delete
+- apiGroups:
+ - apps
+ resourceNames:
+ - clickhouse-operator
+ resources:
+ - deployments
+ verbs:
+ - get
+ - patch
+ - update
+ - delete
+- apiGroups:
+ - policy
+ resources:
+ - poddisruptionbudgets
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - create
+ - delete
+- apiGroups:
+ - apiextensions.k8s.io
+ resources:
+ - customresourcedefinitions
+ verbs:
+ - get
+ - list
+- apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallations
+ verbs:
+ - get
+ - list
+ - watch
+ - patch
+ - update
+ - delete
+- apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallationtemplates
+ - clickhouseoperatorconfigurations
+ verbs:
+ - get
+ - list
+ - watch
+- apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallations/finalizers
+ - clickhouseinstallationtemplates/finalizers
+ - clickhouseoperatorconfigurations/finalizers
+ verbs:
+ - update
+- apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallations/status
+ - clickhouseinstallationtemplates/status
+ - clickhouseoperatorconfigurations/status
+ verbs:
+ - get
+ - update
+ - patch
+ - create
+ - delete
+- apiGroups:
+ - clickhouse-keeper.altinity.com
+ resources:
+ - clickhousekeeperinstallations
+ verbs:
+ - get
+ - list
+ - watch
+ - patch
+ - update
+ - delete
+- apiGroups:
+ - clickhouse-keeper.altinity.com
+ resources:
+ - clickhousekeeperinstallations/finalizers
+ verbs:
+ - update
+- apiGroups:
+ - clickhouse-keeper.altinity.com
+ resources:
+ - clickhousekeeperinstallations/status
+ verbs:
+ - get
+ - update
+ - patch
+ - create
+ - delete
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/clusterrolebinding.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/clusterrolebinding.yaml
new file mode 100644
index 0000000..baf43b7
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/clusterrolebinding.yaml
@@ -0,0 +1,16 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: signoz-telemetrystore-clickhouse-operator
+subjects:
+- kind: ServiceAccount
+ name: signoz-telemetrystore-clickhouse-operator
+ namespace: signoz
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/configmap.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/configmap.yaml
new file mode 100644
index 0000000..ec74edf
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/configmap.yaml
@@ -0,0 +1,576 @@
+apiVersion: v1
+data: null
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-etc-confd-files
+---
+apiVersion: v1
+data:
+ 01-clickhouse-01-listen.xml: |
+
+
+ ::
+ 0.0.0.0
+ 1
+
+ 01-clickhouse-02-logger.xml: |
+
+
+
+ warning
+
+ json
+
+ /var/log/clickhouse-server/clickhouse-server.log
+ /var/log/clickhouse-server/clickhouse-server.err.log
+ 1000M
+ 10
+
+ 1
+
+
+ 01-clickhouse-03-query_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+ 01-clickhouse-04-part_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+ 01-clickhouse-05-trace_log.xml: |-
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-06-asynchronous_insert_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-07-asynchronous_metric_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+ 01-clickhouse-08-backup_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-09-blob_storage_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-10-crash_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 14 day
+ 7500
+
+
+ 01-clickhouse-11-metric_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+ 01-clickhouse-12-query_thread_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+ 01-clickhouse-13-query_views_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-14-session_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-15-zookeeper_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-16-processors_profile_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-etc-configd-files
+---
+apiVersion: v1
+data:
+ config.yaml: |-
+ annotation:
+ exclude:
+ - argocd.argoproj.io/tracking-id
+ include: []
+ clickhouse:
+ access:
+ password: ""
+ port: 8123
+ rootCA: ""
+ scheme: auto
+ secret:
+ name: "clickhouse-operator"
+ namespace: "signoz"
+ timeouts:
+ connect: 1
+ query: 4
+ username: ""
+ addons:
+ rules:
+ - spec:
+ configuration:
+ files: null
+ profiles: null
+ quotas: null
+ settings: null
+ users: null
+ version: '*'
+ - spec:
+ configuration:
+ files: null
+ profiles: null
+ quotas: null
+ settings: null
+ users:
+ '{clickhouseOperatorUser}/access_management': 1
+ '{clickhouseOperatorUser}/named_collection_control': 1
+ '{clickhouseOperatorUser}/show_named_collections': 1
+ '{clickhouseOperatorUser}/show_named_collections_secrets': 1
+ version: '>= 23.3'
+ - spec:
+ configuration:
+ files: null
+ profiles:
+ clickhouse_operator/format_display_secrets_in_show_and_select: 1
+ quotas: null
+ settings:
+ display_secrets_in_show_and_select: 1
+ users: null
+ version: '>= 23.5'
+ configuration:
+ file:
+ path:
+ common: chi/config.d
+ host: chi/conf.d
+ user: chi/users.d
+ network:
+ hostRegexpTemplate: (chi-{chi}-[^.]+\d+-\d+|clickhouse\-{chi})\.{namespace}\.svc\.cluster\.local$
+ user:
+ default:
+ networksIP:
+ - ::1
+ - 127.0.0.1
+ password: default
+ profile: default
+ quota: default
+ configurationRestartPolicy:
+ rules:
+ - rules:
+ - settings/*: "yes"
+ - settings/access_control_path: "no"
+ - settings/dictionaries_config: "no"
+ - settings/max_server_memory_*: "no"
+ - settings/max_*_to_drop: "no"
+ - settings/max_concurrent_queries: "no"
+ - settings/models_config: "no"
+ - settings/user_defined_executable_functions_config: "no"
+ - settings/logger/*: "no"
+ - settings/macros/*: "no"
+ - settings/remote_servers/*: "no"
+ - settings/user_directories/*: "no"
+ - settings/display_secrets_in_show_and_select: "no"
+ - zookeeper/*: "yes"
+ - files/*.xml: "yes"
+ - files/config.d/*.xml: "yes"
+ - files/config.d/*dict*.xml: "no"
+ - files/config.d/*no_restart*: "no"
+ - profiles/default/background_*_pool_size: "yes"
+ - profiles/default/max_*_for_server: "yes"
+ version: '*'
+ - rules:
+ - settings/logger: "yes"
+ version: 21.*
+ metrics:
+ timeouts:
+ collect: 9
+ keeper:
+ configuration:
+ file:
+ path:
+ common: chk/keeper_config.d
+ host: chk/conf.d
+ user: chk/users.d
+ label:
+ appendScope: "no"
+ exclude: []
+ include: []
+ logger:
+ alsologtostderr: "false"
+ log_backtrace_at: ""
+ logtostderr: "true"
+ stderrthreshold: ""
+ v: "1"
+ vmodule: ""
+ metrics:
+ labels:
+ exclude: []
+ pod:
+ terminationGracePeriod: 30
+ reconcile:
+ host:
+ wait:
+ exclude: true
+ include: false
+ queries: true
+ replicas:
+ all: false
+ delay: 10
+ new: true
+ runtime:
+ reconcileCHIsThreadsNumber: 10
+ reconcileShardsMaxConcurrencyPercent: 50
+ reconcileShardsThreadsNumber: 5
+ statefulSet:
+ create:
+ onFailure: ignore
+ update:
+ onFailure: abort
+ pollInterval: 5
+ timeout: 300
+ statefulSet:
+ revisionHistoryLimit: 0
+ status:
+ fields:
+ action: false
+ actions: false
+ error: false
+ errors: false
+ template:
+ chi:
+ path: chi/templates.d
+ policy: ApplyOnNextReconcile
+ chk:
+ path: chk/templates.d
+ policy: ApplyOnNextReconcile
+ watch:
+ namespaces:
+ - ".*"
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-etc-files
+---
+apiVersion: v1
+data:
+ 001-templates.json.example: |
+ {
+ "apiVersion": "clickhouse.altinity.com/v1",
+ "kind": "ClickHouseInstallationTemplate",
+ "metadata": {
+ "name": "01-default-volumeclaimtemplate"
+ },
+ "spec": {
+ "templates": {
+ "volumeClaimTemplates": [
+ {
+ "name": "chi-default-volume-claim-template",
+ "spec": {
+ "accessModes": [
+ "ReadWriteOnce"
+ ],
+ "resources": {
+ "requests": {
+ "storage": "2Gi"
+ }
+ }
+ }
+ }
+ ],
+ "podTemplates": [
+ {
+ "name": "chi-default-oneperhost-pod-template",
+ "distribution": "OnePerHost",
+ "spec": {
+ "containers" : [
+ {
+ "name": "clickhouse",
+ "image": "clickhouse/clickhouse-server:23.8",
+ "ports": [
+ {
+ "name": "http",
+ "containerPort": 8123
+ },
+ {
+ "name": "client",
+ "containerPort": 9000
+ },
+ {
+ "name": "interserver",
+ "containerPort": 9009
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ }
+ default-pod-template.yaml.example: |
+ apiVersion: "clickhouse.altinity.com/v1"
+ kind: "ClickHouseInstallationTemplate"
+ metadata:
+ name: "default-oneperhost-pod-template"
+ spec:
+ templates:
+ podTemplates:
+ - name: default-oneperhost-pod-template
+ distribution: "OnePerHost"
+ default-storage-template.yaml.example: |
+ apiVersion: "clickhouse.altinity.com/v1"
+ kind: "ClickHouseInstallationTemplate"
+ metadata:
+ name: "default-storage-template-2Gi"
+ spec:
+ templates:
+ volumeClaimTemplates:
+ - name: default-storage-template-2Gi
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 2Gi
+ readme: Templates in this folder are packaged with an operator and available via 'useTemplate'
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-etc-templatesd-files
+---
+apiVersion: v1
+data:
+ 01-clickhouse-user.xml: |
+
+
+
+
+ 127.0.0.1
+
+
+ clickhouse_operator
+ default
+
+
+
+
+ 0
+ 1
+ 10
+
+
+
+ 02-clickhouse-default-profile.xml: |
+
+
+
+ 1
+ 1000
+ 1
+ 1
+
+
+
+ 03-database-ordinary.xml: |
+
+
+
+ Ordinary
+
+
+
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-etc-usersd-files
+---
+apiVersion: v1
+data: null
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-confd-files
+---
+apiVersion: v1
+data:
+ 01-keeper-01-default-config.xml: |
+
+
+
+
+
+
+
+
+
+ 10000
+ 10000
+ information
+ 100000
+
+ true
+ /var/lib/clickhouse-keeper/coordination/logs
+ /var/lib/clickhouse-keeper/coordination/snapshots
+ /var/lib/clickhouse-keeper
+ 2181
+
+ ::
+ 0.0.0.0
+ 1
+
+ 1
+ information
+
+ 4096
+
+ 01-keeper-02-readiness.xml: |
+
+
+
+
+
+
+
+
+
+ 9182
+
+ /ready
+
+
+
+
+ 01-keeper-03-enable-reconfig.xml: |-
+
+
+
+
+
+
+
+
+ false
+
+
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-configd-files
+---
+apiVersion: v1
+data:
+ readme: Templates in this folder are packaged with an operator and available via 'useTemplate'
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-templatesd-files
+---
+apiVersion: v1
+data: null
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-usersd-files
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/deployment.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/deployment.yaml
new file mode 100644
index 0000000..a3ce2fe
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/deployment.yaml
@@ -0,0 +1,208 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ template:
+ metadata:
+ annotations:
+ checksum/confd-files: 6a503b551565d380d3b4ea4b4c48a66629379558aa6cf0919d55f88f3cb4f56b
+ checksum/configd-files: a8b2e79da1b016cb2fa1e1b3d61f1edd8872af054a7419040c28b15a236bdc24
+ checksum/files: 420251c3f150460f0b1b15211b9c0b965c16342055c2f3a5a57768d229b2ddd0
+ checksum/keeper-confd-files: c17fcdc4ce46db171e44a8e5036cafb7173a9806470fafdef717cc3c01318470
+ checksum/keeper-configd-files: beed860cfbb0c9e2a0b266f65dee8cbaf22990dc3e200c93b74e697b3cf4c9df
+ checksum/keeper-templatesd-files: a47abf45edf0f439048648e3d6d1ecede35e560a76f32d8a4aa6055e0fcf58a8
+ checksum/keeper-usersd-files: 2fbf34a572990f10fe9bf11c9884c5e847a1a23a02f0728e83bac4f4f9036797
+ checksum/templatesd-files: bfbe2e3230fe68164813fcaf74c5cc06b11878c26c764476399ac8803c8bde1c
+ checksum/usersd-files: c609c91ce94021945657aae781f199517cbc6f2c1f603238c88004f8acf84f95
+ clickhouse-operator-metrics/port: "9999"
+ clickhouse-operator-metrics/scrape: "true"
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ spec:
+ containers:
+ - env:
+ - name: OPERATOR_POD_NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ - name: OPERATOR_POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: OPERATOR_POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: OPERATOR_POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: OPERATOR_POD_SERVICE_ACCOUNT
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.serviceAccountName
+ - name: OPERATOR_CONTAINER_CPU_REQUEST
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: requests.cpu
+ - name: OPERATOR_CONTAINER_CPU_LIMIT
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: limits.cpu
+ - name: OPERATOR_CONTAINER_MEM_REQUEST
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: requests.memory
+ - name: OPERATOR_CONTAINER_MEM_LIMIT
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: limits.memory
+ image: altinity/clickhouse-operator:0.25.3
+ imagePullPolicy: IfNotPresent
+ name: operator
+ ports:
+ - containerPort: 9999
+ name: op-metrics
+ resources:
+ requests:
+ cpu: 1000m
+ memory: 2Gi
+ securityContext: {}
+ volumeMounts:
+ - mountPath: /etc/clickhouse-operator
+ name: etc-clickhouse-operator-folder
+ - mountPath: /etc/clickhouse-operator/chi/conf.d
+ name: etc-clickhouse-operator-confd-folder
+ - mountPath: /etc/clickhouse-operator/chi/config.d
+ name: etc-clickhouse-operator-configd-folder
+ - mountPath: /etc/clickhouse-operator/chi/templates.d
+ name: etc-clickhouse-operator-templatesd-folder
+ - mountPath: /etc/clickhouse-operator/chi/users.d
+ name: etc-clickhouse-operator-usersd-folder
+ - mountPath: /etc/clickhouse-operator/chk/conf.d
+ name: etc-keeper-operator-confd-folder
+ - mountPath: /etc/clickhouse-operator/chk/keeper_config.d
+ name: etc-keeper-operator-configd-folder
+ - mountPath: /etc/clickhouse-operator/chk/templates.d
+ name: etc-keeper-operator-templatesd-folder
+ - mountPath: /etc/clickhouse-operator/chk/users.d
+ name: etc-keeper-operator-usersd-folder
+ - env:
+ - name: OPERATOR_POD_NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ - name: OPERATOR_POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: OPERATOR_POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: OPERATOR_POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: OPERATOR_POD_SERVICE_ACCOUNT
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.serviceAccountName
+ - name: OPERATOR_CONTAINER_CPU_REQUEST
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: requests.cpu
+ - name: OPERATOR_CONTAINER_CPU_LIMIT
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: limits.cpu
+ - name: OPERATOR_CONTAINER_MEM_REQUEST
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: requests.memory
+ - name: OPERATOR_CONTAINER_MEM_LIMIT
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: limits.memory
+ image: altinity/metrics-exporter:0.25.3
+ imagePullPolicy: IfNotPresent
+ name: metrics-exporter
+ ports:
+ - containerPort: 8888
+ name: ch-metrics
+ resources:
+ requests:
+ cpu: 100m
+ memory: 256Mi
+ securityContext: {}
+ volumeMounts:
+ - mountPath: /etc/clickhouse-operator
+ name: etc-clickhouse-operator-folder
+ - mountPath: /etc/clickhouse-operator/chi/conf.d
+ name: etc-clickhouse-operator-confd-folder
+ - mountPath: /etc/clickhouse-operator/chi/config.d
+ name: etc-clickhouse-operator-configd-folder
+ - mountPath: /etc/clickhouse-operator/chi/templates.d
+ name: etc-clickhouse-operator-templatesd-folder
+ - mountPath: /etc/clickhouse-operator/chi/users.d
+ name: etc-clickhouse-operator-usersd-folder
+ - mountPath: /etc/clickhouse-operator/chk/conf.d
+ name: etc-keeper-operator-confd-folder
+ - mountPath: /etc/clickhouse-operator/chk/keeper_config.d
+ name: etc-keeper-operator-configd-folder
+ - mountPath: /etc/clickhouse-operator/chk/templates.d
+ name: etc-keeper-operator-templatesd-folder
+ - mountPath: /etc/clickhouse-operator/chk/users.d
+ name: etc-keeper-operator-usersd-folder
+ nodeSelector:
+ kubernetes.io/os: linux
+ serviceAccountName: signoz-telemetrystore-clickhouse-operator
+ volumes:
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-etc-files
+ name: etc-clickhouse-operator-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-etc-confd-files
+ name: etc-clickhouse-operator-confd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-etc-configd-files
+ name: etc-clickhouse-operator-configd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-etc-templatesd-files
+ name: etc-clickhouse-operator-templatesd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-etc-usersd-files
+ name: etc-clickhouse-operator-usersd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-confd-files
+ name: etc-keeper-operator-confd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-configd-files
+ name: etc-keeper-operator-configd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-templatesd-files
+ name: etc-keeper-operator-templatesd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-usersd-files
+ name: etc-keeper-operator-usersd-folder
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/kustomization.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/kustomization.yaml
new file mode 100644
index 0000000..6ed5d3e
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/kustomization.yaml
@@ -0,0 +1,9 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- serviceaccount.yaml
+- configmap.yaml
+- clusterrole.yaml
+- clusterrolebinding.yaml
+- service.yaml
+- deployment.yaml
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/service.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/service.yaml
new file mode 100644
index 0000000..98ebb4f
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/service.yaml
@@ -0,0 +1,17 @@
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-metrics
+spec:
+ ports:
+ - name: ch-metrics
+ port: 8888
+ - name: op-metrics
+ port: 9999
+ selector:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/serviceaccount.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/serviceaccount.yaml
new file mode 100644
index 0000000..6e3cb19
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/clickhouse-operator/serviceaccount.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/configmap.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/configmap.yaml
new file mode 100644
index 0000000..88e9d4c
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/configmap.yaml
@@ -0,0 +1,135 @@
+apiVersion: v1
+data:
+ ingester.yaml: |-
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 1s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 1s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-clickhouse:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-clickhouse:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: 'server_endpoint: ws://signoz-signoz:4320/v1/opamp'
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-ingester
+ name: signoz-ingester
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/deployment.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/deployment.yaml
new file mode 100644
index 0000000..c051469
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/deployment.yaml
@@ -0,0 +1,121 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ labels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-ingester
+ name: signoz-ingester
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-ingester
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-ingester
+ spec:
+ containers:
+ - args:
+ - --config=/conf/ingester.yaml
+ - --manager-config=/conf/opamp.yaml
+ - --copy-path=/var/tmp/collector-config.yaml
+ command:
+ - /signoz-otel-collector
+ env:
+ - name: K8S_NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ - name: K8S_POD_IP
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: status.podIP
+ - name: K8S_HOST_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.hostIP
+ - name: K8S_POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: K8S_POD_UID
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.uid
+ - name: K8S_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ livenessProbe:
+ failureThreshold: 6
+ httpGet:
+ path: /
+ port: 13133
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ name: collector
+ ports:
+ - containerPort: 4317
+ name: otlp-grpc
+ protocol: TCP
+ - containerPort: 4318
+ name: otlp-http
+ protocol: TCP
+ - containerPort: 13133
+ name: health
+ protocol: TCP
+ readinessProbe:
+ failureThreshold: 6
+ httpGet:
+ path: /
+ port: 13133
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ resources:
+ limits:
+ cpu: "2"
+ memory: 4Gi
+ requests:
+ cpu: "1"
+ memory: 2Gi
+ volumeMounts:
+ - mountPath: /conf
+ name: ingester-config-vol
+ initContainers:
+ - args:
+ - migrate
+ - sync
+ - check
+ command:
+ - /signoz-otel-collector
+ env:
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER
+ value: cluster
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION
+ value: "true"
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ name: check
+ serviceAccountName: signoz-ingester
+ volumes:
+ - configMap:
+ name: signoz-ingester
+ name: ingester-config-vol
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/kustomization.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/kustomization.yaml
new file mode 100644
index 0000000..025ce64
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/kustomization.yaml
@@ -0,0 +1,7 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- serviceaccount.yaml
+- configmap.yaml
+- service.yaml
+- deployment.yaml
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/service.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/service.yaml
new file mode 100644
index 0000000..d26ad2b
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/service.yaml
@@ -0,0 +1,28 @@
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-ingester
+ name: signoz-ingester
+spec:
+ ports:
+ - name: otlp-grpc
+ port: 4317
+ protocol: TCP
+ targetPort: 4317
+ - name: otlp-http
+ port: 4318
+ protocol: TCP
+ targetPort: 4318
+ - name: health
+ port: 13133
+ protocol: TCP
+ targetPort: 13133
+ selector:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-ingester
+ type: ClusterIP
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/serviceaccount.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/serviceaccount.yaml
new file mode 100644
index 0000000..472df92
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/ingester/serviceaccount.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-ingester
+ name: signoz-ingester
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/kustomization.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/kustomization.yaml
new file mode 100644
index 0000000..2f960b3
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/kustomization.yaml
@@ -0,0 +1,12 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+namespace: signoz
+resources:
+- namespace.yaml
+- clickhouse-operator
+- telemetrystore/clickhouse
+- telemetrykeeper/clickhousekeeper
+- telemetrystore-migrator
+- metastore/postgres
+- signoz
+- ingester
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/kustomization.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/kustomization.yaml
new file mode 100644
index 0000000..7fcd38a
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/kustomization.yaml
@@ -0,0 +1,6 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- serviceaccount.yaml
+- service.yaml
+- statefulset.yaml
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/service.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/service.yaml
new file mode 100644
index 0000000..b858a59
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-metastore
+ name: signoz-metastore
+spec:
+ ports:
+ - name: tcp-postgresql
+ port: 5432
+ protocol: TCP
+ targetPort: tcp-postgresql
+ selector:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-metastore
+ type: ClusterIP
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/serviceaccount.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/serviceaccount.yaml
new file mode 100644
index 0000000..f64d89d
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/serviceaccount.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-metastore
+ name: signoz-metastore
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/statefulset.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/statefulset.yaml
new file mode 100644
index 0000000..61be1e1
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/metastore/postgres/statefulset.yaml
@@ -0,0 +1,88 @@
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ labels:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-metastore
+ name: signoz-metastore
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-metastore
+ serviceName: signoz-metastore
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-metastore
+ spec:
+ containers:
+ - env:
+ - name: POSTGRESQL_VOLUME_DIR
+ value: /var/lib/postgresql
+ - name: POSTGRESQL_PORT_NUMBER
+ value: "5432"
+ - name: PGDATA
+ value: /var/lib/postgresql/data
+ - name: POSTGRES_DB
+ value: signoz
+ - name: POSTGRES_PASSWORD
+ value: signoz
+ - name: POSTGRES_USER
+ value: signoz
+ image: postgres:16
+ imagePullPolicy: IfNotPresent
+ livenessProbe:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - exec pg_isready -U "$POSTGRES_USER" -h 127.0.0.1 -p 5432
+ failureThreshold: 6
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ name: postgres
+ ports:
+ - containerPort: 5432
+ name: tcp-postgresql
+ protocol: TCP
+ readinessProbe:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - exec pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB" -h 127.0.0.1 -p
+ 5432
+ failureThreshold: 6
+ initialDelaySeconds: 5
+ periodSeconds: 5
+ successThreshold: 1
+ timeoutSeconds: 3
+ resources:
+ requests:
+ cpu: 100m
+ memory: 128Mi
+ volumeMounts:
+ - mountPath: /var/lib/postgresql
+ name: pgdata
+ serviceAccountName: signoz-metastore
+ volumeClaimTemplates:
+ - apiVersion: v1
+ kind: PersistentVolumeClaim
+ metadata:
+ name: pgdata
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 20Gi
+ storageClassName: gp3
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/namespace.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/namespace.yaml
new file mode 100644
index 0000000..b0391bc
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/namespace.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: signoz
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/kustomization.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/kustomization.yaml
new file mode 100644
index 0000000..7fcd38a
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/kustomization.yaml
@@ -0,0 +1,6 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- serviceaccount.yaml
+- service.yaml
+- statefulset.yaml
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/service.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/service.yaml
new file mode 100644
index 0000000..6759417
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/service.yaml
@@ -0,0 +1,26 @@
+apiVersion: v1
+kind: Service
+metadata:
+ annotations:
+ service.beta.kubernetes.io/aws-load-balancer-type: nlb
+ labels:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-signoz
+ name: signoz-signoz
+spec:
+ ports:
+ - name: http
+ port: 8080
+ protocol: TCP
+ targetPort: http
+ - name: opamp
+ port: 4320
+ protocol: TCP
+ targetPort: opamp
+ selector:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-signoz
+ type: LoadBalancer
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/serviceaccount.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/serviceaccount.yaml
new file mode 100644
index 0000000..390b499
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/serviceaccount.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-signoz
+ name: signoz-signoz
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/statefulset.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/statefulset.yaml
new file mode 100644
index 0000000..0eb3c19
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/signoz/statefulset.yaml
@@ -0,0 +1,77 @@
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ labels:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-signoz
+ name: signoz-signoz
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-signoz
+ serviceName: signoz-signoz
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-signoz
+ spec:
+ containers:
+ - env:
+ - name: SIGNOZ_SQLSTORE_POSTGRES_DSN
+ value: postgres://signoz:signoz@signoz-metastore:5432/signoz?sslmode=disable
+ - name: SIGNOZ_SQLSTORE_PROVIDER
+ value: postgres
+ - name: SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ - name: SIGNOZ_TELEMETRYSTORE_PROVIDER
+ value: clickhouse
+ image: signoz/signoz:latest
+ imagePullPolicy: IfNotPresent
+ livenessProbe:
+ failureThreshold: 6
+ httpGet:
+ path: /api/v1/health
+ port: http
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ name: signoz
+ ports:
+ - containerPort: 8080
+ name: http
+ protocol: TCP
+ - containerPort: 4320
+ name: opamp
+ protocol: TCP
+ readinessProbe:
+ failureThreshold: 6
+ httpGet:
+ path: /api/v1/health
+ port: http
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ resources:
+ limits:
+ cpu: "1"
+ memory: 2Gi
+ requests:
+ cpu: 500m
+ memory: 1Gi
+ nodeSelector:
+ node-role.kubernetes.io/observability: ""
+ serviceAccountName: signoz-signoz
+ tolerations:
+ - effect: NoSchedule
+ key: dedicated
+ operator: Equal
+ value: signoz
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrykeeper/clickhousekeeper/clickhousekeeperinstallation.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrykeeper/clickhousekeeper/clickhousekeeperinstallation.yaml
new file mode 100644
index 0000000..7b1be82
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrykeeper/clickhousekeeper/clickhousekeeperinstallation.yaml
@@ -0,0 +1,49 @@
+apiVersion: clickhouse-keeper.altinity.com/v1
+kind: ClickHouseKeeperInstallation
+metadata:
+ name: signoz-clickhouse-keeper
+spec:
+ configuration:
+ clusters:
+ - layout:
+ replicasCount: 1
+ name: cluster
+ settings:
+ keeper_server/coordination_settings/raft_logs_level: information
+ keeper_server/four_letter_word_white_list: '*'
+ listen_host: 0.0.0.0
+ logger/console: "true"
+ logger/level: trace
+ defaults:
+ templates:
+ dataVolumeClaimTemplate: default
+ podTemplate: default
+ templates:
+ podTemplates:
+ - metadata:
+ labels:
+ app.kubernetes.io/component: telemetrykeeper
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-clickhouse-keeper
+ app.kubernetes.io/part-of: signoz
+ name: default
+ spec:
+ containers:
+ - image: clickhouse/clickhouse-keeper:25.5.6
+ imagePullPolicy: IfNotPresent
+ name: clickhouse-keeper
+ resources:
+ requests:
+ cpu: 1
+ memory: 1Gi
+ securityContext:
+ fsGroup: 101
+ volumeClaimTemplates:
+ - name: default
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 10Gi
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrykeeper/clickhousekeeper/kustomization.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrykeeper/clickhousekeeper/kustomization.yaml
new file mode 100644
index 0000000..e2d3083
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrykeeper/clickhousekeeper/kustomization.yaml
@@ -0,0 +1,4 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- clickhousekeeperinstallation.yaml
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore-migrator/job.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore-migrator/job.yaml
new file mode 100644
index 0000000..b0b5205
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore-migrator/job.yaml
@@ -0,0 +1,99 @@
+apiVersion: batch/v1
+kind: Job
+metadata:
+ labels:
+ app.kubernetes.io/component: schema-migrator
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-telemetrystore-migrator
+ name: signoz-telemetrystore-migrator
+spec:
+ backoffLimit: 6
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: schema-migrator
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-telemetrystore-migrator
+ spec:
+ containers:
+ - args:
+ - migrate
+ - async
+ - up
+ env:
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER
+ value: cluster
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION
+ value: "true"
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ name: async
+ resources:
+ requests:
+ cpu: 10m
+ memory: 16Mi
+ initContainers:
+ - args:
+ - migrate
+ - ready
+ env:
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER
+ value: cluster
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION
+ value: "true"
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ name: ready
+ resources:
+ requests:
+ cpu: 10m
+ memory: 16Mi
+ - args:
+ - migrate
+ - bootstrap
+ env:
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER
+ value: cluster
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION
+ value: "true"
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ name: bootstrap
+ resources:
+ requests:
+ cpu: 10m
+ memory: 16Mi
+ - args:
+ - migrate
+ - sync
+ - up
+ env:
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER
+ value: cluster
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION
+ value: "true"
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ name: sync
+ resources:
+ requests:
+ cpu: 10m
+ memory: 16Mi
+ restartPolicy: OnFailure
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore-migrator/kustomization.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore-migrator/kustomization.yaml
new file mode 100644
index 0000000..ac2f8e0
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore-migrator/kustomization.yaml
@@ -0,0 +1,4 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- job.yaml
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml
new file mode 100644
index 0000000..46a7d6a
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml
@@ -0,0 +1,279 @@
+apiVersion: clickhouse.altinity.com/v1
+kind: ClickHouseInstallation
+metadata:
+ labels:
+ app.kubernetes.io/component: telemetrystore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-clickhouse
+ app.kubernetes.io/part-of: signoz
+ app.kubernetes.io/version: 25.5.6
+ name: signoz-clickhouse
+spec:
+ configuration:
+ clusters:
+ - layout:
+ replicasCount: 0
+ shardsCount: 1
+ name: cluster
+ files:
+ config.d/crash.yaml: |
+ send_crash_reports:
+ enabled: false
+ config.d/extra.yaml: |
+ dictionaries_config: '*_dictionary.xml'
+ format_schema_path: /etc/clickhouse-server/config.d/
+ prometheus:
+ endpoint: /metrics
+ port: 9363
+ tmp_path: /var/lib/clickhouse/tmp/
+ user_defined_executable_functions_config: /etc/clickhouse-server/functions/custom-functions.xml
+ user_directories:
+ users_xml:
+ path: users.xml
+ user_files_path: /var/lib/clickhouse/user_files/
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ config.d/formatting.yaml: |
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ names:
+ date_time: date_time
+ level: level
+ logger_name: logger_name
+ message: message
+ query_id: query_id
+ source_file: source_file
+ source_line: source_line
+ thread_id: thread_id
+ thread_name: thread_name
+ type: json
+ level: information
+ size: 1000M
+ config.d/load.yaml: |
+ async_load_databases: false
+ config.d/path.yaml: |
+ merge_tree:
+ storage_policy: data
+ path: /var/lib/clickhouse/
+ config.d/storage.yaml: |
+ storage_configuration:
+ disks:
+ data0:
+ keep_free_space_bytes: 10485760
+ path: /mnt/data-0/
+ default: {}
+ policies:
+ data:
+ volumes:
+ data0:
+ disk: data0
+ default:
+ volumes:
+ default:
+ disk: default
+ config.d/system_log.yaml: |
+ error_log:
+ ttl: event_date + INTERVAL 7 DAY DELETE
+ latency_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ query_metric_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ text_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ events.proto: |
+ syntax = "proto3";
+ message Event {
+ string uuid = 1;
+ string event = 2;
+ string properties = 3;
+ string timestamp = 4;
+ uint64 team_id = 5;
+ string distinct_id = 6;
+ string created_at = 7;
+ string elements_chain = 8;
+ }
+ profiles:
+ admin/max_threads: 16
+ admin/query_plan_max_limit_for_lazy_materialization: "0"
+ admin/secondary_indices_enable_bulk_filtering: "0"
+ default/allow_experimental_window_functions: "1"
+ default/allow_nondeterministic_mutations: "1"
+ default/load_balancing: random
+ default/log_queries: 1
+ default/max_memory_usage: 10000000000
+ default/max_threads: 16
+ default/query_plan_max_limit_for_lazy_materialization: "0"
+ default/secondary_indices_enable_bulk_filtering: "0"
+ quotas:
+ default/interval/duration: 3600
+ default/interval/errors: 0
+ default/interval/execution_time: 0
+ default/interval/queries: 0
+ default/interval/read_rows: 0
+ default/interval/result_rows: 0
+ users:
+ admin/networks/ip:
+ - 10.0.0.0/8
+ - 100.64.0.0/10
+ - 172.16.0.0/12
+ - 192.0.0.0/24
+ - 198.18.0.0/15
+ - 192.168.0.0/16
+ admin/password: 27ff0399-0d3a-4bd8-919d-17c2181e6fb9
+ admin/profile: default
+ admin/quota: default
+ default/access_management: 1
+ default/named_collection_control: 1
+ default/networks/ip: ::/0
+ default/password: ""
+ default/profile: default
+ default/quota: default
+ default/show_named_collection: 1
+ default/show_named_collection_secrets: 1
+ zookeeper:
+ nodes:
+ - host: keeper-signoz-clickhouse-keeper
+ port: 2181
+ defaults:
+ templates:
+ podTemplate: default
+ serviceTemplate: default
+ templates:
+ podTemplates:
+ - metadata:
+ labels:
+ app.kubernetes.io/component: telemetrystore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-clickhouse
+ app.kubernetes.io/version: 25.5.6
+ name: default
+ spec:
+ containers:
+ - command:
+ - /bin/bash
+ - -c
+ - /usr/bin/clickhouse-server --config-file=/etc/clickhouse-server/config.xml
+ image: clickhouse/clickhouse-server:25.5.6
+ imagePullPolicy: IfNotPresent
+ livenessProbe:
+ failureThreshold: 10
+ httpGet:
+ path: /ping
+ port: http
+ initialDelaySeconds: 60
+ periodSeconds: 3
+ successThreshold: 1
+ timeoutSeconds: 1
+ name: clickhouse
+ ports:
+ - containerPort: 8123
+ name: http
+ - containerPort: 9000
+ name: client
+ - containerPort: 9009
+ name: interserver
+ readinessProbe:
+ failureThreshold: 3
+ httpGet:
+ path: /ping
+ port: http
+ initialDelaySeconds: 10
+ periodSeconds: 3
+ successThreshold: 1
+ timeoutSeconds: 1
+ resources:
+ limits:
+ cpu: "4"
+ memory: 8Gi
+ requests:
+ cpu: "2"
+ memory: 4Gi
+ startupProbe:
+ failureThreshold: 30
+ httpGet:
+ path: /ping
+ port: http
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ volumeMounts:
+ - mountPath: /var/lib/clickhouse/user_scripts
+ name: shared-binary-volume
+ - mountPath: /etc/clickhouse-server/functions
+ name: custom-functions-volume
+ - mountPath: /var/lib/clickhouse
+ name: default
+ - mountPath: /mnt/data-0
+ name: data-0
+ initContainers:
+ - command:
+ - sh
+ - -c
+ - |
+ set -e
+ version="v0.0.1"
+ node_os=$(uname -s | tr '[:upper:]' '[:lower:]')
+ node_arch=$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
+ echo "Fetching histogram-binary for ${node_os}/${node_arch}"
+ cd /tmp
+ wget -O histogram-quantile.tar.gz "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F${version}/histogram-quantile_${node_os}_${node_arch}.tar.gz"
+ tar -xzf histogram-quantile.tar.gz
+ chmod +x histogram-quantile
+ mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
+ echo "histogram-quantile installed successfully"
+ image: docker.io/alpine:3.18.2
+ imagePullPolicy: IfNotPresent
+ name: histogram
+ volumeMounts:
+ - mountPath: /var/lib/clickhouse/user_scripts
+ name: shared-binary-volume
+ securityContext:
+ fsGroup: 101
+ fsGroupChangePolicy: OnRootMismatch
+ runAsGroup: 101
+ runAsUser: 101
+ volumes:
+ - emptyDir: {}
+ name: shared-binary-volume
+ - configMap:
+ name: signoz-clickhouse-custom-functions
+ name: custom-functions-volume
+ serviceTemplates:
+ - generateName: signoz-clickhouse
+ metadata:
+ labels:
+ app.kubernetes.io/component: telemetrystore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-clickhouse
+ app.kubernetes.io/part-of: signoz
+ name: default
+ spec:
+ ports:
+ - name: http
+ port: 8123
+ - name: tcp
+ port: 9000
+ type: ClusterIP
+ volumeClaimTemplates:
+ - name: data-0
+ reclaimPolicy: Retain
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 100Gi
+ storageClassName: gp3
+ - name: default
+ reclaimPolicy: Retain
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 10Gi
+ storageClassName: gp3
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore/clickhouse/configmap.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore/clickhouse/configmap.yaml
new file mode 100644
index 0000000..ec8f548
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore/clickhouse/configmap.yaml
@@ -0,0 +1,25 @@
+apiVersion: v1
+data:
+ custom-functions.xml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/component: telemetrystore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-clickhouse
+ app.kubernetes.io/part-of: signoz
+ name: signoz-clickhouse-custom-functions
diff --git a/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore/clickhouse/kustomization.yaml b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore/clickhouse/kustomization.yaml
new file mode 100644
index 0000000..a6835a5
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize-patches/pours/deployment/telemetrystore/clickhouse/kustomization.yaml
@@ -0,0 +1,5 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- configmap.yaml
+- clickhouseinstallation.yaml
diff --git a/docs/examples/kubernetes/kustomize/README.md b/docs/examples/kubernetes/kustomize/README.md
new file mode 100644
index 0000000..7a4e20b
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/README.md
@@ -0,0 +1,178 @@
+# Kubernetes with Kustomize
+
+| Field | Value |
+| --- | --- |
+| **Mode** | `kubernetes` |
+| **Flavor** | `kustomize` |
+| **Platform** | `-` |
+
+## Overview
+
+Deploys SigNoz on Kubernetes using Kustomize. Foundry generates per-component directories with Kubernetes manifests and a root `kustomization.yaml`.
+
+## Prerequisites
+
+- Kubernetes cluster (1.24+)
+- `kubectl` with kustomize support
+
+## Configuration
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: kustomize
+ mode: kubernetes
+```
+
+## Deploy
+
+```bash
+foundryctl cast -f casting.yaml
+```
+
+Or step by step:
+
+```bash
+# Generate manifests
+foundryctl forge -f casting.yaml
+
+# Apply CRDs first (cast does this automatically)
+kubectl apply -f https://raw.githubusercontent.com/Altinity/clickhouse-operator/0.25.3/deploy/operatorhub/0.25.3/clickhouseinstallations.clickhouse.altinity.com.crd.yaml
+kubectl apply -f https://raw.githubusercontent.com/Altinity/clickhouse-operator/0.25.3/deploy/operatorhub/0.25.3/clickhouseinstallationtemplates.clickhouse.altinity.com.crd.yaml
+kubectl apply -f https://raw.githubusercontent.com/Altinity/clickhouse-operator/0.25.3/deploy/operatorhub/0.25.3/clickhouseoperatorconfigurations.clickhouse.altinity.com.crd.yaml
+kubectl apply -f https://raw.githubusercontent.com/Altinity/clickhouse-operator/0.25.3/deploy/operatorhub/0.25.3/clickhousekeeperinstallations.clickhouse-keeper.altinity.com.crd.yaml
+
+# Apply with kubectl
+kubectl apply -k pours/deployment/
+```
+
+> [!NOTE]
+> `foundryctl cast` automatically fetches and applies the four Altinity ClickHouse Operator CRDs (v0.25.3) from GitHub before running `kubectl apply -k`. If you apply manually, you must install the CRDs first or the ClickHouseInstallation and ClickHouseKeeperInstallation resources will fail to create.
+
+## Generated output
+
+```text
+pours/deployment/
+ kustomization.yaml
+ namespace.yaml
+ signoz/
+ statefulset.yaml
+ service.yaml
+ serviceaccount.yaml
+ kustomization.yaml
+ ingester/
+ deployment.yaml
+ service.yaml
+ configmap.yaml
+ serviceaccount.yaml
+ kustomization.yaml
+ telemetrystore/
+ clickhouse/
+ clickhouseinstallation.yaml
+ configmap.yaml
+ kustomization.yaml
+ clickhouse-operator/
+ deployment.yaml
+ clusterrole.yaml
+ clusterrolebinding.yaml
+ configmap.yaml
+ service.yaml
+ serviceaccount.yaml
+ kustomization.yaml
+ telemetrykeeper/
+ clickhousekeeper/
+ clickhousekeeperinstallation.yaml
+ kustomization.yaml
+ metastore/
+ postgres/
+ statefulset.yaml
+ service.yaml
+ serviceaccount.yaml
+ kustomization.yaml
+ telemetrystore-migrator/
+ job.yaml
+ kustomization.yaml
+```
+
+## After deployment
+
+```bash
+# Check pod status
+kubectl get pods -n signoz
+
+# Port-forward the SigNoz UI
+kubectl port-forward svc/signoz -n signoz 8080:8080
+```
+
+Open `http://localhost:8080` to access the SigNoz UI.
+
+## Customization
+
+To set resource limits, storage classes, or scheduling constraints on the generated manifests, use [patches](../../../concepts/patches.md). See the [kustomize-patches](../kustomize-patches/) example for a complete working configuration.
+
+### Native Kustomize patches
+
+Since Foundry generates standard Kustomize bases, you can also use native Kustomize patches on the generated `kustomization.yaml`. This lets you use strategic merge patches or overlays for environment-specific customization without re-forging.
+
+Use a Foundry patch to inject a `patches` block into the root `kustomization.yaml`:
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: kustomize
+ mode: kubernetes
+ patches:
+ - target: "deployment/kustomization.yaml"
+ operations:
+ - op: add
+ path: /patches
+ value:
+ - target:
+ kind: StatefulSet
+ name: signoz-signoz
+ patch: |-
+ apiVersion: apps/v1
+ kind: StatefulSet
+ metadata:
+ name: signoz-signoz
+ spec:
+ template:
+ spec:
+ nodeSelector:
+ node-role.kubernetes.io/observability: ""
+```
+
+Or create an overlay directory that references the generated base:
+
+```
+my-deployment/
+├── base/ # Copy of pours/deployment/
+│ └── ...
+└── overlays/
+ └── prod/
+ ├── kustomization.yaml
+ └── increase-resources.yaml
+```
+
+```yaml
+# overlays/prod/kustomization.yaml
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- ../../base
+patches:
+- path: increase-resources.yaml
+ target:
+ kind: StatefulSet
+ name: signoz-clickhouse
+```
+
+```bash
+kubectl apply -k overlays/prod/
+```
diff --git a/docs/examples/kubernetes/kustomize/casting.yaml b/docs/examples/kubernetes/kustomize/casting.yaml
new file mode 100644
index 0000000..33c1819
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/casting.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: kustomize
+ mode: kubernetes
diff --git a/docs/examples/kubernetes/kustomize/casting.yaml.lock b/docs/examples/kubernetes/kustomize/casting.yaml.lock
new file mode 100644
index 0000000..dfddb94
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/casting.yaml.lock
@@ -0,0 +1,825 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: kustomize
+ mode: kubernetes
+ ingester:
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-clickhouse:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-clickhouse:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-clickhouse:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz-signoz:4320/v1/opamp
+ enabled: true
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ image: signoz/signoz-otel-collector:latest
+ version: latest
+ status:
+ addresses:
+ otlp: null
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-clickhouse:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-clickhouse:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-clickhouse:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz-signoz:4320/v1/opamp
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ metastore:
+ kind: postgres
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ image: postgres:16
+ version: "16"
+ status:
+ addresses:
+ dsn:
+ - postgres://signoz-metastore:5432
+ config: {}
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ signoz:
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-clickhouse:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ image: signoz/signoz:latest
+ version: latest
+ status:
+ addresses:
+ apiserver: null
+ opamp:
+ - ws://signoz-signoz:4320
+ config: {}
+ env:
+ SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore:5432/signoz?sslmode=disable
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-clickhouse:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ telemetrykeeper:
+ kind: clickhousekeeper
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-clickhouse-keeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ enabled: true
+ image: clickhouse/clickhouse-keeper:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ client:
+ - tcp://signoz-clickhouse-keeper-0:9181
+ raft:
+ - tcp://signoz-clickhouse-keeper-0:9234
+ config:
+ data:
+ keeper-0.yaml: |
+ listen_host: 0.0.0.0
+ logger:
+ level: information
+ console: true
+ keeper_server:
+ four_letter_word_white_list: "*"
+ coordination_settings:
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: signoz-clickhouse-keeper-0
+ port: 9234
+ id: 0
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ telemetrystore:
+ kind: clickhouse
+ spec:
+ cluster:
+ replicas: 0
+ shards: 1
+ config:
+ data:
+ config-0-0.yaml: |
+ async_load_databases: false
+ asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ error_log:
+ ttl: event_date + INTERVAL 7 DAY DELETE
+ format_schema_path: /etc/clickhouse-server/config.d/
+ http_port: 8123
+ interserver_http_port: 9009
+ latency_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ names:
+ date_time: date_time
+ level: level
+ logger_name: logger_name
+ message: message
+ query_id: query_id
+ source_file: source_file
+ source_line: source_line
+ thread_id: thread_id
+ thread_name: thread_name
+ type: json
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ merge_tree:
+ storage_policy: data
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ path: /var/lib/clickhouse/
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ profiles:
+ admin:
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ default:
+ allow_experimental_window_functions: "1"
+ allow_nondeterministic_mutations: "1"
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ prometheus:
+ endpoint: /metrics
+ port: 9363
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_metric_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: signoz-clickhouse
+ port: 9000
+ send_crash_reports:
+ enabled: false
+ session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ storage_configuration:
+ disks:
+ data0:
+ keep_free_space_bytes: 10485760
+ path: /mnt/data-0/
+ default: {}
+ policies:
+ data:
+ volumes:
+ data0:
+ disk: data0
+ default:
+ volumes:
+ default:
+ disk: default
+ tcp_port: 9000
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ tmp_path: /var/lib/clickhouse/tmp/
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ user_defined_executable_functions_config: /etc/clickhouse-server/functions/custom-functions.xml
+ user_directories:
+ users_xml:
+ path: users.xml
+ user_files_path: /var/lib/clickhouse/user_files/
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ admin:
+ networks:
+ ip:
+ - 10.0.0.0/8
+ - 100.64.0.0/10
+ - 172.16.0.0/12
+ - 192.0.0.0/24
+ - 198.18.0.0/15
+ - 192.168.0.0/16
+ password: 27ff0399-0d3a-4bd8-919d-17c2181e6fb9
+ profile: default
+ quota: default
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ zookeeper:
+ node:
+ - host: signoz-clickhouse-keeper-0
+ port: 9181
+ zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ enabled: true
+ image: clickhouse/clickhouse-server:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ tcp:
+ - tcp://signoz-clickhouse:9000
+ config:
+ data:
+ config-0-0.yaml: |
+ async_load_databases: false
+ asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ error_log:
+ ttl: event_date + INTERVAL 7 DAY DELETE
+ format_schema_path: /etc/clickhouse-server/config.d/
+ http_port: 8123
+ interserver_http_port: 9009
+ latency_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ listen_host: 0.0.0.0
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ names:
+ date_time: date_time
+ level: level
+ logger_name: logger_name
+ message: message
+ query_id: query_id
+ source_file: source_file
+ source_line: source_line
+ thread_id: thread_id
+ thread_name: thread_name
+ type: json
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ merge_tree:
+ storage_policy: data
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ path: /var/lib/clickhouse/
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ profiles:
+ admin:
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ default:
+ allow_experimental_window_functions: "1"
+ allow_nondeterministic_mutations: "1"
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ prometheus:
+ endpoint: /metrics
+ port: 9363
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_metric_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ - host: signoz-clickhouse
+ port: 9000
+ send_crash_reports:
+ enabled: false
+ session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ storage_configuration:
+ disks:
+ data0:
+ keep_free_space_bytes: 10485760
+ path: /mnt/data-0/
+ default: {}
+ policies:
+ data:
+ volumes:
+ data0:
+ disk: data0
+ default:
+ volumes:
+ default:
+ disk: default
+ tcp_port: 9000
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ tmp_path: /var/lib/clickhouse/tmp/
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ user_defined_executable_functions_config: /etc/clickhouse-server/functions/custom-functions.xml
+ user_directories:
+ users_xml:
+ path: users.xml
+ user_files_path: /var/lib/clickhouse/user_files/
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ users:
+ admin:
+ networks:
+ ip:
+ - 10.0.0.0/8
+ - 100.64.0.0/10
+ - 172.16.0.0/12
+ - 192.0.0.0/24
+ - 198.18.0.0/15
+ - 192.168.0.0/16
+ password: 27ff0399-0d3a-4bd8-919d-17c2181e6fb9
+ profile: default
+ quota: default
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ zookeeper:
+ node:
+ - host: signoz-clickhouse-keeper-0
+ port: 9181
+ zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ extras:
+ _overrides: |
+ async_load_databases: false
+ error_log:
+ ttl: event_date + INTERVAL 7 DAY DELETE
+ format_schema_path: /etc/clickhouse-server/config.d/
+ latency_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ logger:
+ formatting:
+ names:
+ date_time: date_time
+ level: level
+ logger_name: logger_name
+ message: message
+ query_id: query_id
+ source_file: source_file
+ source_line: source_line
+ thread_id: thread_id
+ thread_name: thread_name
+ type: json
+ merge_tree:
+ storage_policy: data
+ profiles:
+ admin:
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ default:
+ allow_experimental_window_functions: "1"
+ allow_nondeterministic_mutations: "1"
+ max_threads: 16
+ query_plan_max_limit_for_lazy_materialization: "0"
+ secondary_indices_enable_bulk_filtering: "0"
+ prometheus:
+ endpoint: /metrics
+ port: 9363
+ query_metric_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ send_crash_reports:
+ enabled: false
+ storage_configuration:
+ disks:
+ data0:
+ keep_free_space_bytes: 10485760
+ path: /mnt/data-0/
+ default: {}
+ policies:
+ data:
+ volumes:
+ data0:
+ disk: data0
+ default:
+ volumes:
+ default:
+ disk: default
+ text_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ user_defined_executable_functions_config: /etc/clickhouse-server/functions/custom-functions.xml
+ users:
+ admin:
+ networks:
+ ip:
+ - 10.0.0.0/8
+ - 100.64.0.0/10
+ - 172.16.0.0/12
+ - 192.0.0.0/24
+ - 198.18.0.0/15
+ - 192.168.0.0/16
+ password: 27ff0399-0d3a-4bd8-919d-17c2181e6fb9
+ profile: default
+ quota: default
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/clusterrole.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/clusterrole.yaml
new file mode 100644
index 0000000..4cbeaa5
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/clusterrole.yaml
@@ -0,0 +1,184 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator
+rules:
+- apiGroups:
+ - ""
+ resources:
+ - configmaps
+ - services
+ - persistentvolumeclaims
+ - secrets
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - create
+ - delete
+- apiGroups:
+ - ""
+ resources:
+ - endpoints
+ verbs:
+ - get
+ - list
+ - watch
+- apiGroups:
+ - ""
+ resources:
+ - events
+ verbs:
+ - create
+- apiGroups:
+ - ""
+ resources:
+ - persistentvolumes
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+- apiGroups:
+ - ""
+ resources:
+ - pods
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - delete
+- apiGroups:
+ - ""
+ resources:
+ - secrets
+ verbs:
+ - get
+ - list
+- apiGroups:
+ - apps
+ resources:
+ - statefulsets
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - create
+ - delete
+- apiGroups:
+ - apps
+ resources:
+ - replicasets
+ verbs:
+ - get
+ - patch
+ - update
+ - delete
+- apiGroups:
+ - apps
+ resourceNames:
+ - clickhouse-operator
+ resources:
+ - deployments
+ verbs:
+ - get
+ - patch
+ - update
+ - delete
+- apiGroups:
+ - policy
+ resources:
+ - poddisruptionbudgets
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - create
+ - delete
+- apiGroups:
+ - apiextensions.k8s.io
+ resources:
+ - customresourcedefinitions
+ verbs:
+ - get
+ - list
+- apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallations
+ verbs:
+ - get
+ - list
+ - watch
+ - patch
+ - update
+ - delete
+- apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallationtemplates
+ - clickhouseoperatorconfigurations
+ verbs:
+ - get
+ - list
+ - watch
+- apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallations/finalizers
+ - clickhouseinstallationtemplates/finalizers
+ - clickhouseoperatorconfigurations/finalizers
+ verbs:
+ - update
+- apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallations/status
+ - clickhouseinstallationtemplates/status
+ - clickhouseoperatorconfigurations/status
+ verbs:
+ - get
+ - update
+ - patch
+ - create
+ - delete
+- apiGroups:
+ - clickhouse-keeper.altinity.com
+ resources:
+ - clickhousekeeperinstallations
+ verbs:
+ - get
+ - list
+ - watch
+ - patch
+ - update
+ - delete
+- apiGroups:
+ - clickhouse-keeper.altinity.com
+ resources:
+ - clickhousekeeperinstallations/finalizers
+ verbs:
+ - update
+- apiGroups:
+ - clickhouse-keeper.altinity.com
+ resources:
+ - clickhousekeeperinstallations/status
+ verbs:
+ - get
+ - update
+ - patch
+ - create
+ - delete
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/clusterrolebinding.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/clusterrolebinding.yaml
new file mode 100644
index 0000000..baf43b7
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/clusterrolebinding.yaml
@@ -0,0 +1,16 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: signoz-telemetrystore-clickhouse-operator
+subjects:
+- kind: ServiceAccount
+ name: signoz-telemetrystore-clickhouse-operator
+ namespace: signoz
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/configmap.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/configmap.yaml
new file mode 100644
index 0000000..ec74edf
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/configmap.yaml
@@ -0,0 +1,576 @@
+apiVersion: v1
+data: null
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-etc-confd-files
+---
+apiVersion: v1
+data:
+ 01-clickhouse-01-listen.xml: |
+
+
+ ::
+ 0.0.0.0
+ 1
+
+ 01-clickhouse-02-logger.xml: |
+
+
+
+ warning
+
+ json
+
+ /var/log/clickhouse-server/clickhouse-server.log
+ /var/log/clickhouse-server/clickhouse-server.err.log
+ 1000M
+ 10
+
+ 1
+
+
+ 01-clickhouse-03-query_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+ 01-clickhouse-04-part_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+ 01-clickhouse-05-trace_log.xml: |-
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-06-asynchronous_insert_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-07-asynchronous_metric_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+ 01-clickhouse-08-backup_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-09-blob_storage_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-10-crash_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 14 day
+ 7500
+
+
+ 01-clickhouse-11-metric_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+ 01-clickhouse-12-query_thread_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+ 01-clickhouse-13-query_views_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-14-session_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-15-zookeeper_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 3 day
+ 7500
+
+
+ 01-clickhouse-16-processors_profile_log.xml: |
+
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 7 day
+ 7500
+
+
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-etc-configd-files
+---
+apiVersion: v1
+data:
+ config.yaml: |-
+ annotation:
+ exclude:
+ - argocd.argoproj.io/tracking-id
+ include: []
+ clickhouse:
+ access:
+ password: ""
+ port: 8123
+ rootCA: ""
+ scheme: auto
+ secret:
+ name: "clickhouse-operator"
+ namespace: "signoz"
+ timeouts:
+ connect: 1
+ query: 4
+ username: ""
+ addons:
+ rules:
+ - spec:
+ configuration:
+ files: null
+ profiles: null
+ quotas: null
+ settings: null
+ users: null
+ version: '*'
+ - spec:
+ configuration:
+ files: null
+ profiles: null
+ quotas: null
+ settings: null
+ users:
+ '{clickhouseOperatorUser}/access_management': 1
+ '{clickhouseOperatorUser}/named_collection_control': 1
+ '{clickhouseOperatorUser}/show_named_collections': 1
+ '{clickhouseOperatorUser}/show_named_collections_secrets': 1
+ version: '>= 23.3'
+ - spec:
+ configuration:
+ files: null
+ profiles:
+ clickhouse_operator/format_display_secrets_in_show_and_select: 1
+ quotas: null
+ settings:
+ display_secrets_in_show_and_select: 1
+ users: null
+ version: '>= 23.5'
+ configuration:
+ file:
+ path:
+ common: chi/config.d
+ host: chi/conf.d
+ user: chi/users.d
+ network:
+ hostRegexpTemplate: (chi-{chi}-[^.]+\d+-\d+|clickhouse\-{chi})\.{namespace}\.svc\.cluster\.local$
+ user:
+ default:
+ networksIP:
+ - ::1
+ - 127.0.0.1
+ password: default
+ profile: default
+ quota: default
+ configurationRestartPolicy:
+ rules:
+ - rules:
+ - settings/*: "yes"
+ - settings/access_control_path: "no"
+ - settings/dictionaries_config: "no"
+ - settings/max_server_memory_*: "no"
+ - settings/max_*_to_drop: "no"
+ - settings/max_concurrent_queries: "no"
+ - settings/models_config: "no"
+ - settings/user_defined_executable_functions_config: "no"
+ - settings/logger/*: "no"
+ - settings/macros/*: "no"
+ - settings/remote_servers/*: "no"
+ - settings/user_directories/*: "no"
+ - settings/display_secrets_in_show_and_select: "no"
+ - zookeeper/*: "yes"
+ - files/*.xml: "yes"
+ - files/config.d/*.xml: "yes"
+ - files/config.d/*dict*.xml: "no"
+ - files/config.d/*no_restart*: "no"
+ - profiles/default/background_*_pool_size: "yes"
+ - profiles/default/max_*_for_server: "yes"
+ version: '*'
+ - rules:
+ - settings/logger: "yes"
+ version: 21.*
+ metrics:
+ timeouts:
+ collect: 9
+ keeper:
+ configuration:
+ file:
+ path:
+ common: chk/keeper_config.d
+ host: chk/conf.d
+ user: chk/users.d
+ label:
+ appendScope: "no"
+ exclude: []
+ include: []
+ logger:
+ alsologtostderr: "false"
+ log_backtrace_at: ""
+ logtostderr: "true"
+ stderrthreshold: ""
+ v: "1"
+ vmodule: ""
+ metrics:
+ labels:
+ exclude: []
+ pod:
+ terminationGracePeriod: 30
+ reconcile:
+ host:
+ wait:
+ exclude: true
+ include: false
+ queries: true
+ replicas:
+ all: false
+ delay: 10
+ new: true
+ runtime:
+ reconcileCHIsThreadsNumber: 10
+ reconcileShardsMaxConcurrencyPercent: 50
+ reconcileShardsThreadsNumber: 5
+ statefulSet:
+ create:
+ onFailure: ignore
+ update:
+ onFailure: abort
+ pollInterval: 5
+ timeout: 300
+ statefulSet:
+ revisionHistoryLimit: 0
+ status:
+ fields:
+ action: false
+ actions: false
+ error: false
+ errors: false
+ template:
+ chi:
+ path: chi/templates.d
+ policy: ApplyOnNextReconcile
+ chk:
+ path: chk/templates.d
+ policy: ApplyOnNextReconcile
+ watch:
+ namespaces:
+ - ".*"
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-etc-files
+---
+apiVersion: v1
+data:
+ 001-templates.json.example: |
+ {
+ "apiVersion": "clickhouse.altinity.com/v1",
+ "kind": "ClickHouseInstallationTemplate",
+ "metadata": {
+ "name": "01-default-volumeclaimtemplate"
+ },
+ "spec": {
+ "templates": {
+ "volumeClaimTemplates": [
+ {
+ "name": "chi-default-volume-claim-template",
+ "spec": {
+ "accessModes": [
+ "ReadWriteOnce"
+ ],
+ "resources": {
+ "requests": {
+ "storage": "2Gi"
+ }
+ }
+ }
+ }
+ ],
+ "podTemplates": [
+ {
+ "name": "chi-default-oneperhost-pod-template",
+ "distribution": "OnePerHost",
+ "spec": {
+ "containers" : [
+ {
+ "name": "clickhouse",
+ "image": "clickhouse/clickhouse-server:23.8",
+ "ports": [
+ {
+ "name": "http",
+ "containerPort": 8123
+ },
+ {
+ "name": "client",
+ "containerPort": 9000
+ },
+ {
+ "name": "interserver",
+ "containerPort": 9009
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ }
+ default-pod-template.yaml.example: |
+ apiVersion: "clickhouse.altinity.com/v1"
+ kind: "ClickHouseInstallationTemplate"
+ metadata:
+ name: "default-oneperhost-pod-template"
+ spec:
+ templates:
+ podTemplates:
+ - name: default-oneperhost-pod-template
+ distribution: "OnePerHost"
+ default-storage-template.yaml.example: |
+ apiVersion: "clickhouse.altinity.com/v1"
+ kind: "ClickHouseInstallationTemplate"
+ metadata:
+ name: "default-storage-template-2Gi"
+ spec:
+ templates:
+ volumeClaimTemplates:
+ - name: default-storage-template-2Gi
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 2Gi
+ readme: Templates in this folder are packaged with an operator and available via 'useTemplate'
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-etc-templatesd-files
+---
+apiVersion: v1
+data:
+ 01-clickhouse-user.xml: |
+
+
+
+
+ 127.0.0.1
+
+
+ clickhouse_operator
+ default
+
+
+
+
+ 0
+ 1
+ 10
+
+
+
+ 02-clickhouse-default-profile.xml: |
+
+
+
+ 1
+ 1000
+ 1
+ 1
+
+
+
+ 03-database-ordinary.xml: |
+
+
+
+ Ordinary
+
+
+
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-etc-usersd-files
+---
+apiVersion: v1
+data: null
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-confd-files
+---
+apiVersion: v1
+data:
+ 01-keeper-01-default-config.xml: |
+
+
+
+
+
+
+
+
+
+ 10000
+ 10000
+ information
+ 100000
+
+ true
+ /var/lib/clickhouse-keeper/coordination/logs
+ /var/lib/clickhouse-keeper/coordination/snapshots
+ /var/lib/clickhouse-keeper
+ 2181
+
+ ::
+ 0.0.0.0
+ 1
+
+ 1
+ information
+
+ 4096
+
+ 01-keeper-02-readiness.xml: |
+
+
+
+
+
+
+
+
+
+ 9182
+
+ /ready
+
+
+
+
+ 01-keeper-03-enable-reconfig.xml: |-
+
+
+
+
+
+
+
+
+ false
+
+
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-configd-files
+---
+apiVersion: v1
+data:
+ readme: Templates in this folder are packaged with an operator and available via 'useTemplate'
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-templatesd-files
+---
+apiVersion: v1
+data: null
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-usersd-files
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/deployment.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/deployment.yaml
new file mode 100644
index 0000000..a3ce2fe
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/deployment.yaml
@@ -0,0 +1,208 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ template:
+ metadata:
+ annotations:
+ checksum/confd-files: 6a503b551565d380d3b4ea4b4c48a66629379558aa6cf0919d55f88f3cb4f56b
+ checksum/configd-files: a8b2e79da1b016cb2fa1e1b3d61f1edd8872af054a7419040c28b15a236bdc24
+ checksum/files: 420251c3f150460f0b1b15211b9c0b965c16342055c2f3a5a57768d229b2ddd0
+ checksum/keeper-confd-files: c17fcdc4ce46db171e44a8e5036cafb7173a9806470fafdef717cc3c01318470
+ checksum/keeper-configd-files: beed860cfbb0c9e2a0b266f65dee8cbaf22990dc3e200c93b74e697b3cf4c9df
+ checksum/keeper-templatesd-files: a47abf45edf0f439048648e3d6d1ecede35e560a76f32d8a4aa6055e0fcf58a8
+ checksum/keeper-usersd-files: 2fbf34a572990f10fe9bf11c9884c5e847a1a23a02f0728e83bac4f4f9036797
+ checksum/templatesd-files: bfbe2e3230fe68164813fcaf74c5cc06b11878c26c764476399ac8803c8bde1c
+ checksum/usersd-files: c609c91ce94021945657aae781f199517cbc6f2c1f603238c88004f8acf84f95
+ clickhouse-operator-metrics/port: "9999"
+ clickhouse-operator-metrics/scrape: "true"
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ spec:
+ containers:
+ - env:
+ - name: OPERATOR_POD_NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ - name: OPERATOR_POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: OPERATOR_POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: OPERATOR_POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: OPERATOR_POD_SERVICE_ACCOUNT
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.serviceAccountName
+ - name: OPERATOR_CONTAINER_CPU_REQUEST
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: requests.cpu
+ - name: OPERATOR_CONTAINER_CPU_LIMIT
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: limits.cpu
+ - name: OPERATOR_CONTAINER_MEM_REQUEST
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: requests.memory
+ - name: OPERATOR_CONTAINER_MEM_LIMIT
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: limits.memory
+ image: altinity/clickhouse-operator:0.25.3
+ imagePullPolicy: IfNotPresent
+ name: operator
+ ports:
+ - containerPort: 9999
+ name: op-metrics
+ resources:
+ requests:
+ cpu: 1000m
+ memory: 2Gi
+ securityContext: {}
+ volumeMounts:
+ - mountPath: /etc/clickhouse-operator
+ name: etc-clickhouse-operator-folder
+ - mountPath: /etc/clickhouse-operator/chi/conf.d
+ name: etc-clickhouse-operator-confd-folder
+ - mountPath: /etc/clickhouse-operator/chi/config.d
+ name: etc-clickhouse-operator-configd-folder
+ - mountPath: /etc/clickhouse-operator/chi/templates.d
+ name: etc-clickhouse-operator-templatesd-folder
+ - mountPath: /etc/clickhouse-operator/chi/users.d
+ name: etc-clickhouse-operator-usersd-folder
+ - mountPath: /etc/clickhouse-operator/chk/conf.d
+ name: etc-keeper-operator-confd-folder
+ - mountPath: /etc/clickhouse-operator/chk/keeper_config.d
+ name: etc-keeper-operator-configd-folder
+ - mountPath: /etc/clickhouse-operator/chk/templates.d
+ name: etc-keeper-operator-templatesd-folder
+ - mountPath: /etc/clickhouse-operator/chk/users.d
+ name: etc-keeper-operator-usersd-folder
+ - env:
+ - name: OPERATOR_POD_NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ - name: OPERATOR_POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: OPERATOR_POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: OPERATOR_POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: OPERATOR_POD_SERVICE_ACCOUNT
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.serviceAccountName
+ - name: OPERATOR_CONTAINER_CPU_REQUEST
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: requests.cpu
+ - name: OPERATOR_CONTAINER_CPU_LIMIT
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: limits.cpu
+ - name: OPERATOR_CONTAINER_MEM_REQUEST
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: requests.memory
+ - name: OPERATOR_CONTAINER_MEM_LIMIT
+ valueFrom:
+ resourceFieldRef:
+ containerName: operator
+ resource: limits.memory
+ image: altinity/metrics-exporter:0.25.3
+ imagePullPolicy: IfNotPresent
+ name: metrics-exporter
+ ports:
+ - containerPort: 8888
+ name: ch-metrics
+ resources:
+ requests:
+ cpu: 100m
+ memory: 256Mi
+ securityContext: {}
+ volumeMounts:
+ - mountPath: /etc/clickhouse-operator
+ name: etc-clickhouse-operator-folder
+ - mountPath: /etc/clickhouse-operator/chi/conf.d
+ name: etc-clickhouse-operator-confd-folder
+ - mountPath: /etc/clickhouse-operator/chi/config.d
+ name: etc-clickhouse-operator-configd-folder
+ - mountPath: /etc/clickhouse-operator/chi/templates.d
+ name: etc-clickhouse-operator-templatesd-folder
+ - mountPath: /etc/clickhouse-operator/chi/users.d
+ name: etc-clickhouse-operator-usersd-folder
+ - mountPath: /etc/clickhouse-operator/chk/conf.d
+ name: etc-keeper-operator-confd-folder
+ - mountPath: /etc/clickhouse-operator/chk/keeper_config.d
+ name: etc-keeper-operator-configd-folder
+ - mountPath: /etc/clickhouse-operator/chk/templates.d
+ name: etc-keeper-operator-templatesd-folder
+ - mountPath: /etc/clickhouse-operator/chk/users.d
+ name: etc-keeper-operator-usersd-folder
+ nodeSelector:
+ kubernetes.io/os: linux
+ serviceAccountName: signoz-telemetrystore-clickhouse-operator
+ volumes:
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-etc-files
+ name: etc-clickhouse-operator-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-etc-confd-files
+ name: etc-clickhouse-operator-confd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-etc-configd-files
+ name: etc-clickhouse-operator-configd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-etc-templatesd-files
+ name: etc-clickhouse-operator-templatesd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-etc-usersd-files
+ name: etc-clickhouse-operator-usersd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-confd-files
+ name: etc-keeper-operator-confd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-configd-files
+ name: etc-keeper-operator-configd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-templatesd-files
+ name: etc-keeper-operator-templatesd-folder
+ - configMap:
+ name: signoz-telemetrystore-clickhouse-operator-keeper-etc-usersd-files
+ name: etc-keeper-operator-usersd-folder
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/kustomization.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/kustomization.yaml
new file mode 100644
index 0000000..6ed5d3e
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/kustomization.yaml
@@ -0,0 +1,9 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- serviceaccount.yaml
+- configmap.yaml
+- clusterrole.yaml
+- clusterrolebinding.yaml
+- service.yaml
+- deployment.yaml
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/service.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/service.yaml
new file mode 100644
index 0000000..98ebb4f
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/service.yaml
@@ -0,0 +1,17 @@
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator-metrics
+spec:
+ ports:
+ - name: ch-metrics
+ port: 8888
+ - name: op-metrics
+ port: 9999
+ selector:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/serviceaccount.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/serviceaccount.yaml
new file mode 100644
index 0000000..6e3cb19
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/clickhouse-operator/serviceaccount.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/instance: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/name: signoz-telemetrystore-clickhouse-operator
+ app.kubernetes.io/version: 0.25.3
+ name: signoz-telemetrystore-clickhouse-operator
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/ingester/configmap.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/ingester/configmap.yaml
new file mode 100644
index 0000000..c6f483d
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/ingester/configmap.yaml
@@ -0,0 +1,144 @@
+apiVersion: v1
+data:
+ ingester.yaml: |-
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-clickhouse:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-clickhouse:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-clickhouse:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-clickhouse:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: 'server_endpoint: ws://signoz-signoz:4320/v1/opamp'
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-ingester
+ name: signoz-ingester
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/ingester/deployment.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/ingester/deployment.yaml
new file mode 100644
index 0000000..2146976
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/ingester/deployment.yaml
@@ -0,0 +1,120 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ labels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-ingester
+ name: signoz-ingester
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-ingester
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-ingester
+ spec:
+ containers:
+ - args:
+ - --config=/conf/ingester.yaml
+ - --manager-config=/conf/opamp.yaml
+ - --copy-path=/var/tmp/collector-config.yaml
+ command:
+ - /signoz-otel-collector
+ env:
+ - name: K8S_NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ - name: K8S_POD_IP
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: status.podIP
+ - name: K8S_HOST_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.hostIP
+ - name: K8S_POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: K8S_POD_UID
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.uid
+ - name: K8S_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ livenessProbe:
+ failureThreshold: 6
+ httpGet:
+ path: /
+ port: 13133
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ name: collector
+ ports:
+ - containerPort: 4317
+ name: otlp-grpc
+ protocol: TCP
+ - containerPort: 4318
+ name: otlp-http
+ protocol: TCP
+ - containerPort: 13133
+ name: health
+ protocol: TCP
+ readinessProbe:
+ failureThreshold: 6
+ httpGet:
+ path: /
+ port: 13133
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ resources:
+ requests:
+ cpu: 125m
+ memory: 512Mi
+ volumeMounts:
+ - mountPath: /conf
+ name: ingester-config-vol
+ initContainers:
+ - args:
+ - migrate
+ - sync
+ - check
+ command:
+ - /signoz-otel-collector
+ env:
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER
+ value: cluster
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION
+ value: "true"
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ name: check
+ serviceAccountName: signoz-ingester
+ volumes:
+ - configMap:
+ name: signoz-ingester
+ name: ingester-config-vol
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/ingester/kustomization.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/ingester/kustomization.yaml
new file mode 100644
index 0000000..025ce64
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/ingester/kustomization.yaml
@@ -0,0 +1,7 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- serviceaccount.yaml
+- configmap.yaml
+- service.yaml
+- deployment.yaml
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/ingester/service.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/ingester/service.yaml
new file mode 100644
index 0000000..d26ad2b
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/ingester/service.yaml
@@ -0,0 +1,28 @@
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-ingester
+ name: signoz-ingester
+spec:
+ ports:
+ - name: otlp-grpc
+ port: 4317
+ protocol: TCP
+ targetPort: 4317
+ - name: otlp-http
+ port: 4318
+ protocol: TCP
+ targetPort: 4318
+ - name: health
+ port: 13133
+ protocol: TCP
+ targetPort: 13133
+ selector:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-ingester
+ type: ClusterIP
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/ingester/serviceaccount.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/ingester/serviceaccount.yaml
new file mode 100644
index 0000000..472df92
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/ingester/serviceaccount.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/component: ingester
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-ingester
+ name: signoz-ingester
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/kustomization.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/kustomization.yaml
new file mode 100644
index 0000000..2f960b3
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/kustomization.yaml
@@ -0,0 +1,12 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+namespace: signoz
+resources:
+- namespace.yaml
+- clickhouse-operator
+- telemetrystore/clickhouse
+- telemetrykeeper/clickhousekeeper
+- telemetrystore-migrator
+- metastore/postgres
+- signoz
+- ingester
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/kustomization.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/kustomization.yaml
new file mode 100644
index 0000000..7fcd38a
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/kustomization.yaml
@@ -0,0 +1,6 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- serviceaccount.yaml
+- service.yaml
+- statefulset.yaml
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/service.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/service.yaml
new file mode 100644
index 0000000..b858a59
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-metastore
+ name: signoz-metastore
+spec:
+ ports:
+ - name: tcp-postgresql
+ port: 5432
+ protocol: TCP
+ targetPort: tcp-postgresql
+ selector:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-metastore
+ type: ClusterIP
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/serviceaccount.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/serviceaccount.yaml
new file mode 100644
index 0000000..f64d89d
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/serviceaccount.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-metastore
+ name: signoz-metastore
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/statefulset.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/statefulset.yaml
new file mode 100644
index 0000000..c5796ae
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/metastore/postgres/statefulset.yaml
@@ -0,0 +1,87 @@
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ labels:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-metastore
+ name: signoz-metastore
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-metastore
+ serviceName: signoz-metastore
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: metastore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-metastore
+ spec:
+ containers:
+ - env:
+ - name: POSTGRESQL_VOLUME_DIR
+ value: /var/lib/postgresql
+ - name: POSTGRESQL_PORT_NUMBER
+ value: "5432"
+ - name: PGDATA
+ value: /var/lib/postgresql/data
+ - name: POSTGRES_DB
+ value: signoz
+ - name: POSTGRES_PASSWORD
+ value: signoz
+ - name: POSTGRES_USER
+ value: signoz
+ image: postgres:16
+ imagePullPolicy: IfNotPresent
+ livenessProbe:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - exec pg_isready -U "$POSTGRES_USER" -h 127.0.0.1 -p 5432
+ failureThreshold: 6
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ name: postgres
+ ports:
+ - containerPort: 5432
+ name: tcp-postgresql
+ protocol: TCP
+ readinessProbe:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - exec pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB" -h 127.0.0.1 -p
+ 5432
+ failureThreshold: 6
+ initialDelaySeconds: 5
+ periodSeconds: 5
+ successThreshold: 1
+ timeoutSeconds: 3
+ resources:
+ requests:
+ cpu: 100m
+ memory: 128Mi
+ volumeMounts:
+ - mountPath: /var/lib/postgresql
+ name: pgdata
+ serviceAccountName: signoz-metastore
+ volumeClaimTemplates:
+ - apiVersion: v1
+ kind: PersistentVolumeClaim
+ metadata:
+ name: pgdata
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 10Gi
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/namespace.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/namespace.yaml
new file mode 100644
index 0000000..b0391bc
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/namespace.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: signoz
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/signoz/kustomization.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/signoz/kustomization.yaml
new file mode 100644
index 0000000..7fcd38a
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/signoz/kustomization.yaml
@@ -0,0 +1,6 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- serviceaccount.yaml
+- service.yaml
+- statefulset.yaml
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/signoz/service.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/signoz/service.yaml
new file mode 100644
index 0000000..6ba6318
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/signoz/service.yaml
@@ -0,0 +1,24 @@
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-signoz
+ name: signoz-signoz
+spec:
+ ports:
+ - name: http
+ port: 8080
+ protocol: TCP
+ targetPort: http
+ - name: opamp
+ port: 4320
+ protocol: TCP
+ targetPort: opamp
+ selector:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-signoz
+ type: ClusterIP
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/signoz/serviceaccount.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/signoz/serviceaccount.yaml
new file mode 100644
index 0000000..390b499
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/signoz/serviceaccount.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-signoz
+ name: signoz-signoz
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/signoz/statefulset.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/signoz/statefulset.yaml
new file mode 100644
index 0000000..d5c173f
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/signoz/statefulset.yaml
@@ -0,0 +1,67 @@
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ labels:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-signoz
+ name: signoz-signoz
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-signoz
+ serviceName: signoz-signoz
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: signoz
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-signoz
+ spec:
+ containers:
+ - env:
+ - name: SIGNOZ_SQLSTORE_POSTGRES_DSN
+ value: postgres://signoz:signoz@signoz-metastore:5432/signoz?sslmode=disable
+ - name: SIGNOZ_SQLSTORE_PROVIDER
+ value: postgres
+ - name: SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ - name: SIGNOZ_TELEMETRYSTORE_PROVIDER
+ value: clickhouse
+ image: signoz/signoz:latest
+ imagePullPolicy: IfNotPresent
+ livenessProbe:
+ failureThreshold: 6
+ httpGet:
+ path: /api/v1/health
+ port: http
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ name: signoz
+ ports:
+ - containerPort: 8080
+ name: http
+ protocol: TCP
+ - containerPort: 4320
+ name: opamp
+ protocol: TCP
+ readinessProbe:
+ failureThreshold: 6
+ httpGet:
+ path: /api/v1/health
+ port: http
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ resources:
+ requests:
+ cpu: 100m
+ memory: 200Mi
+ serviceAccountName: signoz-signoz
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/telemetrykeeper/clickhousekeeper/clickhousekeeperinstallation.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrykeeper/clickhousekeeper/clickhousekeeperinstallation.yaml
new file mode 100644
index 0000000..7b1be82
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrykeeper/clickhousekeeper/clickhousekeeperinstallation.yaml
@@ -0,0 +1,49 @@
+apiVersion: clickhouse-keeper.altinity.com/v1
+kind: ClickHouseKeeperInstallation
+metadata:
+ name: signoz-clickhouse-keeper
+spec:
+ configuration:
+ clusters:
+ - layout:
+ replicasCount: 1
+ name: cluster
+ settings:
+ keeper_server/coordination_settings/raft_logs_level: information
+ keeper_server/four_letter_word_white_list: '*'
+ listen_host: 0.0.0.0
+ logger/console: "true"
+ logger/level: trace
+ defaults:
+ templates:
+ dataVolumeClaimTemplate: default
+ podTemplate: default
+ templates:
+ podTemplates:
+ - metadata:
+ labels:
+ app.kubernetes.io/component: telemetrykeeper
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-clickhouse-keeper
+ app.kubernetes.io/part-of: signoz
+ name: default
+ spec:
+ containers:
+ - image: clickhouse/clickhouse-keeper:25.5.6
+ imagePullPolicy: IfNotPresent
+ name: clickhouse-keeper
+ resources:
+ requests:
+ cpu: 1
+ memory: 1Gi
+ securityContext:
+ fsGroup: 101
+ volumeClaimTemplates:
+ - name: default
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 10Gi
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/telemetrykeeper/clickhousekeeper/kustomization.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrykeeper/clickhousekeeper/kustomization.yaml
new file mode 100644
index 0000000..e2d3083
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrykeeper/clickhousekeeper/kustomization.yaml
@@ -0,0 +1,4 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- clickhousekeeperinstallation.yaml
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore-migrator/job.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore-migrator/job.yaml
new file mode 100644
index 0000000..d816940
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore-migrator/job.yaml
@@ -0,0 +1,99 @@
+apiVersion: batch/v1
+kind: Job
+metadata:
+ labels:
+ app.kubernetes.io/component: schema-migrator
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-telemetrystore-migrator
+ name: signoz-telemetrystore-migrator
+spec:
+ backoffLimit: 6
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: schema-migrator
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-telemetrystore-migrator
+ spec:
+ containers:
+ - args:
+ - migrate
+ - async
+ - up
+ env:
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER
+ value: cluster
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION
+ value: "true"
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ name: async
+ resources:
+ requests:
+ cpu: 10m
+ memory: 16Mi
+ initContainers:
+ - args:
+ - migrate
+ - ready
+ env:
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER
+ value: cluster
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION
+ value: "true"
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ name: ready
+ resources:
+ requests:
+ cpu: 10m
+ memory: 16Mi
+ - args:
+ - migrate
+ - bootstrap
+ env:
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER
+ value: cluster
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION
+ value: "true"
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ name: bootstrap
+ resources:
+ requests:
+ cpu: 10m
+ memory: 16Mi
+ - args:
+ - migrate
+ - sync
+ - up
+ env:
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER
+ value: cluster
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION
+ value: "true"
+ - name: SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN
+ value: tcp://signoz-clickhouse:9000
+ - name: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
+ image: signoz/signoz-otel-collector:latest
+ imagePullPolicy: IfNotPresent
+ name: sync
+ resources:
+ requests:
+ cpu: 10m
+ memory: 16Mi
+ restartPolicy: OnFailure
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore-migrator/kustomization.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore-migrator/kustomization.yaml
new file mode 100644
index 0000000..ac2f8e0
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore-migrator/kustomization.yaml
@@ -0,0 +1,4 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- job.yaml
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml
new file mode 100644
index 0000000..2b8e432
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml
@@ -0,0 +1,300 @@
+apiVersion: clickhouse.altinity.com/v1
+kind: ClickHouseInstallation
+metadata:
+ labels:
+ app.kubernetes.io/component: telemetrystore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-clickhouse
+ app.kubernetes.io/part-of: signoz
+ app.kubernetes.io/version: 25.5.6
+ name: signoz-clickhouse
+spec:
+ configuration:
+ clusters:
+ - layout:
+ replicasCount: 0
+ shardsCount: 1
+ name: cluster
+ files:
+ config.d/crash.yaml: |
+ send_crash_reports:
+ enabled: false
+ config.d/extra.yaml: |
+ asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ dictionaries_config: '*_dictionary.xml'
+ format_schema_path: /etc/clickhouse-server/config.d/
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ prometheus:
+ endpoint: /metrics
+ port: 9363
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ tmp_path: /var/lib/clickhouse/tmp/
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ user_defined_executable_functions_config: /etc/clickhouse-server/functions/custom-functions.xml
+ user_directories:
+ users_xml:
+ path: users.xml
+ user_files_path: /var/lib/clickhouse/user_files/
+ user_scripts_path: /var/lib/clickhouse/user_scripts/
+ zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ config.d/formatting.yaml: |
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ names:
+ date_time: date_time
+ level: level
+ logger_name: logger_name
+ message: message
+ query_id: query_id
+ source_file: source_file
+ source_line: source_line
+ thread_id: thread_id
+ thread_name: thread_name
+ type: json
+ level: information
+ size: 1000M
+ config.d/load.yaml: |
+ async_load_databases: false
+ config.d/path.yaml: |
+ merge_tree:
+ storage_policy: data
+ path: /var/lib/clickhouse/
+ config.d/storage.yaml: |
+ storage_configuration:
+ disks:
+ data0:
+ keep_free_space_bytes: 10485760
+ path: /mnt/data-0/
+ default: {}
+ policies:
+ data:
+ volumes:
+ data0:
+ disk: data0
+ default:
+ volumes:
+ default:
+ disk: default
+ config.d/system_log.yaml: |
+ error_log:
+ ttl: event_date + INTERVAL 7 DAY DELETE
+ latency_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ query_metric_log:
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 3 DAY DELETE
+ events.proto: |
+ syntax = "proto3";
+ message Event {
+ string uuid = 1;
+ string event = 2;
+ string properties = 3;
+ string timestamp = 4;
+ uint64 team_id = 5;
+ string distinct_id = 6;
+ string created_at = 7;
+ string elements_chain = 8;
+ }
+ profiles:
+ admin/max_threads: 16
+ admin/query_plan_max_limit_for_lazy_materialization: "0"
+ admin/secondary_indices_enable_bulk_filtering: "0"
+ default/allow_experimental_window_functions: "1"
+ default/allow_nondeterministic_mutations: "1"
+ default/allow_simdjson: 0
+ default/load_balancing: random
+ default/log_queries: 1
+ default/max_threads: 16
+ default/query_plan_max_limit_for_lazy_materialization: "0"
+ default/secondary_indices_enable_bulk_filtering: "0"
+ quotas:
+ default/interval/duration: 3600
+ default/interval/errors: 0
+ default/interval/execution_time: 0
+ default/interval/queries: 0
+ default/interval/read_rows: 0
+ default/interval/result_rows: 0
+ users:
+ admin/networks/ip:
+ - 10.0.0.0/8
+ - 100.64.0.0/10
+ - 172.16.0.0/12
+ - 192.0.0.0/24
+ - 198.18.0.0/15
+ - 192.168.0.0/16
+ admin/password: 27ff0399-0d3a-4bd8-919d-17c2181e6fb9
+ admin/profile: default
+ admin/quota: default
+ default/access_management: 1
+ default/named_collection_control: 1
+ default/networks/ip: ::/0
+ default/password: ""
+ default/profile: default
+ default/quota: default
+ default/show_named_collection: 1
+ default/show_named_collection_secrets: 1
+ zookeeper:
+ nodes:
+ - host: keeper-signoz-clickhouse-keeper
+ port: 2181
+ defaults:
+ templates:
+ podTemplate: default
+ serviceTemplate: default
+ templates:
+ podTemplates:
+ - metadata:
+ labels:
+ app.kubernetes.io/component: telemetrystore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/name: signoz-clickhouse
+ app.kubernetes.io/version: 25.5.6
+ name: default
+ spec:
+ containers:
+ - command:
+ - /bin/bash
+ - -c
+ - /usr/bin/clickhouse-server --config-file=/etc/clickhouse-server/config.xml
+ image: clickhouse/clickhouse-server:25.5.6
+ imagePullPolicy: IfNotPresent
+ livenessProbe:
+ failureThreshold: 10
+ httpGet:
+ path: /ping
+ port: http
+ initialDelaySeconds: 60
+ periodSeconds: 3
+ successThreshold: 1
+ timeoutSeconds: 1
+ name: clickhouse
+ ports:
+ - containerPort: 8123
+ name: http
+ - containerPort: 9000
+ name: client
+ - containerPort: 9009
+ name: interserver
+ readinessProbe:
+ failureThreshold: 3
+ httpGet:
+ path: /ping
+ port: http
+ initialDelaySeconds: 10
+ periodSeconds: 3
+ successThreshold: 1
+ timeoutSeconds: 1
+ resources:
+ requests:
+ cpu: 500m
+ memory: 512Mi
+ startupProbe:
+ failureThreshold: 30
+ httpGet:
+ path: /ping
+ port: http
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ volumeMounts:
+ - mountPath: /var/lib/clickhouse/user_scripts
+ name: shared-binary-volume
+ - mountPath: /etc/clickhouse-server/functions
+ name: custom-functions-volume
+ - mountPath: /var/lib/clickhouse
+ name: default
+ - mountPath: /mnt/data-0
+ name: data-0
+ initContainers:
+ - command:
+ - sh
+ - -c
+ - |
+ set -e
+ version="v0.0.1"
+ node_os=$(uname -s | tr '[:upper:]' '[:lower:]')
+ node_arch=$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
+ echo "Fetching histogram-binary for ${node_os}/${node_arch}"
+ cd /tmp
+ wget -O histogram-quantile.tar.gz "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F${version}/histogram-quantile_${node_os}_${node_arch}.tar.gz"
+ tar -xzf histogram-quantile.tar.gz
+ chmod +x histogram-quantile
+ mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
+ echo "histogram-quantile installed successfully"
+ image: docker.io/alpine:3.18.2
+ imagePullPolicy: IfNotPresent
+ name: histogram
+ volumeMounts:
+ - mountPath: /var/lib/clickhouse/user_scripts
+ name: shared-binary-volume
+ securityContext:
+ fsGroup: 101
+ fsGroupChangePolicy: OnRootMismatch
+ runAsGroup: 101
+ runAsUser: 101
+ volumes:
+ - emptyDir: {}
+ name: shared-binary-volume
+ - configMap:
+ name: signoz-clickhouse-custom-functions
+ name: custom-functions-volume
+ serviceTemplates:
+ - generateName: signoz-clickhouse
+ metadata:
+ labels:
+ app.kubernetes.io/component: telemetrystore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-clickhouse
+ app.kubernetes.io/part-of: signoz
+ name: default
+ spec:
+ ports:
+ - name: http
+ port: 8123
+ - name: tcp
+ port: 9000
+ type: ClusterIP
+ volumeClaimTemplates:
+ - name: data-0
+ reclaimPolicy: Retain
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 25Gi
+ - name: default
+ reclaimPolicy: Retain
+ spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 10Gi
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore/clickhouse/configmap.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore/clickhouse/configmap.yaml
new file mode 100644
index 0000000..ec8f548
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore/clickhouse/configmap.yaml
@@ -0,0 +1,25 @@
+apiVersion: v1
+data:
+ custom-functions.xml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+kind: ConfigMap
+metadata:
+ labels:
+ app.kubernetes.io/component: telemetrystore
+ app.kubernetes.io/instance: signoz
+ app.kubernetes.io/managed-by: kustomize
+ app.kubernetes.io/name: signoz-clickhouse
+ app.kubernetes.io/part-of: signoz
+ name: signoz-clickhouse-custom-functions
diff --git a/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore/clickhouse/kustomization.yaml b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore/clickhouse/kustomization.yaml
new file mode 100644
index 0000000..a6835a5
--- /dev/null
+++ b/docs/examples/kubernetes/kustomize/pours/deployment/telemetrystore/clickhouse/kustomization.yaml
@@ -0,0 +1,5 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- configmap.yaml
+- clickhouseinstallation.yaml
diff --git a/docs/examples/railway/README.md b/docs/examples/railway/README.md
new file mode 100644
index 0000000..e2eda63
--- /dev/null
+++ b/docs/examples/railway/README.md
@@ -0,0 +1,5 @@
+# Railway
+
+| Flavor | Description |
+| --- | --- |
+| [template](template/) | Deploy SigNoz on Railway using a template |
diff --git a/docs/examples/railway/template/README.md b/docs/examples/railway/template/README.md
new file mode 100644
index 0000000..e97c518
--- /dev/null
+++ b/docs/examples/railway/template/README.md
@@ -0,0 +1,69 @@
+# Railway Template
+
+| Field | Value |
+| --- | --- |
+| **Mode** | `-` |
+| **Flavor** | `template` |
+| **Platform** | `railway` |
+
+## Overview
+
+Generates per-component Dockerfiles, `railway.json` service definitions, and config files for deploying SigNoz on Railway. Deployment is manual via the Railway dashboard.
+
+> [!NOTE]
+> `foundryctl cast` does not deploy to Railway automatically. It generates the files and prints instructions for manual deployment.
+
+## Prerequisites
+
+- A [Railway](https://railway.app) account
+
+## Configuration
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: template
+ platform: railway
+```
+
+## Deploy
+
+```bash
+# Generate the template files
+foundryctl forge -f casting.yaml
+```
+
+After forging, use the generated files in `pours/deployment/` to create services on Railway.
+
+## Generated output
+
+```text
+pours/deployment/
+ telemetrykeeper/
+ Dockerfile
+ railway.json
+ keeper.d/
+ telemetrystore/
+ Dockerfile
+ railway.json
+ config.d/
+ metastore/
+ Dockerfile
+ railway.json
+ signoz/
+ Dockerfile
+ railway.json
+ ingester/
+ Dockerfile
+ railway.json
+ migrator/
+ Dockerfile
+ railway.json
+```
+
+## Customization
+
+For changes to the generated files, use [patches](../../../concepts/patches.md).
diff --git a/docs/examples/railway/template/casting.yaml b/docs/examples/railway/template/casting.yaml
new file mode 100644
index 0000000..bf6aef1
--- /dev/null
+++ b/docs/examples/railway/template/casting.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: template
+ platform: railway
diff --git a/docs/examples/railway/template/casting.yaml.lock b/docs/examples/railway/template/casting.yaml.lock
new file mode 100644
index 0000000..620037d
--- /dev/null
+++ b/docs/examples/railway/template/casting.yaml.lock
@@ -0,0 +1,674 @@
+apiVersion: v1alpha1
+kind: Installation
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: template
+ platform: railway
+ ingester:
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz-signoz.railway.internal:4320/v1/opamp
+ enabled: true
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ image: signoz/signoz-otel-collector:latest
+ version: latest
+ status:
+ addresses:
+ otlp:
+ - tcp://signoz-ingester.railway.internal:4318
+ config:
+ data:
+ ingester.yaml: |
+ connectors:
+ signozmeter:
+ metrics_flush_interval: 1h
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: "0.0.0.0:4317"
+ http:
+ endpoint: "0.0.0.0:4318"
+ processors:
+ batch:
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
+ batch/meter:
+ send_batch_size: 20000
+ send_batch_max_size: 25000
+ timeout: 5s
+ signozspanmetrics/delta:
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ dimensions_cache_size: 100000
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ enable_exp_histogram: true
+ dimensions:
+ - name: service.namespace
+ default: default
+ - name: deployment.environment
+ default: default
+ - name: signoz.collector.id
+ - name: service.version
+ exporters:
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_metrics
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_logs
+ use_new_schema: true
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_meter
+ timeout: 45s
+ sending_queue:
+ enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
+ extensions:
+ signoz_health_check:
+ endpoint: "0.0.0.0:13133"
+ pprof:
+ endpoint: "0.0.0.0:1777"
+ service:
+ telemetry:
+ logs:
+ encoding: json
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ traces:
+ receivers:
+ - otlp
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ metrics:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ logs:
+ receivers:
+ - otlp
+ processors:
+ - batch
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ metrics/meter:
+ receivers:
+ - signozmeter
+ processors:
+ - batch/meter
+ exporters:
+ - signozclickhousemeter
+ opamp.yaml: |
+ server_endpoint: ws://signoz-signoz.railway.internal:4320/v1/opamp
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
+ metastore:
+ kind: postgres
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ image: postgres:16
+ version: "16"
+ status:
+ addresses:
+ dsn: null
+ config: {}
+ env:
+ POSTGRES_DB: signoz
+ POSTGRES_PASSWORD: signoz
+ POSTGRES_USER: signoz
+ signoz:
+ spec:
+ cluster:
+ replicas: 1
+ config: {}
+ enabled: true
+ env:
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ image: signoz/signoz:latest
+ version: latest
+ status:
+ addresses:
+ apiserver:
+ - tcp://signoz-signoz.railway.internal:8080
+ opamp:
+ - ws://signoz-signoz.railway.internal:4320
+ config: {}
+ env:
+ SIGNOZ_SQLSTORE_PROVIDER: postgres
+ SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000
+ SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
+ telemetrykeeper:
+ kind: clickhousekeeper
+ spec:
+ cluster:
+ replicas: 1
+ config:
+ data:
+ keeper-0.yaml: |
+ keeper_server:
+ coordination_settings:
+ force_sync: false
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ four_letter_word_white_list: '*'
+ http_control:
+ endpoint: /ready
+ port: 9182
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: localhost
+ id: 0
+ port: 9234
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ listen_host: '::'
+ logger:
+ console: true
+ level: information
+ enabled: true
+ image: clickhouse/clickhouse-keeper:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ client:
+ - tcp://signoz-telemetrykeeper-clickhousekeeper.railway.internal:9181
+ raft:
+ - tcp://signoz-telemetrykeeper-clickhousekeeper.railway.internal:9234
+ config:
+ data:
+ keeper-0.yaml: |
+ keeper_server:
+ coordination_settings:
+ force_sync: false
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ four_letter_word_white_list: '*'
+ http_control:
+ endpoint: /ready
+ port: 9182
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: localhost
+ id: 0
+ port: 9234
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+ listen_host: '::'
+ logger:
+ console: true
+ level: information
+ extras:
+ _overrides: |
+ keeper_server:
+ http_control:
+ endpoint: /ready
+ port: 9182
+ raft_configuration:
+ server:
+ - hostname: localhost
+ id: 0
+ port: 9234
+ listen_host: '::'
+ service_names: signoz-telemetrykeeper-clickhousekeeper
+ telemetrystore:
+ kind: clickhouse
+ spec:
+ cluster:
+ replicas: 0
+ shards: 1
+ config:
+ data:
+ config-0-0.yaml: |
+ asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ error_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ http_port: 8123
+ interserver_http_port: 9009
+ latency_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ listen_host: '::'
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ path: /var/lib/clickhouse/
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ host: localhost
+ port: 9000
+ session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ tcp_port: 9000
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ tmp_path: /var/lib/clickhouse/tmp/
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ user_defined_executable_functions_config: '*function.yaml'
+ user_directories:
+ users_xml:
+ path: users.xml
+ user_files_path: /var/lib/clickhouse/user_files/
+ user_scripts_path: /etc/clickhouse-server/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-clickhousekeeper.railway.internal
+ port: 9181
+ zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ enabled: true
+ image: clickhouse/clickhouse-server:25.5.6
+ version: 25.5.6
+ status:
+ addresses:
+ tcp:
+ - tcp://signoz-telemetrystore-clickhouse.railway.internal:9000
+ config:
+ data:
+ config-0-0.yaml: |
+ asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ dictionaries_config: '*_dictionary.xml'
+ display_name: cluster
+ distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+ error_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ format_schema_path: /var/lib/clickhouse/format_schemas/
+ http_port: 8123
+ interserver_http_port: 9009
+ latency_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ listen_host: '::'
+ logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+ macros:
+ replica: "00"
+ shard: "00"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ path: /var/lib/clickhouse/
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ host: localhost
+ port: 9000
+ session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ tcp_port: 9000
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ tmp_path: /var/lib/clickhouse/tmp/
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ user_defined_executable_functions_config: '*function.yaml'
+ user_directories:
+ users_xml:
+ path: users.xml
+ user_files_path: /var/lib/clickhouse/user_files/
+ user_scripts_path: /etc/clickhouse-server/user_scripts/
+ users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+ zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-clickhousekeeper.railway.internal
+ port: 9181
+ zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+ functions.yaml: |
+ functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
+ extras:
+ _overrides: |
+ listen_host: '::'
+ remote_servers:
+ cluster:
+ shard:
+ - replica:
+ host: localhost
+ port: 9000
+ user_scripts_path: /etc/clickhouse-server/user_scripts/
+ service_names: signoz-telemetrystore-clickhouse
diff --git a/docs/examples/railway/template/pours/deployment/ingester/Dockerfile b/docs/examples/railway/template/pours/deployment/ingester/Dockerfile
new file mode 100644
index 0000000..16a9446
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/ingester/Dockerfile
@@ -0,0 +1,9 @@
+FROM signoz/signoz-otel-collector:latest
+
+COPY ingester.yaml /etc/otel-collector-config.yaml
+COPY opamp.yaml /etc/opamp-config.yaml
+
+
+ENV SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://signoz-telemetrystore-clickhouse.railway.internal:9000
+
+ENV SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
\ No newline at end of file
diff --git a/docs/examples/railway/template/pours/deployment/ingester/ingester.yaml b/docs/examples/railway/template/pours/deployment/ingester/ingester.yaml
new file mode 100644
index 0000000..83a60ba
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/ingester/ingester.yaml
@@ -0,0 +1,132 @@
+connectors:
+ signozmeter:
+ dimensions:
+ - name: service.name
+ - name: deployment.environment
+ - name: host.name
+ metrics_flush_interval: 1h
+exporters:
+ clickhouselogsexporter:
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_logs
+ sending_queue:
+ enabled: false
+ timeout: 45s
+ use_new_schema: true
+ clickhousetraces:
+ datasource: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_traces
+ low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
+ sending_queue:
+ enabled: false
+ timeout: 45s
+ use_new_schema: true
+ metadataexporter:
+ cache:
+ provider: in_memory
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_metadata
+ enabled: true
+ timeout: 45s
+ signozclickhousemeter:
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_meter
+ sending_queue:
+ enabled: false
+ timeout: 45s
+ signozclickhousemetrics:
+ dsn: tcp://signoz-telemetrystore-clickhouse.railway.internal:9000/signoz_metrics
+ sending_queue:
+ enabled: false
+ timeout: 45s
+extensions:
+ pprof:
+ endpoint: 0.0.0.0:1777
+ signoz_health_check:
+ endpoint: 0.0.0.0:13133
+processors:
+ batch:
+ send_batch_max_size: 55000
+ send_batch_size: 50000
+ timeout: 5s
+ batch/meter:
+ send_batch_max_size: 25000
+ send_batch_size: 20000
+ timeout: 5s
+ signozspanmetrics/delta:
+ aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
+ dimensions:
+ - default: default
+ name: service.namespace
+ - default: default
+ name: deployment.environment
+ - name: signoz.collector.id
+ - name: service.version
+ dimensions_cache_size: 100000
+ enable_exp_histogram: true
+ latency_histogram_buckets:
+ - 100us
+ - 1ms
+ - 2ms
+ - 6ms
+ - 10ms
+ - 50ms
+ - 100ms
+ - 250ms
+ - 500ms
+ - 1000ms
+ - 1400ms
+ - 2000ms
+ - 5s
+ - 10s
+ - 20s
+ - 40s
+ - 60s
+ metrics_exporter: signozclickhousemetrics
+ metrics_flush_interval: 60s
+receivers:
+ otlp:
+ protocols:
+ grpc:
+ endpoint: 0.0.0.0:4317
+ http:
+ endpoint: 0.0.0.0:4318
+service:
+ extensions:
+ - signoz_health_check
+ - pprof
+ pipelines:
+ logs:
+ exporters:
+ - clickhouselogsexporter
+ - signozmeter
+ - metadataexporter
+ processors:
+ - batch
+ receivers:
+ - otlp
+ metrics:
+ exporters:
+ - signozclickhousemetrics
+ - signozmeter
+ - metadataexporter
+ processors:
+ - batch
+ receivers:
+ - otlp
+ metrics/meter:
+ exporters:
+ - signozclickhousemeter
+ processors:
+ - batch/meter
+ receivers:
+ - signozmeter
+ traces:
+ exporters:
+ - clickhousetraces
+ - signozmeter
+ - metadataexporter
+ processors:
+ - signozspanmetrics/delta
+ - batch
+ receivers:
+ - otlp
+ telemetry:
+ logs:
+ encoding: json
diff --git a/docs/examples/railway/template/pours/deployment/ingester/opamp.yaml b/docs/examples/railway/template/pours/deployment/ingester/opamp.yaml
new file mode 100644
index 0000000..4741f1b
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/ingester/opamp.yaml
@@ -0,0 +1 @@
+server_endpoint: ws://signoz-signoz.railway.internal:4320/v1/opamp
diff --git a/docs/examples/railway/template/pours/deployment/ingester/railway.json b/docs/examples/railway/template/pours/deployment/ingester/railway.json
new file mode 100644
index 0000000..d41645f
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/ingester/railway.json
@@ -0,0 +1,12 @@
+{
+ "build": {
+ "builder": "DOCKERFILE",
+ "dockerfilePath": "Dockerfile"
+ },
+ "deploy": {
+ "numReplicas": 1,
+ "startCommand": "/bin/sh -c '/signoz-otel-collector migrate sync check && /signoz-otel-collector --config=/etc/otel-collector-config.yaml --manager-config=/etc/opamp-config.yaml --copy-path=/var/tmp/collector-config.yaml'",
+ "restartPolicyType": "ON_FAILURE",
+ "restartPolicyMaxRetries": 5
+ }
+}
diff --git a/docs/examples/railway/template/pours/deployment/signoz/Dockerfile b/docs/examples/railway/template/pours/deployment/signoz/Dockerfile
new file mode 100644
index 0000000..fe4fe7f
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/signoz/Dockerfile
@@ -0,0 +1,4 @@
+FROM signoz/signoz:latest
+ENV SIGNOZ_SQLSTORE_PROVIDER=postgres
+ENV SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://signoz-telemetrystore-clickhouse.railway.internal:9000
+ENV SIGNOZ_TELEMETRYSTORE_PROVIDER=clickhouse
\ No newline at end of file
diff --git a/docs/examples/railway/template/pours/deployment/signoz/railway.json b/docs/examples/railway/template/pours/deployment/signoz/railway.json
new file mode 100644
index 0000000..44648b0
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/signoz/railway.json
@@ -0,0 +1,13 @@
+{
+ "build": {
+ "builder": "DOCKERFILE",
+ "dockerfilePath": "Dockerfile"
+ },
+ "deploy": {
+ "numReplicas": 1,
+ "healthcheckPath": "/api/v1/health",
+ "healthcheckTimeout": 300,
+ "restartPolicyType": "ON_FAILURE",
+ "restartPolicyMaxRetries": 5
+ }
+}
diff --git a/docs/examples/railway/template/pours/deployment/telemetrykeeper/Dockerfile b/docs/examples/railway/template/pours/deployment/telemetrykeeper/Dockerfile
new file mode 100644
index 0000000..5182bc3
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/telemetrykeeper/Dockerfile
@@ -0,0 +1,26 @@
+FROM clickhouse/clickhouse-keeper:25.5.6
+
+# Copy all keeper config files
+COPY keeper.d/ /etc/clickhouse-keeper/
+# Create entrypoint script to dynamically select config based on replica index
+RUN cat > /entrypoint.sh <<'EOF'
+#!/bin/bash
+set -euo pipefail
+
+# Extract replica index from service name, default to 0
+REPLICA_INDEX=$(echo "${RAILWAY_SERVICE_NAME:-}" | grep -oE "[0-9]+$" || echo "0")
+CONFIG_FILE="/etc/clickhouse-keeper/keeper-${REPLICA_INDEX}.yaml"
+
+# Fallback to keeper-0.yaml if replica-specific config doesn't exist
+if [ ! -f "$CONFIG_FILE" ]; then
+ echo "Config $CONFIG_FILE not found, falling back to keeper-0.yaml"
+ CONFIG_FILE="/etc/clickhouse-keeper/keeper-0.yaml"
+fi
+
+echo "Starting ClickHouse Keeper with config: $CONFIG_FILE"
+exec /usr/bin/clickhouse-keeper --config-file="$CONFIG_FILE" "$@"
+EOF
+
+RUN chmod +x /entrypoint.sh
+
+ENTRYPOINT ["/entrypoint.sh"]
\ No newline at end of file
diff --git a/docs/examples/railway/template/pours/deployment/telemetrykeeper/keeper.d/keeper-0.yaml b/docs/examples/railway/template/pours/deployment/telemetrykeeper/keeper.d/keeper-0.yaml
new file mode 100644
index 0000000..1d49025
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/telemetrykeeper/keeper.d/keeper-0.yaml
@@ -0,0 +1,25 @@
+keeper_server:
+ coordination_settings:
+ force_sync: false
+ operation_timeout_ms: 10000
+ raft_logs_level: warning
+ session_timeout_ms: 30000
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
+ four_letter_word_white_list: '*'
+ http_control:
+ endpoint: /ready
+ port: 9182
+ log_storage_path: /var/lib/clickhouse/coordination/log
+ raft_configuration:
+ server:
+ - hostname: localhost
+ id: 0
+ port: 9234
+ server_id: 0
+ snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
+ tcp_port: 9181
+listen_host: '::'
+logger:
+ console: true
+ level: information
diff --git a/docs/examples/railway/template/pours/deployment/telemetrykeeper/railway.json b/docs/examples/railway/template/pours/deployment/telemetrykeeper/railway.json
new file mode 100644
index 0000000..84435fb
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/telemetrykeeper/railway.json
@@ -0,0 +1,14 @@
+{
+ "build": {
+ "builder": "DOCKERFILE",
+ "dockerfilePath": "Dockerfile"
+ },
+ "deploy": {
+ "numReplicas": 1,
+ "healthcheckPath": "/ready",
+ "healthcheckTimeout": 300,
+ "restartPolicyType": "ON_FAILURE",
+ "restartPolicyMaxRetries": 5,
+ "requiredMountPath": "/var/lib/clickhouse-keeper/"
+ }
+}
diff --git a/docs/examples/railway/template/pours/deployment/telemetrystore-migrator/Dockerfile b/docs/examples/railway/template/pours/deployment/telemetrystore-migrator/Dockerfile
new file mode 100644
index 0000000..989b75a
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/telemetrystore-migrator/Dockerfile
@@ -0,0 +1,6 @@
+FROM signoz/signoz-otel-collector:latest
+
+
+ENV SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://signoz-telemetrystore-clickhouse.railway.internal:9000
+
+ENV SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
\ No newline at end of file
diff --git a/docs/examples/railway/template/pours/deployment/telemetrystore-migrator/railway.json b/docs/examples/railway/template/pours/deployment/telemetrystore-migrator/railway.json
new file mode 100644
index 0000000..840ad30
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/telemetrystore-migrator/railway.json
@@ -0,0 +1,11 @@
+{
+ "build": {
+ "builder": "DOCKERFILE",
+ "dockerfilePath": "Dockerfile"
+ },
+ "deploy": {
+ "numReplicas": 1,
+ "startCommand": "/bin/sh -c '/signoz-otel-collector migrate ready && /signoz-otel-collector migrate bootstrap && /signoz-otel-collector migrate sync up && /signoz-otel-collector migrate async up'",
+ "restartPolicyType": "NEVER"
+ }
+}
diff --git a/docs/examples/railway/template/pours/deployment/telemetrystore/Dockerfile b/docs/examples/railway/template/pours/deployment/telemetrystore/Dockerfile
new file mode 100644
index 0000000..901fe26
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/telemetrystore/Dockerfile
@@ -0,0 +1,36 @@
+FROM clickhouse/clickhouse-server:25.5.6
+
+COPY config.d/ /etc/clickhouse-server/
+
+RUN mkdir -p /etc/clickhouse-server/user_scripts/ \
+ && chown clickhouse:clickhouse /etc/clickhouse-server/user_scripts
+
+ARG VERSION=v0.0.1
+
+ENV CLICKHOUSE_CONFIG=/etc/clickhouse-server/config-0-0.yaml
+ENV CLICKHOUSE_SKIP_USER_SETUP=1
+
+# Download and install histogram-quantile binary
+RUN cat > /tmp/install-histogram-quantile.sh <<'EOF'
+#!/bin/bash
+set -euo pipefail
+
+node_os=$(uname -s | tr '[:upper:]' '[:lower:]')
+node_arch=$(uname -m | sed 's/aarch64/arm64/' | sed 's/x86_64/amd64/')
+
+echo "Fetching histogram-quantile for ${node_os}/${node_arch}"
+
+cd /tmp
+wget -O histogram-quantile.tar.gz \
+ "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F${VERSION}/histogram-quantile_${node_os}_${node_arch}.tar.gz"
+
+tar -xzf histogram-quantile.tar.gz
+mv histogram-quantile /etc/clickhouse-server/user_scripts/histogramQuantile
+rm histogram-quantile.tar.gz
+
+echo "histogram-quantile installed successfully"
+EOF
+
+RUN chmod +x /tmp/install-histogram-quantile.sh \
+ && /tmp/install-histogram-quantile.sh \
+ && rm /tmp/install-histogram-quantile.sh
\ No newline at end of file
diff --git a/docs/examples/railway/template/pours/deployment/telemetrystore/config.d/config-0-0.yaml b/docs/examples/railway/template/pours/deployment/telemetrystore/config.d/config-0-0.yaml
new file mode 100644
index 0000000..909e55a
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/telemetrystore/config.d/config-0-0.yaml
@@ -0,0 +1,96 @@
+asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+dictionaries_config: '*_dictionary.xml'
+display_name: cluster
+distributed_ddl:
+ path: /clickhouse/task_queue/ddl
+error_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+format_schema_path: /var/lib/clickhouse/format_schemas/
+http_port: 8123
+interserver_http_port: 9009
+latency_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+listen_host: '::'
+logger:
+ console: 1
+ count: 10
+ formatting:
+ type: console
+ level: information
+ size: 1000M
+macros:
+ replica: "00"
+ shard: "00"
+metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+path: /var/lib/clickhouse/
+processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+profiles:
+ default:
+ allow_simdjson: 0
+ load_balancing: random
+ log_queries: 1
+query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+quotas:
+ default:
+ interval:
+ duration: 3600
+ errors: 0
+ execution_time: 0
+ queries: 0
+ read_rows: 0
+ result_rows: 0
+remote_servers:
+ cluster:
+ shard:
+ - replica:
+ host: localhost
+ port: 9000
+session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+tcp_port: 9000
+text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+tmp_path: /var/lib/clickhouse/tmp/
+trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+user_defined_executable_functions_config: '*function.yaml'
+user_directories:
+ users_xml:
+ path: users.xml
+user_files_path: /var/lib/clickhouse/user_files/
+user_scripts_path: /etc/clickhouse-server/user_scripts/
+users:
+ default:
+ access_management: 1
+ named_collection_control: 1
+ networks:
+ ip: ::/0
+ password: ""
+ profile: default
+ quota: default
+ show_named_collection: 1
+ show_named_collection_secrets: 1
+zookeeper:
+ node:
+ - host: signoz-telemetrykeeper-clickhousekeeper.railway.internal
+ port: 9181
+zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
diff --git a/docs/examples/railway/template/pours/deployment/telemetrystore/config.d/functions.yaml b/docs/examples/railway/template/pours/deployment/telemetrystore/config.d/functions.yaml
new file mode 100644
index 0000000..9a88469
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/telemetrystore/config.d/functions.yaml
@@ -0,0 +1,13 @@
+functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
diff --git a/docs/examples/railway/template/pours/deployment/telemetrystore/railway.json b/docs/examples/railway/template/pours/deployment/telemetrystore/railway.json
new file mode 100644
index 0000000..2137a49
--- /dev/null
+++ b/docs/examples/railway/template/pours/deployment/telemetrystore/railway.json
@@ -0,0 +1,14 @@
+{
+ "build": {
+ "builder": "DOCKERFILE",
+ "dockerfilePath": "Dockerfile"
+ },
+ "deploy": {
+ "numReplicas": 1,
+ "healthcheckPath": "/ping",
+ "healthcheckTimeout": 300,
+ "restartPolicyType": "ON_FAILURE",
+ "restartPolicyMaxRetries": 5,
+ "requiredMountPath": "/var/lib/clickhouse/"
+ }
+}
diff --git a/docs/examples/render/README.md b/docs/examples/render/README.md
new file mode 100644
index 0000000..aceafd5
--- /dev/null
+++ b/docs/examples/render/README.md
@@ -0,0 +1,5 @@
+# Render
+
+| Flavor | Description |
+| --- | --- |
+| [blueprint](blueprint/) | Deploy SigNoz on Render using a Blueprint spec |
diff --git a/docs/examples/render/blueprint/README.md b/docs/examples/render/blueprint/README.md
new file mode 100644
index 0000000..339e4b4
--- /dev/null
+++ b/docs/examples/render/blueprint/README.md
@@ -0,0 +1,59 @@
+# Render Blueprint
+
+| Field | Value |
+| --- | --- |
+| **Mode** | `-` |
+| **Flavor** | `blueprint` |
+| **Platform** | `render` |
+
+## Overview
+
+Generates a Render Blueprint (`render.yaml`) and supporting Dockerfiles for deploying SigNoz on the Render cloud platform. Deployment is manual via Render's Infrastructure as Code flow.
+
+> [!NOTE]
+> `foundryctl cast` does not deploy to Render automatically. It generates the files and prints instructions for manual deployment.
+
+## Prerequisites
+
+- A [Render](https://render.com) account
+
+## Configuration
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ flavor: blueprint
+ platform: render
+```
+
+## Deploy
+
+```bash
+# Generate the blueprint and supporting files
+foundryctl forge -f casting.yaml
+```
+
+After forging, deploy the generated `render.yaml` to Render using [Infrastructure as Code](https://render.com/docs/infrastructure-as-code#setup).
+
+## Generated output
+
+```text
+pours/deployment/
+ render.yaml
+ configs/
+ telemetrykeeper/
+ Dockerfile
+ keeper.d/
+ telemetrystore/
+ Dockerfile
+ config.d/
+ ingester/
+ Dockerfile
+```
+
+## Customization
+
+For changes to the generated `render.yaml`, use [patches](../../../concepts/patches.md).
diff --git a/docs/examples/render/blueprint/casting.yaml b/docs/examples/render/blueprint/casting.yaml
index 1390262..5ddfde0 100644
--- a/docs/examples/render/blueprint/casting.yaml
+++ b/docs/examples/render/blueprint/casting.yaml
@@ -1,4 +1,5 @@
apiVersion: v1alpha1
+kind: Installation
metadata:
name: o11y
spec:
diff --git a/docs/examples/render/blueprint/casting.yaml.lock b/docs/examples/render/blueprint/casting.yaml.lock
index 3104c34..4e9d22d 100644
--- a/docs/examples/render/blueprint/casting.yaml.lock
+++ b/docs/examples/render/blueprint/casting.yaml.lock
@@ -1,4 +1,5 @@
apiVersion: v1alpha1
+kind: Installation
metadata:
name: o11y
spec:
@@ -28,9 +29,9 @@ spec:
endpoint: "0.0.0.0:4318"
processors:
batch:
- send_batch_size: 20000
- send_batch_max_size: 25000
- timeout: 1s
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
@@ -90,6 +91,12 @@ spec:
timeout: 45s
sending_queue:
enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
extensions:
o11y_health_check:
endpoint: "0.0.0.0:13133"
@@ -163,9 +170,9 @@ spec:
endpoint: "0.0.0.0:4318"
processors:
batch:
- send_batch_size: 20000
- send_batch_max_size: 25000
- timeout: 1s
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
@@ -225,6 +232,12 @@ spec:
timeout: 45s
sending_queue:
enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
extensions:
o11y_health_check:
endpoint: "0.0.0.0:13133"
@@ -334,6 +347,9 @@ spec:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
@@ -365,6 +381,9 @@ spec:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
@@ -384,7 +403,7 @@ spec:
shards: 1
config:
data:
- config.yaml: |
+ config-0-0.yaml: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
@@ -404,13 +423,13 @@ spec:
level: information
size: 1000M
macros:
- replica: "01"
- shard: "01"
+ replica: "00"
+ shard: "00"
profiles:
default:
+ allow_simdjson: 0
load_balancing: random
log_queries: 1
- max_memory_usage: 10000000000
quotas:
default:
interval:
@@ -433,6 +452,40 @@ spec:
node:
- host: o11y-telemetrykeeper-clickhousekeeper-0
port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
@@ -470,7 +523,7 @@ spec:
- tcp://o11y-telemetrystore-clickhouse-0-0:9000
config:
data:
- config.yaml: |
+ config-0-0.yaml: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
@@ -490,13 +543,13 @@ spec:
level: information
size: 1000M
macros:
- replica: "01"
- shard: "01"
+ replica: "00"
+ shard: "00"
profiles:
default:
+ allow_simdjson: 0
load_balancing: random
log_queries: 1
- max_memory_usage: 10000000000
quotas:
default:
interval:
@@ -519,6 +572,40 @@ spec:
node:
- host: o11y-telemetrykeeper-clickhousekeeper-0
port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
diff --git a/docs/examples/render/blueprint/pours/deployment/configs/ingester/ingester.yaml b/docs/examples/render/blueprint/pours/deployment/configs/ingester/ingester.yaml
index f7df397..4cfa3da 100644
--- a/docs/examples/render/blueprint/pours/deployment/configs/ingester/ingester.yaml
+++ b/docs/examples/render/blueprint/pours/deployment/configs/ingester/ingester.yaml
@@ -36,9 +36,9 @@ extensions:
endpoint: 0.0.0.0:13133
processors:
batch:
- send_batch_max_size: 25000
- send_batch_size: 20000
- timeout: 1s
+ send_batch_max_size: 55000
+ send_batch_size: 50000
+ timeout: 5s
batch/meter:
send_batch_max_size: 25000
send_batch_size: 20000
diff --git a/docs/examples/render/blueprint/pours/deployment/configs/telemetrykeeper/keeper.d/keeper-0.yaml b/docs/examples/render/blueprint/pours/deployment/configs/telemetrykeeper/keeper.d/keeper-0.yaml
index e1ca33d..1606da9 100644
--- a/docs/examples/render/blueprint/pours/deployment/configs/telemetrykeeper/keeper.d/keeper-0.yaml
+++ b/docs/examples/render/blueprint/pours/deployment/configs/telemetrykeeper/keeper.d/keeper-0.yaml
@@ -1,8 +1,11 @@
keeper_server:
coordination_settings:
+ force_sync: false
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
four_letter_word_white_list: '*'
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
diff --git a/docs/examples/render/blueprint/pours/deployment/configs/telemetrystore/Dockerfile b/docs/examples/render/blueprint/pours/deployment/configs/telemetrystore/Dockerfile
index f654d9a..045069f 100644
--- a/docs/examples/render/blueprint/pours/deployment/configs/telemetrystore/Dockerfile
+++ b/docs/examples/render/blueprint/pours/deployment/configs/telemetrystore/Dockerfile
@@ -29,4 +29,28 @@ EOF
RUN chmod +x /tmp/install-histogram-quantile.sh \
&& /tmp/install-histogram-quantile.sh \
- && rm /tmp/install-histogram-quantile.sh
\ No newline at end of file
+ && rm /tmp/install-histogram-quantile.sh
+
+# Create wrapper entrypoint to alias the right per-node config as config.yaml
+RUN cat > /foundry-entrypoint.sh <<'EOF'
+#!/bin/bash
+set -euo pipefail
+
+# Extract shard-replica indices from service name (e.g., signoz-telemetrystore-clickhouse-0-1)
+INDICES=$(echo "${RENDER_SERVICE_NAME:-}" | grep -oE "[0-9]+-[0-9]+$" || echo "0-0")
+CONFIG_SRC="/etc/clickhouse-server/config-${INDICES}.yaml"
+
+if [ ! -f "$CONFIG_SRC" ]; then
+ echo "Config $CONFIG_SRC not found, falling back to config-0-0.yaml"
+ CONFIG_SRC="/etc/clickhouse-server/config-0-0.yaml"
+fi
+
+ln -sf "$CONFIG_SRC" /etc/clickhouse-server/config.yaml
+echo "ClickHouse starting with config: $CONFIG_SRC (aliased as config.yaml)"
+
+exec /entrypoint.sh "$@"
+EOF
+
+RUN chmod +x /foundry-entrypoint.sh
+
+ENTRYPOINT ["/foundry-entrypoint.sh"]
\ No newline at end of file
diff --git a/docs/examples/render/blueprint/pours/deployment/configs/telemetrystore/config.d/config.yaml b/docs/examples/render/blueprint/pours/deployment/configs/telemetrystore/config.d/config-0-0.yaml
similarity index 54%
rename from docs/examples/render/blueprint/pours/deployment/configs/telemetrystore/config.d/config.yaml
rename to docs/examples/render/blueprint/pours/deployment/configs/telemetrystore/config.d/config-0-0.yaml
index 38bdaff..8e9ac45 100644
--- a/docs/examples/render/blueprint/pours/deployment/configs/telemetrystore/config.d/config.yaml
+++ b/docs/examples/render/blueprint/pours/deployment/configs/telemetrystore/config.d/config-0-0.yaml
@@ -1,10 +1,16 @@
+asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
dictionaries_config: '*_dictionary.xml'
display_name: cluster
distributed_ddl:
path: /clickhouse/task_queue/ddl
+error_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
format_schema_path: /var/lib/clickhouse/format_schemas/
http_port: 8123
interserver_http_port: 9009
+latency_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
listen_host: 0.0.0.0
logger:
console: 1
@@ -14,14 +20,32 @@ logger:
level: information
size: 1000M
macros:
- replica: "01"
- shard: "01"
+ replica: "00"
+ shard: "00"
+metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
path: /var/lib/clickhouse/
+processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
profiles:
default:
+ allow_simdjson: 0
load_balancing: random
log_queries: 1
- max_memory_usage: 10000000000
+query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
quotas:
default:
interval:
@@ -37,8 +61,16 @@ remote_servers:
- replica:
host: o11y-telemetrystore-clickhouse-0-0
port: 9000
+session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
tcp_port: 9000
+text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
tmp_path: /var/lib/clickhouse/tmp/
+trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
user_defined_executable_functions_config: '*function.yaml'
user_directories:
users_xml:
@@ -60,3 +92,5 @@ zookeeper:
node:
- host: o11y-telemetrykeeper-clickhousekeeper-0
port: 9181
+zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
diff --git a/docs/examples/render/blueprint/pours/deployment/render.yaml b/docs/examples/render/blueprint/pours/deployment/render.yaml
index 9a22454..21542d1 100644
--- a/docs/examples/render/blueprint/pours/deployment/render.yaml
+++ b/docs/examples/render/blueprint/pours/deployment/render.yaml
@@ -39,6 +39,8 @@ services:
- dockerContext: configs/ingester
dockerfilePath: configs/ingester/Dockerfile
envVars:
+ - key: SIGNOZ_OTEL_COLLECTOR_TIMEOUT
+ value: 10m
- fromService:
name: o11y-telemetrystore-clickhouse-0-0
property: host
diff --git a/docs/examples/systemd/README.md b/docs/examples/systemd/README.md
new file mode 100644
index 0000000..5dd9472
--- /dev/null
+++ b/docs/examples/systemd/README.md
@@ -0,0 +1,5 @@
+# Systemd
+
+| Flavor | Description |
+| --- | --- |
+| [binary](binary/) | Bare metal Linux with systemd services |
diff --git a/docs/examples/systemd/binary/README.md b/docs/examples/systemd/binary/README.md
index 1cb3857..e7216f2 100644
--- a/docs/examples/systemd/binary/README.md
+++ b/docs/examples/systemd/binary/README.md
@@ -60,9 +60,24 @@ sudo chown -R o11y:o11y /opt/o11y /var/lib/o11y /opt/ingester /var/lib/ingester
Also, make sure that "o11y" user is allowed to transverse to the pours directory.
-## Deployment
+## Download SigNoz
-Create a `casting.yaml` file:
+Download the SigNoz release tarball and extract it into `/opt/signoz`:
+
+```bash
+ARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
+sudo mkdir -p /opt/signoz
+curl -fsSL "https://github.com/SigNoz/signoz/releases/latest/download/signoz_linux_${ARCH}.tar.gz" \
+ | sudo tar -xz --strip-components=1 -C /opt/signoz
+```
+
+> [!IMPORTANT]
+> Extract the full tarball, do not move the `signoz` binary on its own. SigNoz resolves
+> the web frontend and notification templates relative to the binary, so `bin/`, `web/`,
+> `templates/`, and `conf/` must stay together under `/opt/signoz`. Moving only the binary
+> leaves the UI and alert/email templates unresolved.
+
+## Configuration
```yaml
apiVersion: v1alpha1
@@ -74,7 +89,7 @@ spec:
mode: systemd
```
-### 1. Verify Prerequisites
+## Deploy
```bash
foundryctl gauge -f casting.yaml
@@ -86,9 +101,10 @@ foundryctl gauge -f casting.yaml
sudo foundryctl cast -f casting.yaml
```
-### 3. Verify Services
+> [!NOTE]
+> `foundryctl cast` requires `sudo` because it manages systemd services, creates system users, and writes to system directories.
-Replace `` with your `metadata.name` from `casting.yaml`:
+Step-by-step alternative:
```bash
systemctl status -o11y.service
@@ -98,18 +114,46 @@ systemctl status -telemetrykeeper-clickhousekeeper-0.service
systemctl status -metastore-postgres.service
```
-View logs:
+## Generated output
+
+```text
+pours/deployment/
+ signoz-ingester.service
+ signoz-metastore-postgres.service
+ signoz-signoz.service
+ signoz-telemetrykeeper-clickhousekeeper-0.service
+ signoz-telemetrystore-clickhouse-0-0.service
+ signoz-telemetrystore-migrator.service
+ configs/
+ ingester/
+ ingester.yaml
+ opamp.yaml
+ telemetrykeeper/
+ keeper-0.yaml
+ telemetrystore/
+ config.yaml
+ functions.yaml
+```
+
+## After deployment
+
+Check service status (replace `signoz` with your `metadata.name`):
```bash
journalctl -u -o11y.service -f
```
+View logs for a specific service:
-## Configuration
+```bash
+journalctl -u signoz-signoz.service -f
+```
-### Custom Binary Path
+View logs for all SigNoz services:
-Use annotations to specify custom binary paths or other deployment metadata:
+```bash
+journalctl -u 'signoz-*' -f
+```
| Name | Type | Description |
|------|------|-------------|
diff --git a/docs/examples/systemd/binary/casting.yaml b/docs/examples/systemd/binary/casting.yaml
index a3d3564..c3f1d6b 100644
--- a/docs/examples/systemd/binary/casting.yaml
+++ b/docs/examples/systemd/binary/casting.yaml
@@ -1,4 +1,5 @@
apiVersion: v1alpha1
+kind: Installation
metadata:
name: o11y
spec:
diff --git a/docs/examples/systemd/binary/casting.yaml.lock b/docs/examples/systemd/binary/casting.yaml.lock
index f4c1e3e..f11834c 100644
--- a/docs/examples/systemd/binary/casting.yaml.lock
+++ b/docs/examples/systemd/binary/casting.yaml.lock
@@ -1,4 +1,5 @@
apiVersion: v1alpha1
+kind: Installation
metadata:
annotations:
foundry.o11y.io/ingester-binary-path: /opt/ingester/bin/o11y-otel-collector
@@ -32,9 +33,9 @@ spec:
endpoint: "0.0.0.0:4318"
processors:
batch:
- send_batch_size: 20000
- send_batch_max_size: 25000
- timeout: 1s
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
@@ -94,6 +95,12 @@ spec:
timeout: 45s
sending_queue:
enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://localhost:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
extensions:
o11y_health_check:
endpoint: "0.0.0.0:13133"
@@ -167,9 +174,9 @@ spec:
endpoint: "0.0.0.0:4318"
processors:
batch:
- send_batch_size: 20000
- send_batch_max_size: 25000
- timeout: 1s
+ send_batch_size: 50000
+ send_batch_max_size: 55000
+ timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
@@ -229,6 +236,12 @@ spec:
timeout: 45s
sending_queue:
enabled: false
+ metadataexporter:
+ enabled: true
+ dsn: tcp://localhost:9000/signoz_metadata
+ timeout: 45s
+ cache:
+ provider: in_memory
extensions:
o11y_health_check:
endpoint: "0.0.0.0:13133"
@@ -276,6 +289,8 @@ spec:
- o11yclickhousemeter
opamp.yaml: |
server_endpoint: ws://localhost:4320/v1/opamp
+ env:
+ SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
metastore:
kind: postgres
spec:
@@ -341,6 +356,9 @@ spec:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
@@ -372,6 +390,9 @@ spec:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
+ force_sync: false
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
@@ -389,7 +410,7 @@ spec:
shards: 1
config:
data:
- config.yaml: |
+ config-0-0.yaml: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
@@ -409,13 +430,13 @@ spec:
level: information
size: 1000M
macros:
- replica: "01"
- shard: "01"
+ replica: "00"
+ shard: "00"
profiles:
default:
+ allow_simdjson: 0
load_balancing: random
log_queries: 1
- max_memory_usage: 10000000000
quotas:
default:
interval:
@@ -431,13 +452,47 @@ spec:
remote_servers:
cluster:
shard:
- - replica:
- host: localhost
- port: 9000
+ - replica:
+ - host: localhost
+ port: 9000
zookeeper:
node:
- host: localhost
port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
@@ -475,7 +530,7 @@ spec:
- tcp://localhost:9000
config:
data:
- config.yaml: |
+ config-0-0.yaml: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
@@ -495,13 +550,13 @@ spec:
level: information
size: 1000M
macros:
- replica: "01"
- shard: "01"
+ replica: "00"
+ shard: "00"
profiles:
default:
+ allow_simdjson: 0
load_balancing: random
log_queries: 1
- max_memory_usage: 10000000000
quotas:
default:
interval:
@@ -517,13 +572,47 @@ spec:
remote_servers:
cluster:
shard:
- - replica:
- host: localhost
- port: 9000
+ - replica:
+ - host: localhost
+ port: 9000
zookeeper:
node:
- host: localhost
port: 9181
+ query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_thread_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ query_views_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ part_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ asynchronous_metric_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ error_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ latency_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ session_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ text_log:
+ flush_interval_milliseconds: 30000
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
+ zookeeper_log:
+ ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
diff --git a/docs/examples/systemd/binary/pours/deployment/configs/ingester/ingester.yaml b/docs/examples/systemd/binary/pours/deployment/ingester/ingester.yaml
similarity index 97%
rename from docs/examples/systemd/binary/pours/deployment/configs/ingester/ingester.yaml
rename to docs/examples/systemd/binary/pours/deployment/ingester/ingester.yaml
index 792781a..ed4ba8e 100644
--- a/docs/examples/systemd/binary/pours/deployment/configs/ingester/ingester.yaml
+++ b/docs/examples/systemd/binary/pours/deployment/ingester/ingester.yaml
@@ -36,9 +36,9 @@ extensions:
endpoint: 0.0.0.0:13133
processors:
batch:
- send_batch_max_size: 25000
- send_batch_size: 20000
- timeout: 1s
+ send_batch_max_size: 55000
+ send_batch_size: 50000
+ timeout: 5s
batch/meter:
send_batch_max_size: 25000
send_batch_size: 20000
diff --git a/docs/examples/systemd/binary/pours/deployment/configs/ingester/opamp.yaml b/docs/examples/systemd/binary/pours/deployment/ingester/opamp.yaml
similarity index 100%
rename from docs/examples/systemd/binary/pours/deployment/configs/ingester/opamp.yaml
rename to docs/examples/systemd/binary/pours/deployment/ingester/opamp.yaml
diff --git a/docs/examples/systemd/binary/pours/deployment/o11y-telemetrystore-clickhouse-0-0.service b/docs/examples/systemd/binary/pours/deployment/o11y-telemetrystore-clickhouse-0-0.service
index be728e9..51a2b1d 100644
--- a/docs/examples/systemd/binary/pours/deployment/o11y-telemetrystore-clickhouse-0-0.service
+++ b/docs/examples/systemd/binary/pours/deployment/o11y-telemetrystore-clickhouse-0-0.service
@@ -3,7 +3,7 @@ WantedBy=multi-user.target
[Service]
CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE CAP_NET_BIND_SERVICE
-ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.yaml --pid-file=/run/clickhouse/clickhouse.pid
+ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config-0-0.yaml --pid-file=/run/clickhouse/clickhouse.pid
Group=clickhouse
LimitCORE=infinity
LimitNOFILE=500000
diff --git a/docs/examples/systemd/binary/pours/deployment/signoz-ingester.service b/docs/examples/systemd/binary/pours/deployment/signoz-ingester.service
new file mode 100644
index 0000000..36617d4
--- /dev/null
+++ b/docs/examples/systemd/binary/pours/deployment/signoz-ingester.service
@@ -0,0 +1,18 @@
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Environment=SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://localhost:9000
+Environment=SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
+ExecStart=/opt/ingester/bin/signoz-otel-collector --config=%Y/ingester/ingester.yaml --manager-config=%Y/ingester/opamp.yaml --copy-path=/var/lib/ingester/ingester.yaml
+ExecStartPre=/opt/ingester/bin/signoz-otel-collector migrate sync check
+Group=signoz
+KillMode=mixed
+Restart=on-failure
+RestartSec=5
+Type=simple
+User=signoz
+
+[Unit]
+Description=SigNoz OTel Collector
+Documentation=https://signoz.io/docs
diff --git a/docs/examples/systemd/binary/pours/deployment/signoz-signoz.service b/docs/examples/systemd/binary/pours/deployment/signoz-signoz.service
new file mode 100644
index 0000000..495aaa4
--- /dev/null
+++ b/docs/examples/systemd/binary/pours/deployment/signoz-signoz.service
@@ -0,0 +1,23 @@
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Environment=SIGNOZ_ALERTMANAGER_SIGNOZ_TEMPLATES=/opt/signoz/templates/alertmanager/*.gotmpl
+Environment=SIGNOZ_EMAILING_TEMPLATES_DIRECTORY=/opt/signoz/templates/email
+Environment=SIGNOZ_SQLSTORE_POSTGRES_DSN=postgres://signoz:signoz@localhost:5432/signoz?sslmode=disable
+Environment=SIGNOZ_SQLSTORE_PROVIDER=postgres
+Environment=SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://localhost:9000
+Environment=SIGNOZ_TELEMETRYSTORE_PROVIDER=clickhouse
+Environment=SIGNOZ_WEB_DIRECTORY=/opt/signoz/web
+ExecStart=/opt/signoz/bin/signoz server
+Group=signoz
+KillMode=mixed
+Restart=on-failure
+RestartSec=5
+Type=simple
+User=signoz
+WorkingDirectory=/opt/signoz
+
+[Unit]
+Description=SigNoz
+Documentation=https://signoz.io/docs
diff --git a/docs/examples/systemd/binary/pours/deployment/signoz-telemetrystore-migrator.service b/docs/examples/systemd/binary/pours/deployment/signoz-telemetrystore-migrator.service
new file mode 100644
index 0000000..052f0df
--- /dev/null
+++ b/docs/examples/systemd/binary/pours/deployment/signoz-telemetrystore-migrator.service
@@ -0,0 +1,18 @@
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Environment=SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://localhost:9000
+Environment=SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
+ExecStart=/bin/bash -c '/opt/ingester/bin/signoz-otel-collector migrate bootstrap && /opt/ingester/bin/signoz-otel-collector migrate sync up && /opt/ingester/bin/signoz-otel-collector migrate async up'
+ExecStartPre=/opt/ingester/bin/signoz-otel-collector migrate ready
+Group=signoz
+RemainAfterExit=yes
+Restart=on-failure
+RestartSec=5
+Type=oneshot
+User=signoz
+
+[Unit]
+Description=SigNoz TelemetryStore Migrator
+Documentation=https://signoz.io/docs
diff --git a/docs/examples/systemd/binary/pours/deployment/configs/telemetrykeeper/keeper-0.yaml b/docs/examples/systemd/binary/pours/deployment/telemetrykeeper/clickhousekeeper/keeper-0.yaml
similarity index 86%
rename from docs/examples/systemd/binary/pours/deployment/configs/telemetrykeeper/keeper-0.yaml
rename to docs/examples/systemd/binary/pours/deployment/telemetrykeeper/clickhousekeeper/keeper-0.yaml
index 9a3fe35..c74400c 100644
--- a/docs/examples/systemd/binary/pours/deployment/configs/telemetrykeeper/keeper-0.yaml
+++ b/docs/examples/systemd/binary/pours/deployment/telemetrykeeper/clickhousekeeper/keeper-0.yaml
@@ -1,8 +1,11 @@
keeper_server:
coordination_settings:
+ force_sync: false
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
+ snapshot_distance: 100000
+ snapshots_to_keep: 3
four_letter_word_white_list: '*'
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
diff --git a/docs/examples/systemd/binary/pours/deployment/configs/telemetrystore/config.yaml b/docs/examples/systemd/binary/pours/deployment/telemetrystore/clickhouse/config-0-0.yaml
similarity index 52%
rename from docs/examples/systemd/binary/pours/deployment/configs/telemetrystore/config.yaml
rename to docs/examples/systemd/binary/pours/deployment/telemetrystore/clickhouse/config-0-0.yaml
index 5a162b0..18c1be4 100644
--- a/docs/examples/systemd/binary/pours/deployment/configs/telemetrystore/config.yaml
+++ b/docs/examples/systemd/binary/pours/deployment/telemetrystore/clickhouse/config-0-0.yaml
@@ -1,10 +1,16 @@
+asynchronous_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
dictionaries_config: '*_dictionary.xml'
display_name: cluster
distributed_ddl:
path: /clickhouse/task_queue/ddl
+error_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
format_schema_path: /var/lib/clickhouse/format_schemas/
http_port: 8123
interserver_http_port: 9009
+latency_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
listen_host: 0.0.0.0
logger:
console: 1
@@ -14,14 +20,32 @@ logger:
level: information
size: 1000M
macros:
- replica: "01"
- shard: "01"
+ replica: "00"
+ shard: "00"
+metric_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
+part_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
path: /var/lib/clickhouse/
+processors_profile_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
profiles:
default:
+ allow_simdjson: 0
load_balancing: random
log_queries: 1
- max_memory_usage: 10000000000
+query_log:
+ flush_interval_milliseconds: 30000
+ partition_by: toYYYYMM(event_date)
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_metric_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_thread_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
+query_views_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
quotas:
default:
interval:
@@ -35,10 +59,18 @@ remote_servers:
cluster:
shard:
- replica:
- host: localhost
+ - host: localhost
port: 9000
+session_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
tcp_port: 9000
+text_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
tmp_path: /var/lib/clickhouse/tmp/
+trace_log:
+ flush_interval_milliseconds: 30000
+ ttl: event_date + INTERVAL 1 DAY DELETE
user_defined_executable_functions_config: '*function.yaml'
user_directories:
users_xml:
@@ -60,3 +92,5 @@ zookeeper:
node:
- host: localhost
port: 9181
+zookeeper_log:
+ ttl: event_date + INTERVAL 1 DAY DELETE
diff --git a/docs/examples/systemd/binary/pours/deployment/telemetrystore/clickhouse/functions.yaml b/docs/examples/systemd/binary/pours/deployment/telemetrystore/clickhouse/functions.yaml
new file mode 100644
index 0000000..9a88469
--- /dev/null
+++ b/docs/examples/systemd/binary/pours/deployment/telemetrystore/clickhouse/functions.yaml
@@ -0,0 +1,13 @@
+functions:
+ argument:
+ - name: buckets
+ type: Array(Float64)
+ - name: counts
+ type: Array(Float64)
+ - name: quantile
+ type: Array(Float64)
+ command: ./histogramQuantile
+ format: CSV
+ name: histogramQuantile
+ return_type: Float64
+ type: executable
diff --git a/docs/getting-started.md b/docs/getting-started.md
new file mode 100644
index 0000000..5cd465a
--- /dev/null
+++ b/docs/getting-started.md
@@ -0,0 +1,122 @@
+# Getting Started
+
+Install `foundryctl` and deploy SigNoz in three steps.
+
+## 1. Install foundryctl
+
+The fastest path is the install script, which detects your OS/arch, verifies the
+download checksum, installs the binary into `$XDG_BIN_HOME` or `~/.local/bin`,
+and prints a PATH hint if needed:
+
+```bash
+curl -fsSL https://signoz.io/foundry.sh | bash
+```
+
+Pin a specific version:
+
+```bash
+curl -fsSL https://signoz.io/foundry.sh | FOUNDRY_VERSION=v0.1.4 bash
+```
+
+### Manual install
+
+If you prefer to download the release archive yourself:
+
+**Linux:**
+
+```bash
+curl -L "https://github.com/SigNoz/foundry/releases/latest/download/foundry_linux_$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g').tar.gz" -o foundry.tar.gz
+tar -xzf foundry.tar.gz
+```
+
+**macOS:**
+
+```bash
+curl -L "https://github.com/SigNoz/foundry/releases/latest/download/foundry_darwin_$(uname -m | sed 's/x86_64/amd64/g' | sed 's/arm64/arm64/g').tar.gz" -o foundry.tar.gz
+tar -xzf foundry.tar.gz
+```
+
+**Windows (PowerShell):**
+
+```powershell
+$ARCH = if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") { "arm64" } else { "amd64" }
+Invoke-WebRequest -Uri "https://github.com/SigNoz/foundry/releases/latest/download/foundry_windows_${ARCH}.tar.gz" -OutFile foundry.tar.gz -UseBasicParsing
+tar -xzf foundry.tar.gz
+```
+
+The archive extracts to a directory named `foundry__` (for example, `foundry_darwin_arm64`) containing `bin/foundryctl`.
+
+### Add to PATH
+
+To run `foundryctl` from anywhere, move the binary onto your `PATH`:
+
+```bash
+mkdir -p "$HOME/.local/bin"
+mv foundry_*/bin/foundryctl "$HOME/.local/bin/"
+```
+
+If `~/.local/bin` isn't already on your `PATH` (common on macOS), add it to your shell config:
+
+```bash
+# zsh (~/.zshrc)
+export PATH="$HOME/.local/bin:$PATH"
+
+# bash (~/.bashrc on Linux, ~/.bash_profile on macOS)
+export PATH="$HOME/.local/bin:$PATH"
+
+# fish (~/.config/fish/config.fish)
+fish_add_path $HOME/.local/bin
+```
+
+Reload your shell or `source` the file you edited.
+
+### Verify
+
+```bash
+foundryctl --help
+```
+
+## 2. Create a casting
+
+A casting is a YAML file that describes your SigNoz deployment. Create a file called `casting.yaml`:
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: signoz
+spec:
+ deployment:
+ mode: docker
+ flavor: compose
+```
+
+This minimal casting deploys SigNoz using Docker Compose with all default settings.
+
+> [!TIP]
+> Run `foundryctl gen examples` to generate working casting files for every supported deployment mode (Docker, Kubernetes, systemd, Render, and more).
+
+## 3. Deploy
+
+```bash
+./bin/foundryctl cast -f casting.yaml
+```
+
+Foundry validates your tools (`gauge`), generates deployment files (`forge`), and deploys SigNoz (`cast`) in one step.
+
+## Validate
+
+Check that SigNoz is running:
+
+```bash
+docker ps
+```
+
+All containers should show `Up` status. Open `http://localhost:8080` to access the SigNoz UI.
+
+## What's next
+
+- [Casting concepts](concepts/casting.md) - understand casting files in depth
+- [Moldings](concepts/moldings.md) - configure individual components
+- [Patches](concepts/patches.md) - customize generated output
+- [CLI reference](reference/cli.md) - all commands and flags
+- [Examples](examples/) - working examples for Docker, Kubernetes, systemd, and cloud platforms
diff --git a/docs/ledger.md b/docs/ledger.md
new file mode 100644
index 0000000..8bfe960
--- /dev/null
+++ b/docs/ledger.md
@@ -0,0 +1,48 @@
+# Ledger
+
+Foundryctl maintains an anonymous usage ledger to help the SigNoz team understand how the tool is used, identify common errors, and prioritize improvements. **No personally identifiable information (PII) is collected.**
+
+## What is collected
+
+Each command execution sends a single event with the following properties:
+
+| Property | Description | Example |
+|---|---|---|
+| `platform` | Deployment platform from casting.yaml | `aws`, `docker`, `linux` |
+| `mode` | Deployment mode | `docker`, `systemd`, `kubernetes` |
+| `flavor` | Deployment flavor | `compose`, `binary`, `helm` |
+| `patches_configured` | Whether patches are defined | `true` / `false` |
+| `patch_count` | Number of patch entries | `0`, `2` |
+| `infrastructure_enabled` | Whether IaC generation is enabled | `true` / `false` |
+| `metastore_kind` | MetaStore backend type | `postgres`, `sqlite` |
+| `telemetry_store_kind` | TelemetryStore backend type | `clickhouse` |
+| `telemetry_keeper_kind` | TelemetryKeeper backend type | `clickhousekeeper` |
+| `success` | Whether the command succeeded | `true` / `false` |
+| `error` | Error message (on failure only) | `missing tool: docker` |
+| `os` | Operating system | `linux`, `darwin` |
+| `arch` | CPU architecture | `amd64`, `arm64` |
+| `foundry_version` | foundryctl version | `0.1.0` |
+
+### Identity
+
+Events are attributed using a hashed machine ID (HMAC-SHA256 of the OS machine ID with an application-specific salt). The hash is not reversible and cannot be correlated across different applications. No usernames, emails, IP addresses, hostnames, or file contents are sent.
+
+## Tracked commands
+
+All commands send the same `foundryctl` event, differentiated by the `command` property:
+
+- `gauge`
+- `forge`
+- `cast`
+- `catalog`
+
+## How to disable the ledger
+
+### Per-command
+
+Use the `--no-ledger` flag on any command:
+
+```bash
+foundryctl forge --no-ledger
+foundryctl --no-ledger cast
+```
diff --git a/docs/reference/casting-file.md b/docs/reference/casting-file.md
new file mode 100644
index 0000000..63fe42f
--- /dev/null
+++ b/docs/reference/casting-file.md
@@ -0,0 +1,168 @@
+# Casting File Reference
+
+Complete reference for the `casting.yaml` configuration file. For conceptual overview, see [Casting](../concepts/casting.md).
+
+## Top-level structure
+
+```yaml
+apiVersion: v1alpha1
+metadata:
+ name: # required
+ annotations: