Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
adc1af8
feat(helm): Add the Spider subchart (storage-only) and compression-co…
20001020ycx Jul 22, 2026
a812975
refine comment
20001020ycx Jul 22, 2026
be6e09e
refactor(helm): Gate Spider orchestration on `spider.enabled` alone.
20001020ycx Jul 22, 2026
dabc0ab
refactor(helm): Give `compression_coordinator` populated defaults and…
20001020ycx Jul 22, 2026
a48ead3
comments
20001020ycx Jul 22, 2026
764e7e0
refactor(helm): Add `clp.spiderStoragePort` helper.
20001020ycx Jul 22, 2026
755fc11
refactor(helm): Fix the Spider subchart's resource names via `fullnam…
20001020ycx Jul 22, 2026
8512e84
refactor(helm): Drop redundant comment.
20001020ycx Jul 22, 2026
7feb0fe
refactor(helm): Align the compression-coordinator Deployment with the…
20001020ycx Jul 22, 2026
ff23f0a
Merge branch 'main' into feat/2026-07-21-spider-storage-subchart
junhaoliao Jul 24, 2026
8eb92a4
fix(helm): Align the compression-coordinator config with the coordina…
20001020ycx Jul 27, 2026
104a68d
feat(helm): Pin the Spider subchart to upstream release 0.1.4 and com…
20001020ycx Jul 27, 2026
f26ff14
refactor(helm): Inline the `clp.spiderOrchestrationEnabled` helper as…
20001020ycx Jul 27, 2026
f4f2b83
ci(lint): Register the Spider chart repo for `ct lint` dependency bui…
20001020ycx Jul 27, 2026
8a3c7e7
chore(helm): Bump the chart version to 0.4.1-dev.3 (main took 0.4.1-d…
20001020ycx Jul 27, 2026
309cefa
Merge remote-tracking branch 'origin/main' into feat/2026-07-21-spide…
20001020ycx Jul 27, 2026
7dfe382
fix(helm): Use `helm dependency update` in set-up scripts so fresh ma…
20001020ycx Jul 27, 2026
390f2ff
fix(helm): Use `helm dependency update` in the package task so the pu…
20001020ycx Jul 27, 2026
637a46c
feat(helm): Bump the Spider subchart to 0.1.5 (task-executor logs now…
20001020ycx Jul 29, 2026
c201a47
feat(helm): Default the Spider worker image to the CLP-published `clp…
20001020ycx Jul 29, 2026
a8659c7
feat(helm): Bake the Spider worker's CLP wiring into the chart's defa…
20001020ycx Jul 29, 2026
34f7f9b
refactor(helm): Move `fullnameOverride` under `global` so the Spider …
20001020ycx Jul 29, 2026
4e91080
refactor(helm): Move naming overrides under `global` and derive the S…
20001020ycx Jul 29, 2026
fb55eb8
fix on comment
20001020ycx Jul 29, 2026
2a8ca89
Merge remote-tracking branch 'origin/main' into feat/2026-07-21-spide…
20001020ycx Jul 30, 2026
aef4cb9
chore(helm): Bump the chart version to 0.4.1-dev.4 (post-main-merge).
20001020ycx Jul 30, 2026
4d9b2da
feat(helm): Default the Spider worker's `service_account_name` to CLP…
20001020ycx Jul 30, 2026
e975b25
refactor(helm): Drop the redundant comment on `service_account_name`.
20001020ycx Jul 30, 2026
7d50905
feat(helm): Bump the Spider subchart to 0.1.8 (worker `serviceAccount…
20001020ycx Jul 30, 2026
834d8d6
feat(helm): Deploy the Celery compression scheduler and worker regard…
20001020ycx Jul 30, 2026
5cd94f1
Merge branch 'main' into feat/2026-07-21-spider-storage-subchart
20001020ycx Jul 30, 2026
c2af1ec
Apply suggestions from code review
20001020ycx Aug 2, 2026
1fb0b98
Update tools/deployment/package-helm/templates/_helpers.tpl
20001020ycx Aug 2, 2026
85edf6e
Merge branch 'main' into feat/2026-07-21-spider-storage-subchart
junhaoliao Aug 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions taskfiles/helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ tasks:
- "mkdir -p '{{.OUTPUT_DIR}}'"
- |-
. "{{.G_HELM_TOOLCHAIN_ENV_FILE}}"
helm dependency update "{{.ROOT_DIR}}/tools/deployment/package-helm"
helm package "{{.ROOT_DIR}}/tools/deployment/package-helm" --destination "{{.OUTPUT_DIR}}"
1 change: 1 addition & 0 deletions taskfiles/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ tasks:
. "{{.G_HELM_TOOLCHAIN_ENV_FILE}}"
ct lint \
--chart-dirs="tools/deployment" \
--chart-repos="spider=https://github.com/y-scope/spider/raw/gh-pages" \
--chart-yaml-schema="{{.G_HELM_TOOLCHAIN_DIR}}/etc/chart_schema.yaml" \
--lint-conf="tools/yscope-dev-utils/exports/lint-configs/.yamllint.yml"

Expand Down
2 changes: 2 additions & 0 deletions tools/deployment/package-helm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Subcharts are downloaded by `helm dependency update`.
/charts/
6 changes: 6 additions & 0 deletions tools/deployment/package-helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: spider
repository: https://github.com/y-scope/spider/raw/gh-pages
version: 0.1.8
digest: sha256:8f49c09d52edef214a19f9442f5275a39b39a5259657f9314a25b1ed79308785
generated: "2026-07-30T15:54:39.26863006-04:00"
7 changes: 6 additions & 1 deletion tools/deployment/package-helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: "v2"
name: "clp"
version: "0.4.1-dev.3"
version: "0.4.1-dev.4"
description: "A Helm chart for CLP's (Compressed Log Processor) package deployment"
type: "application"
appVersion: "0.13.1-dev"
Expand All @@ -15,3 +15,8 @@ keywords:
- "log-parser"
- "logging"
- "search"
dependencies:
- name: "spider"
version: "0.1.8"
repository: "https://github.com/y-scope/spider/raw/gh-pages"
condition: "spider.enabled"
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ EOF
echo "Installing Helm chart..."
helm uninstall test --ignore-not-found
sleep 2
helm dependency update "${script_dir}"
# Word splitting is intentional: helper functions return multiple --set flags.
# shellcheck disable=SC2046
helm install test "${script_dir}" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ generate_kind_config "${NUM_WORKER_NODES}" | kind create cluster --name "${CLUST
echo "Installing Helm chart..."
helm uninstall test --ignore-not-found
sleep 2
helm dependency update "${script_dir}"
# Word splitting is intentional: helper functions return multiple --set flags.
# shellcheck disable=SC2046
helm install test "${script_dir}" \
Expand Down
1 change: 1 addition & 0 deletions tools/deployment/package-helm/set-up-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ generate_kind_config 0 | kind create cluster --name "${CLUSTER_NAME}" --config=-
echo "Installing Helm chart..."
helm uninstall test --ignore-not-found
sleep 2
helm dependency update "${script_dir}"
# Word splitting is intentional: helper functions return multiple --set flags.
# shellcheck disable=SC2046
helm install test "${script_dir}" \
Expand Down
33 changes: 28 additions & 5 deletions tools/deployment/package-helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Expands the name of the chart.
@return {string} The chart name (truncated to 63 characters)
*/}}
{{- define "clp.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- $global := .Values.global | default dict }}
{{- default .Chart.Name $global.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand All @@ -15,10 +16,11 @@ used as a full name.
@return {string} The fully qualified app name (truncated to 63 characters)
*/}}
{{- define "clp.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- $global := .Values.global | default dict }}
{{- if $global.fullnameOverride }}
{{- $global.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- $name := default "clp" $global.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand Down Expand Up @@ -442,6 +444,27 @@ Gets the port for the Presto service.
{{- end -}}
{{- end }}

{{/*
Gets the host for the Spider storage service.

@param {object} . Root template context
@return {string} The Spider storage host
*/}}
{{- define "clp.spiderStorageHost" -}}
{{- include "spider.componentFullname" (dict "root" (index .Subcharts "spider") "component" "storage") -}}
{{- end }}

{{/*
Gets the port for the Spider storage service.

@param {object} . Root template context
@return {string} The Spider storage port
*/}}
{{- define "clp.spiderStoragePort" -}}
{{- $spider := index .Subcharts "spider" -}}
{{- $spider.Values.spiderConfig.storage.port -}}
{{- end }}
Comment thread
20001020ycx marked this conversation as resolved.

{{/*
Gets the BROKER_URL env var for Celery workers.

Expand Down Expand Up @@ -545,7 +568,7 @@ command: [
"kubectl", "wait",
{{- if eq .type "service" }}
"--for=condition=ready",
"pod", "--selector", "app.kubernetes.io/component={{ .name }}",
"pod", "--selector", "app.kubernetes.io/instance={{ .root.Release.Name }},app.kubernetes.io/component={{ .name }}",
{{- else if eq .type "job" }}
"--for=condition=complete",
"job/{{ include "clp.fullname" .root }}-{{ .name }}",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{{- if .Values.spider.enabled }}
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: {{ include "clp.fullname" . }}-compression-coordinator
labels:
{{- include "clp.labels" . | nindent 4 }}
app.kubernetes.io/component: "compression-coordinator"
spec:
replicas: 1
selector:
matchLabels:
{{- include "clp.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: "compression-coordinator"
template:
metadata:
labels:
{{- include "clp.labels" . | nindent 8 }}
app.kubernetes.io/component: "compression-coordinator"
spec:
{{- include "clp.createSchedulingConfigs" (dict
"root" .
"component" "compressionCoordinator"
) | nindent 6 }}
serviceAccountName: {{ include "clp.fullname" . }}-service-account
terminationGracePeriodSeconds: 60
initContainers:
- {{- include "clp.waitFor" (dict
"root" .
"type" "job"
"name" "db-table-creator"
) | nindent 10 }}
- {{- include "clp.waitFor" (dict
"root" .
"type" "service"
"name" "storage"
) | nindent 10 }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
containers:
- name: "compression-coordinator"
image: {{ include "clp.imageRef" (dict "root" . "component" "clpPackage") | quote }}
imagePullPolicy: "{{ .Values.image.clpPackage.pullPolicy }}"
env:
{{- include "clp.telemetryEnv" . | nindent 12 }}
- name: "CLP_DB_PASS"
valueFrom:
secretKeyRef:
name: {{ include "clp.fullname" . }}-database
key: "password"
- name: "CLP_DB_USER"
valueFrom:
secretKeyRef:
name: {{ include "clp.fullname" . }}-database
key: "username"
- name: "OTEL_SERVICE_NAME"
value: "compression-coordinator"
- name: "RUST_LOG"
value: {{ .Values.clpConfig.compression_coordinator.logging_level | quote }}
{{- include "clp.createResourceLimits" (dict
"root" .
"component" "compressionCoordinator"
) | nindent 10 }}
volumeMounts:
- name: "config"
mountPath: "/etc/clp-config.yaml"
subPath: "clp-config.yaml"
readOnly: true
command: [
"/opt/clp/bin/compression-coordinator",
"--config", "/etc/clp-config.yaml"
]
volumes:
- name: "config"
configMap:
name: {{ include "clp.fullname" . }}-config
{{- end }}
27 changes: 27 additions & 0 deletions tools/deployment/package-helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,33 @@ data:
| int }}
target_segment_size: {{ .Values.clpConfig.archive_output.target_segment_size
| int }}
{{- if .Values.spider.enabled }}
compression_coordinator:
commit_task_hard_timeout_secs: {{
.Values.clpConfig.compression_coordinator.commit_task_hard_timeout_secs | int }}
commit_task_max_retry: {{
.Values.clpConfig.compression_coordinator.commit_task_max_retry | int }}
commit_task_soft_timeout_secs: {{
.Values.clpConfig.compression_coordinator.commit_task_soft_timeout_secs | int }}
compression_task_max_retry: {{
.Values.clpConfig.compression_coordinator.compression_task_max_retry | int }}
database_connection_pool_size: {{
.Values.clpConfig.compression_coordinator.database_connection_pool_size | int }}
job_polling_interval_millisecs: {{
.Values.clpConfig.compression_coordinator.job_polling_interval_millisecs | int }}
resource_group:
name: {{ .Values.clpConfig.compression_coordinator.resource_group.name | quote }}
result_polling:
init_backoff_millisecs: {{
.Values.clpConfig.compression_coordinator.result_polling.init_backoff_millisecs | int }}
max_backoff_millisecs: {{
.Values.clpConfig.compression_coordinator.result_polling.max_backoff_millisecs | int }}
termination_timeout_secs: {{
.Values.clpConfig.compression_coordinator.termination_timeout_secs | int }}
spider:
host: "{{ include "clp.spiderStorageHost" . }}"
port: {{ include "clp.spiderStoragePort" . | int }}
{{- end }}
compression_scheduler:
jobs_poll_delay: {{ .Values.clpConfig.compression_scheduler.jobs_poll_delay }}
logging_level: {{ .Values.clpConfig.compression_scheduler.logging_level | quote }}
Expand Down
59 changes: 57 additions & 2 deletions tools/deployment/package-helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
nameOverride: ""
fullnameOverride: ""
global:
fullnameOverride: ""
nameOverride: ""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mind quickly explaining why we have to move those two keys to global? do we need this to also override spider's fullnameOverride and nameOverride (but spider's Helm chart would need modifications in the first place?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great question which had haunted me for a while, and I am happy to explain as this is the problem with subchart.

Consider the below config we must set at Spider side such that worker can talk to CLP database (for commit task).

- name: "CLP_DB_USER"
     valueFrom:
       secretKeyRef:
       name: "{{ include \"clp.fullname\" . }}-database"

However, clp.fullname is only recognized by CLP's helm chart. Without declaring it as global, Spider subchart resolves it to the literal string {{ include \"clp.fullname\" . }} rather the actual full name of the clp subchart.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see

shall we mark this as a breaking change? as in, those who need to override those values should be aware they need to change different keys now


# Whether to allow scripts in `sbin` access to services on the host.
allowHostAccessForSbinScripts: true
Expand Down Expand Up @@ -100,6 +101,7 @@ scheduling:
resultsCache: {}

# Core
compressionCoordinator: {}
compressionScheduler: {}
logIngestor: {}
queryScheduler: {}
Expand Down Expand Up @@ -130,6 +132,7 @@ resources:
resultsCache: {}

# Core
compressionCoordinator: {}
compressionScheduler: {}
logIngestor: {}
queryScheduler: {}
Expand Down Expand Up @@ -190,6 +193,21 @@ clpConfig:
clp: "clp-db"
spider: "spider-db"

compression_coordinator:
commit_task_hard_timeout_secs: 60
commit_task_max_retry: 1
commit_task_soft_timeout_secs: 45
compression_task_max_retry: 1
database_connection_pool_size: 10
job_polling_interval_millisecs: 100
logging_level: "INFO"
resource_group:
name: "compression-coordinator"
result_polling:
init_backoff_millisecs: 100
max_backoff_millisecs: 1000
termination_timeout_secs: 30

compression_scheduler:
jobs_poll_delay: 0.1 # seconds
logging_level: "INFO"
Expand Down Expand Up @@ -366,3 +384,40 @@ serviceAccount:
annotations:
# For IRSA on EKS, set:
# eks.amazonaws.com/role-arn: "arn:aws:iam::<ACCOUNT_ID>:role/<role-name>"

# Overrides for the Spider subchart's `values.yaml`
spider:
enabled: false
Comment thread
hoophalab marked this conversation as resolved.
image:
worker:
repository: "ghcr.io/y-scope/clp/clp-spider-worker"
tag: "main"
Comment thread
20001020ycx marked this conversation as resolved.
spiderConfig:
Comment thread
20001020ycx marked this conversation as resolved.
Comment thread
20001020ycx marked this conversation as resolved.
worker:
extra_envs:
- name: "CLP_CONFIG_PATH"
value: "/etc/clp-config.yaml"
- name: "CLP_DB_USER"
valueFrom:
secretKeyRef:
name: "{{ include \"clp.fullname\" . }}-database"
key: "username"
- name: "CLP_DB_PASS"
valueFrom:
secretKeyRef:
name: "{{ include \"clp.fullname\" . }}-database"
key: "password"
extra_volume_mounts:
Comment thread
20001020ycx marked this conversation as resolved.
- name: "clp-config"
mountPath: "/etc/clp-config.yaml"
subPath: "clp-config.yaml"
readOnly: true
- name: "staged-archives"
mountPath: "/var/data/staged-archives"
extra_volumes:
- name: "clp-config"
configMap:
name: "{{ include \"clp.fullname\" . }}-config"
- name: "staged-archives"
emptyDir: {}
service_account_name: "{{ include \"clp.fullname\" . }}-service-account"
Loading