Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
aa64df9
feat(deployment): Add k8s Helm chart for CLP package deployment.
junhaoliao Nov 14, 2025
b13eadb
Add reducer service and deployment to Helm chart.
junhaoliao Nov 16, 2025
c0c9d02
Replace hostPath volumes with PersistentVolumeClaims in Helm chart; f…
junhaoliao Nov 16, 2025
8bfd5e1
update test.sh
junhaoliao Nov 16, 2025
a3a1356
update test.sh
junhaoliao Nov 16, 2025
37000f6
Update readiness probe timeoutSeconds to 1.
junhaoliao Nov 16, 2025
34b3dca
feat(deployment): Add deployments for MCP server, API server, and gar…
junhaoliao Nov 16, 2025
a266427
feat(deployment): Add liveness and readiness probes to API server dep…
junhaoliao Nov 16, 2025
a1afc7f
Simplify service templates with conditional NodePort configuration.
junhaoliao Nov 16, 2025
e3d78a4
Add named ports in Helm templates for standardization.
junhaoliao Nov 16, 2025
f679f38
fix nodePort 's value
junhaoliao Nov 16, 2025
3108eca
fix(helm): Update default port values in configmap for query schedule…
junhaoliao Nov 16, 2025
597de93
remove comment
junhaoliao Nov 16, 2025
9c68929
Rename `user` to `username` across all components
junhaoliao Nov 16, 2025
1f6a5f0
refactor(helm): Split secrets into component-specific files; remove r…
junhaoliao Nov 16, 2025
89af695
Replace `clp-package` references with `clp` across templates.
junhaoliao Nov 16, 2025
ca7d820
split yamls
junhaoliao Nov 16, 2025
0b8ef72
exclude helm directory from yaml lint
junhaoliao Nov 16, 2025
9b5b53b
fix templates
junhaoliao Nov 16, 2025
c1dccd6
fix(helm): Update maintainer name in Chart.yaml.
junhaoliao Nov 16, 2025
236c024
fix(helm): Set default tag to "nightly" for clpPackage.
junhaoliao Nov 16, 2025
5aa26cd
Add Helm linting and toolchain support
junhaoliao Nov 16, 2025
2ab3e74
fix(helm): Rename `user` to `username` in query-worker-deployment tem…
junhaoliao Nov 16, 2025
2ac391b
refactor(helm): Rename PVC and PV files; add tmp-pvc definition.
junhaoliao Nov 16, 2025
f1f3a54
refactor(helm): Remove localPathBase; redefine directory paths for st…
junhaoliao Nov 16, 2025
832eb19
refactor(helm): Consolidate PersistentVolume templates into `createLo…
junhaoliao Nov 16, 2025
d2b4671
refactor(helm): Rename PVC and PV template files for consistency.
junhaoliao Nov 17, 2025
8985355
refactor(helm): Simplify PV and secret object names for consistency.
junhaoliao Nov 17, 2025
75c0101
refactor(helm): Consolidate PVC definitions into `createPvc` and stre…
junhaoliao Nov 17, 2025
a47741a
Merge branch 'main' into helm
junhaoliao Nov 17, 2025
1476b71
Add user-logs PVC and PV definitions.
junhaoliao Nov 17, 2025
ad82e25
fix(helm): Remove unnecessary image tag override in test script.
junhaoliao Nov 17, 2025
29fe3c0
feat(helm): Add conditional database image selection based on configu…
junhaoliao Nov 17, 2025
c5bb582
feat(helm): Add persistentVolumeClaimRetentionPolicy to statefulsets.
junhaoliao Nov 17, 2025
db9cef9
feat(helm): Add ttlSecondsAfterFinished to job templates.
junhaoliao Nov 17, 2025
1503c49
feat(deployment): set up initial Helm chart for CLP package:
junhaoliao Nov 17, 2025
2b8052f
chore(deployment): remove pod watch from test script.
junhaoliao Nov 17, 2025
0b4c4fd
chore(deployment): update chart-testing config to set target branch.
junhaoliao Nov 17, 2025
f12557d
quote string
junhaoliao Nov 17, 2025
5713eb3
fix missing yamale
junhaoliao Nov 17, 2025
fa2522e
quote string
junhaoliao Nov 17, 2025
8d176fe
fix missing yamale
junhaoliao Nov 17, 2025
e1fe436
chore(ci): Set fetch-depth to 0 in clp-lint workflow.
junhaoliao Nov 17, 2025
e4c0f22
fix(deployment): Adjust readinessProbe timeout and failure threshold.
junhaoliao Nov 17, 2025
649848d
Merge branch 'main' into helm-setup
junhaoliao Nov 17, 2025
83770ef
Merge branch 'main' into helm-setup
kirkrodrigues Nov 18, 2025
7fe32b7
chore(ci): Add comment explaining fetch-depth requirement in clp-lint…
junhaoliao Nov 21, 2025
129cc17
Merge branch 'main' into helm-setup
junhaoliao Nov 21, 2025
6c89ed6
Reformat database Job initContainer command for readability.
junhaoliao Nov 21, 2025
e40d239
Update database livenessProbe to include authentication parameters.
junhaoliao Nov 21, 2025
f17264e
alphabetize
junhaoliao Nov 21, 2025
f51b97e
Adjust probe timings for readiness and liveness checks.
junhaoliao Nov 21, 2025
8ed32a7
add url to maintainers - Apply suggestions from code review
junhaoliao Nov 21, 2025
45674e2
Standardize version field placement in Chart.yaml.
junhaoliao Nov 21, 2025
2ad9b0a
Adjust livenessProbe periodSeconds to 30.
junhaoliao Nov 21, 2025
5d5bd27
Swap liveness and readiness probe configurations in database-stateful…
junhaoliao Nov 21, 2025
fb2d287
Update all `.yml` extensions to `.yaml` for consistency
junhaoliao Nov 22, 2025
5dd3ab4
Merge branch 'helm-setup' into helm
junhaoliao Nov 25, 2025
a155ba3
Update configuration file extensions from .yml to .yaml for consistency
junhaoliao Nov 25, 2025
be9afb3
Refactor liveness and readiness probes across multiple deployment fil…
junhaoliao Nov 25, 2025
762acb9
Merge branch 'main' into helm
junhaoliao Nov 25, 2025
387ad2f
Add workerConcurrency setting to values.yaml
junhaoliao Nov 25, 2025
d2a4357
Set replicas to 1 for compression and query workers
junhaoliao Nov 25, 2025
d4f3c81
upgrade yamale to 6.1.0 - Apply suggestions from code review
junhaoliao Nov 26, 2025
1515d0d
Add chart-testing SHA256 checksum for Linux ARM64 architecture in too…
junhaoliao Nov 26, 2025
dd35d68
Remove redundant chart schema and lint validation check settings beca…
junhaoliao Nov 26, 2025
fe69119
Merge remote-tracking branch 'refs/remotes/origin/main' into helm-setup
junhaoliao Nov 26, 2025
5296f31
Remove the unneeded `chmod u+x` from the helm env source script - App…
junhaoliao Nov 26, 2025
2c41251
use chart-yaml-schema from the downloaded toolchain
junhaoliao Nov 26, 2025
0931136
Remove chart_schema.yaml from lint.yaml
junhaoliao Nov 26, 2025
dd70f5c
Assign `nodeRole` for database persistent volumes to target control-p…
junhaoliao Nov 27, 2025
ea06268
Improve waiting prompts - Apply suggestions from code review
junhaoliao Nov 27, 2025
ba5d4df
update helm chart description - Apply suggestions from code review
junhaoliao Nov 27, 2025
8b44dd6
update docs - Apply suggestions from code review
junhaoliao Nov 27, 2025
9ff1611
Rename `allowSbinScripts` to `allowHostAccessForSbinScripts` for clea…
junhaoliao Nov 27, 2025
0140971
update test script shebang, update TODO comment, set eu pipefail - Ap…
junhaoliao Nov 27, 2025
44bd1af
Make image pull policy configurable for db-table-creator job in Helm …
junhaoliao Nov 27, 2025
72013ed
Add JSDoc-style comments for helper templates in Helm chart
junhaoliao Nov 27, 2025
550e7a9
Merge branch 'main' into helm-setup
junhaoliao Nov 27, 2025
1452795
improve docs - Apply suggestions from code review
junhaoliao Nov 27, 2025
480c14b
Remove unused `createPvc` helper definition from Helm templates
junhaoliao Nov 27, 2025
4142856
Update helm toolchain output directory to use `G_HELM_TOOLCHAIN_DIR`
junhaoliao Nov 27, 2025
036222f
Remove `ct.yaml` and inline configuration in `lint.yaml` for clarity
junhaoliao Nov 27, 2025
e258b3d
Merge branch 'main' into helm-setup
junhaoliao Nov 27, 2025
bda53c1
Merge branch 'main' into helm-setup
junhaoliao Nov 27, 2025
c7789f8
Merge branch 'helm-setup' into helm
junhaoliao Nov 28, 2025
476526c
Merge branch 'main' into helm
junhaoliao Nov 28, 2025
bfa2ea3
update values.yaml with the latest clp-config.yaml
junhaoliao Nov 28, 2025
93fcbfe
Assign `nodeRole` to persistent volumes for control-plane targeting.
junhaoliao Nov 28, 2025
7a1fff4
add back helper to create PersistentVolumeClaim templates.
junhaoliao Nov 28, 2025
ba6abb4
fix(helm): Rename values flag for sbin script access in results cache…
junhaoliao Nov 28, 2025
b25b243
refactor(helm): Update initContainer command syntax for better readab…
junhaoliao Nov 28, 2025
4ef25b5
refactor(helm): Use configurable image pull policy for deployments.
junhaoliao Nov 28, 2025
0ca3173
revert db port
junhaoliao Nov 28, 2025
e57243b
Merge branch 'main' into helm
junhaoliao Nov 29, 2025
399373f
refactor(helm): Remove redundant host field from configuration values.
junhaoliao Nov 29, 2025
0bb706b
remove empty line
junhaoliao Nov 29, 2025
7f90a85
Update image tag to 'main' and pull policy to 'Always' in values.yaml.
junhaoliao Nov 29, 2025
39fdcd6
feat(deployment): Add redis, queue (RabbitMQ), and results cache (Mon…
junhaoliao Nov 29, 2025
72024e4
chore(deployment): Bump Helm chart version to 0.1.1.
junhaoliao Nov 29, 2025
4fb6dd4
add empty newline at EOF
junhaoliao Nov 29, 2025
1f4df0c
docs(deployment): Reorder parameters in Helm helper function document…
junhaoliao Nov 29, 2025
2bbccca
Merge branch 'dbs' into helm
junhaoliao Nov 29, 2025
683f03b
fix(helm): Simplify syntax for redis livenessProbe exec configuration.
junhaoliao Nov 29, 2025
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
23 changes: 23 additions & 0 deletions tools/deployment/package-helm/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
17 changes: 17 additions & 0 deletions tools/deployment/package-helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: "v2"
name: "clp-package"
Copy link
Member Author

Choose a reason for hiding this comment

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

  1. is this name fine?
  2. is the tools/deployment/package-helm name fine?

description: "A Helm chart for CLP (Compressed Log Processor) package deployment"
type: "application"
version: "0.1.0"
appVersion: "0.6.1-dev"
home: "https://github.com/y-scope/clp"
icon: "https://github.com/y-scope/clp/raw/main/docs/src/clp-logo.png"
sources: ["https://github.com/y-scope/clp"]
maintainers: [{name: "YScope Inc.", email: "[email protected]"}]
keywords:
- "analytics"
- "compression"
- "log-management"
- "log-parser"
- "logging"
- "search"
25 changes: 25 additions & 0 deletions tools/deployment/package-helm/templates/00-local-pvs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- include "clp-package.createLocalDataPv" (list . "database") }}
---

Check warning on line 2 in tools/deployment/package-helm/templates/00-local-pvs.yaml

View workflow job for this annotation

GitHub Actions / lint-check (ubuntu-24.04)

2:1 [document-start] found forbidden document start "---"
{{- include "clp-package.createLocalLogsPv" (list . "database") }}
---
{{- include "clp-package.createLocalLogsPv" (list . "queue") }}
---
{{- include "clp-package.createLocalDataPv" (list . "redis") }}
---
{{- include "clp-package.createLocalLogsPv" (list . "redis") }}
---
{{- include "clp-package.createLocalDataPv" (list . "results-cache") }}
---
{{- include "clp-package.createLocalLogsPv" (list . "results-cache") }}
---
{{- include "clp-package.createLocalLogsPv" (list . "compression-scheduler") }}
---
{{- include "clp-package.createLocalLogsPv" (list . "compression-worker") }}
---
{{- include "clp-package.createLocalLogsPv" (list . "query-scheduler") }}
---
{{- include "clp-package.createLocalLogsPv" (list . "query-worker") }}
---
{{- include "clp-package.createStreamsPv" . }}
---
{{- include "clp-package.createTmpPv" . }}
1 change: 1 addition & 0 deletions tools/deployment/package-helm/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: This should be filled with usage instructions.
215 changes: 215 additions & 0 deletions tools/deployment/package-helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "clp-package.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "clp-package.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "clp-package.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "clp-package.labels" -}}
helm.sh/chart: {{ include "clp-package.chart" . }}
{{ include "clp-package.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "clp-package.selectorLabels" -}}
app.kubernetes.io/name: {{ include "clp-package.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Image reference for CLP Package
*/}}
{{- define "clp-package.image.ref" -}}
{{- $tag := .Values.image.clpPackage.tag | default .Chart.AppVersion }}
{{- printf "%s:%s" .Values.image.clpPackage.repository $tag }}
{{- end }}

{{/*
Require a value with a standard error message
*/}}
{{- define "clp-package.requireInput" -}}
{{- . | required "Please set a value." }}
{{- end }}

{{/*
Creates timings for readiness probes (faster checks for quicker startup).
*/}}
{{- define "clp-package.readinessProbeTimings" -}}
initialDelaySeconds: 1
periodSeconds: 1
timeoutSeconds: 2
failureThreshold: 3
{{- end }}

{{/*
Creates timings for liveness probes.
*/}}
{{- define "clp-package.livenessProbeTimings" -}}
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
{{- end }}

{{/*
CLP logs directory path on host
*/}}
{{- define "clp-package.logsDirHost" -}}
{{ .Values.storage.localPathBase }}/{{ .Values.clpConfig.logs_directory }}
{{- end }}

{{/*
CLP data directory path on host
*/}}
{{- define "clp-package.dataDirHost" -}}
{{ .Values.storage.localPathBase }}/{{ .Values.clpConfig.data_directory }}
{{- end }}

{{/*
Creates a local PersistentVolume for data storage.
*/}}
{{- define "clp-package.createLocalDataPv" -}}
{{- $root := index . 0 -}}
{{- $component := index . 1 -}}
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: {{ include "clp-package.fullname" $root }}-data-pv-{{ $component }}
labels:
{{- include "clp-package.labels" $root | nindent 4 }}
app.kubernetes.io/component: {{ $component | quote }}
spec:
capacity:
storage: "20Gi"
accessModes: ["ReadWriteOnce"]
persistentVolumeReclaimPolicy: "Retain"
storageClassName: "local-storage"
local:
path: {{ include "clp-package.dataDirHost" $root }}/{{ $component }}
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: "kubernetes.io/hostname"
operator: "Exists"
{{- end }}

{{/*
Creates a local PersistentVolume for logs storage.
*/}}
{{- define "clp-package.createLocalLogsPv" -}}
{{- $root := index . 0 -}}
{{- $component := index . 1 -}}
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: {{ include "clp-package.fullname" $root }}-logs-pv-{{ $component }}
labels:
{{- include "clp-package.labels" $root | nindent 4 }}
app.kubernetes.io/component: {{ $component | quote }}
spec:
capacity:
storage: "5Gi"
accessModes: ["ReadWriteOnce"]
persistentVolumeReclaimPolicy: "Retain"
storageClassName: "local-storage"
local:
path: {{ include "clp-package.logsDirHost" $root }}/{{ $component }}
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: "kubernetes.io/hostname"
operator: "Exists"
{{- end }}

{{/*
Creates a local PersistentVolume for streams storage (ReadWriteMany).
*/}}
{{- define "clp-package.createStreamsPv" -}}
{{- $root := . -}}
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: {{ include "clp-package.fullname" $root }}-streams-pv
labels:
{{- include "clp-package.labels" $root | nindent 4 }}
app.kubernetes.io/component: "streams"
spec:
capacity:
storage: "20Gi"
accessModes: ["ReadWriteMany"]
persistentVolumeReclaimPolicy: "Retain"
storageClassName: "local-storage"
local:
path: {{ include "clp-package.dataDirHost" $root }}/streams
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: "kubernetes.io/hostname"
operator: "Exists"
{{- end }}

{{/*
Creates a local PersistentVolume for tmp storage (ReadWriteMany).
*/}}
{{- define "clp-package.createTmpPv" -}}
{{- $root := . -}}
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: {{ include "clp-package.fullname" $root }}-tmp-pv
labels:
{{- include "clp-package.labels" $root | nindent 4 }}
app.kubernetes.io/component: "tmp"
spec:
capacity:
storage: "10Gi"
accessModes: ["ReadWriteMany"]
persistentVolumeReclaimPolicy: "Retain"
storageClassName: "local-storage"
local:
path: {{ .Values.storage.localPathBase }}/var/tmp
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: "kubernetes.io/hostname"
operator: "Exists"
{{- end }}

Loading
Loading