### Suite Configuration Example (suite.yaml) Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/integration-tests/README.md Specifies dependencies and configuration for a test suite. `needs_operators` installs operators, `needs_local_storage` sets up a provisioner, and `needs_nodejs` prepares a Node.js environment. ```yaml needs_operators: false # install clickstack-operators + wait for CRDs needs_local_storage: false # install local-path-provisioner as default StorageClass needs_nodejs: false # set up Node.js (for Playwright or other JS-based tests) timeout: 300 # helm install --timeout in seconds ``` -------------------------------- ### Install ClickStack Operators and ClickStack with ALB Values Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/examples/alb-ingress/README.md Install the ClickStack operators first, then install ClickStack using the provided ALB ingress `values.yaml` file. Alternatively, you can install from the current directory using `-f values.yaml`. ```bash helm install clickstack-operators clickstack/clickstack-operators helm install my-clickstack clickstack/clickstack \ -f examples/alb-ingress/values.yaml ``` -------------------------------- ### Install ClickStack Helm Charts Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/README.md Add the ClickStack Helm repository, update it, and then install the operators and the main ClickStack chart. ```bash helm repo add clickstack https://clickhouse.github.io/ClickStack-helm-charts helm repo update # Step 1: Install operators and CRDs helm install clickstack-operators clickstack/clickstack-operators # Step 2: Install ClickStack (after operators are ready) helm install my-clickstack clickstack/clickstack ``` -------------------------------- ### Install helm-unittest Plugin Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/charts/clickstack/tests/README.md Installs the helm-unittest plugin, which is required for running Helm chart tests. Ensure Helm v3 is installed before running this command. ```bash helm plugin install https://github.com/quintush/helm-unittest ``` -------------------------------- ### Install helm-unittest Plugin Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/AGENTS.md Installs the helm-unittest plugin, which is required for running unit tests on Helm charts. ```bash helm plugin install https://github.com/helm-unittest/helm-unittest.git --version v1.0.3 ``` -------------------------------- ### Install Operators and ClickStack Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/docs/UPGRADE.md Install operators and CRDs in Phase 1, followed by the main ClickStack chart in Phase 2. Uninstall in reverse order. ```bash # Phase 1: Install operators and CRDs helm install clickstack-operators clickstack/clickstack-operators # Phase 2: Install ClickStack helm install my-clickstack clickstack/clickstack ``` ```bash helm uninstall my-clickstack helm uninstall clickstack-operators ``` -------------------------------- ### Helm Hook for Post-Install Job Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/docs/ADDITIONAL-MANIFESTS.md Use Helm hook annotations to control the ordering of `additionalManifests` during install or upgrade. This example defines a post-install job that runs a migration script. ```yaml additionalManifests: - apiVersion: batch/v1 kind: Job metadata: name: post-install-job annotations: helm.sh/hook: post-install helm.sh/hook-delete-policy: hook-succeeded spec: template: spec: restartPolicy: Never containers: - name: migrate image: my-migration-image:latest command: ["./migrate.sh"] ``` -------------------------------- ### Install ClickStack API-Only Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/examples/api-only/README.md Use this command to install the ClickStack chart with an API-only configuration, referencing a custom values file. ```bash helm install my-api clickstack/clickstack \ -f examples/api-only/values.yaml ``` -------------------------------- ### Install JS Dependencies Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/AGENTS.md Installs JavaScript dependencies using Yarn. This is primarily for changesets and versioning scripts. ```bash yarn install ``` -------------------------------- ### Deploying a ConfigMap with additionalManifests Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/docs/ADDITIONAL-MANIFESTS.md Example of adding a ConfigMap to the deployment using `additionalManifests`. Ensure template expressions within values are quoted. ```yaml additionalManifests: - apiVersion: v1 kind: ConfigMap metadata: name: '{{ include "clickstack.fullname" . }}-custom' data: release: '{{ .Release.Name }}' ``` -------------------------------- ### Running a Test Suite Locally Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/integration-tests/README.md Command to execute a specific test suite, such as 'api-only', from the repository root. Requires `kind`, `helm`, `kubectl`, and `yq` to be installed. ```bash # From the repo root ./integration-tests/run-suite.sh api-only ``` -------------------------------- ### Wrapper Chart Template Example Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/docs/ADDITIONAL-MANIFESTS.md Render structural helpers like labels from a wrapper chart template (`templates/*.yaml`) instead of embedding them directly in values files. This example shows a ConfigMap using included labels and values. ```yaml apiVersion: v1 kind: ConfigMap metadata: name: {{ include "clickstack.fullname" . }}-extra labels: {{- include "clickstack.labels" . | nindent 4 }} data: appPort: "{{ .Values.hyperdx.ports.app }}" ``` -------------------------------- ### HyperDX Values Reorganization Example Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/docs/UPGRADE.md The `hyperdx:` block is now organized by Kubernetes resource type. This example shows shared port numbers, frontend URL, and configuration for non-sensitive and sensitive environment variables. ```yaml hyperdx: ports: # Shared port numbers (Deployment, Service, ConfigMap, Ingress) api: 8000 app: 3000 opamp: 4320 frontendUrl: "http://localhost:3000" # Replaces the removed appUrl config: # → clickstack-config ConfigMap (non-sensitive env vars) APP_PORT: "3000" HYPERDX_LOG_LEVEL: "info" # ... full list in values.yaml secrets: # → clickstack-secret Secret (sensitive env vars) HYPERDX_API_KEY: "..." CLICKHOUSE_PASSWORD: "otelcollectorpass" CLICKHOUSE_APP_PASSWORD: "hyperdx" MONGODB_PASSWORD: "hyperdx" deployment: # K8s Deployment spec (image, replicas, probes, etc.) service: # K8s Service spec (type, annotations) ingress: # K8s Ingress spec (host, tls, annotations) podDisruptionBudget: # K8s PDB spec tasks: # K8s CronJob specs (previously top-level tasks:) ``` -------------------------------- ### Helm Unit Test Structure Example Source: https://github.com/clickhouse/clickstack-helm-charts/blob/main/AGENTS.md An example YAML structure for a Helm unit test file using the helm-unittest framework. Defines tests for a specific component and template. ```yaml suite: Test templates: - /