-
Notifications
You must be signed in to change notification settings - Fork 83
WIP - feat(deployment): Add k8s Helm chart for CLP package deployment. #1603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
junhaoliao
wants to merge
104
commits into
y-scope:main
Choose a base branch
from
junhaoliao:helm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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 b13eadb
Add reducer service and deployment to Helm chart.
junhaoliao c0c9d02
Replace hostPath volumes with PersistentVolumeClaims in Helm chart; f…
junhaoliao 8bfd5e1
update test.sh
junhaoliao a3a1356
update test.sh
junhaoliao 37000f6
Update readiness probe timeoutSeconds to 1.
junhaoliao 34b3dca
feat(deployment): Add deployments for MCP server, API server, and gar…
junhaoliao a266427
feat(deployment): Add liveness and readiness probes to API server dep…
junhaoliao a1afc7f
Simplify service templates with conditional NodePort configuration.
junhaoliao e3d78a4
Add named ports in Helm templates for standardization.
junhaoliao f679f38
fix nodePort 's value
junhaoliao 3108eca
fix(helm): Update default port values in configmap for query schedule…
junhaoliao 597de93
remove comment
junhaoliao 9c68929
Rename `user` to `username` across all components
junhaoliao 1f6a5f0
refactor(helm): Split secrets into component-specific files; remove r…
junhaoliao 89af695
Replace `clp-package` references with `clp` across templates.
junhaoliao ca7d820
split yamls
junhaoliao 0b8ef72
exclude helm directory from yaml lint
junhaoliao 9b5b53b
fix templates
junhaoliao c1dccd6
fix(helm): Update maintainer name in Chart.yaml.
junhaoliao 236c024
fix(helm): Set default tag to "nightly" for clpPackage.
junhaoliao 5aa26cd
Add Helm linting and toolchain support
junhaoliao 2ab3e74
fix(helm): Rename `user` to `username` in query-worker-deployment tem…
junhaoliao 2ac391b
refactor(helm): Rename PVC and PV files; add tmp-pvc definition.
junhaoliao f1f3a54
refactor(helm): Remove localPathBase; redefine directory paths for st…
junhaoliao 832eb19
refactor(helm): Consolidate PersistentVolume templates into `createLo…
junhaoliao d2b4671
refactor(helm): Rename PVC and PV template files for consistency.
junhaoliao 8985355
refactor(helm): Simplify PV and secret object names for consistency.
junhaoliao 75c0101
refactor(helm): Consolidate PVC definitions into `createPvc` and stre…
junhaoliao a47741a
Merge branch 'main' into helm
junhaoliao 1476b71
Add user-logs PVC and PV definitions.
junhaoliao ad82e25
fix(helm): Remove unnecessary image tag override in test script.
junhaoliao 29fe3c0
feat(helm): Add conditional database image selection based on configu…
junhaoliao c5bb582
feat(helm): Add persistentVolumeClaimRetentionPolicy to statefulsets.
junhaoliao db9cef9
feat(helm): Add ttlSecondsAfterFinished to job templates.
junhaoliao 1503c49
feat(deployment): set up initial Helm chart for CLP package:
junhaoliao 2b8052f
chore(deployment): remove pod watch from test script.
junhaoliao 0b4c4fd
chore(deployment): update chart-testing config to set target branch.
junhaoliao f12557d
quote string
junhaoliao 5713eb3
fix missing yamale
junhaoliao fa2522e
quote string
junhaoliao 8d176fe
fix missing yamale
junhaoliao e1fe436
chore(ci): Set fetch-depth to 0 in clp-lint workflow.
junhaoliao e4c0f22
fix(deployment): Adjust readinessProbe timeout and failure threshold.
junhaoliao 649848d
Merge branch 'main' into helm-setup
junhaoliao 83770ef
Merge branch 'main' into helm-setup
kirkrodrigues 7fe32b7
chore(ci): Add comment explaining fetch-depth requirement in clp-lint…
junhaoliao 129cc17
Merge branch 'main' into helm-setup
junhaoliao 6c89ed6
Reformat database Job initContainer command for readability.
junhaoliao e40d239
Update database livenessProbe to include authentication parameters.
junhaoliao f17264e
alphabetize
junhaoliao f51b97e
Adjust probe timings for readiness and liveness checks.
junhaoliao 8ed32a7
add url to maintainers - Apply suggestions from code review
junhaoliao 45674e2
Standardize version field placement in Chart.yaml.
junhaoliao 2ad9b0a
Adjust livenessProbe periodSeconds to 30.
junhaoliao 5d5bd27
Swap liveness and readiness probe configurations in database-stateful…
junhaoliao fb2d287
Update all `.yml` extensions to `.yaml` for consistency
junhaoliao 5dd3ab4
Merge branch 'helm-setup' into helm
junhaoliao a155ba3
Update configuration file extensions from .yml to .yaml for consistency
junhaoliao be9afb3
Refactor liveness and readiness probes across multiple deployment fil…
junhaoliao 762acb9
Merge branch 'main' into helm
junhaoliao 387ad2f
Add workerConcurrency setting to values.yaml
junhaoliao d2a4357
Set replicas to 1 for compression and query workers
junhaoliao d4f3c81
upgrade yamale to 6.1.0 - Apply suggestions from code review
junhaoliao 1515d0d
Add chart-testing SHA256 checksum for Linux ARM64 architecture in too…
junhaoliao dd35d68
Remove redundant chart schema and lint validation check settings beca…
junhaoliao fe69119
Merge remote-tracking branch 'refs/remotes/origin/main' into helm-setup
junhaoliao 5296f31
Remove the unneeded `chmod u+x` from the helm env source script - App…
junhaoliao 2c41251
use chart-yaml-schema from the downloaded toolchain
junhaoliao 0931136
Remove chart_schema.yaml from lint.yaml
junhaoliao dd70f5c
Assign `nodeRole` for database persistent volumes to target control-p…
junhaoliao ea06268
Improve waiting prompts - Apply suggestions from code review
junhaoliao ba5d4df
update helm chart description - Apply suggestions from code review
junhaoliao 8b44dd6
update docs - Apply suggestions from code review
junhaoliao 9ff1611
Rename `allowSbinScripts` to `allowHostAccessForSbinScripts` for clea…
junhaoliao 0140971
update test script shebang, update TODO comment, set eu pipefail - Ap…
junhaoliao 44bd1af
Make image pull policy configurable for db-table-creator job in Helm …
junhaoliao 72013ed
Add JSDoc-style comments for helper templates in Helm chart
junhaoliao 550e7a9
Merge branch 'main' into helm-setup
junhaoliao 1452795
improve docs - Apply suggestions from code review
junhaoliao 480c14b
Remove unused `createPvc` helper definition from Helm templates
junhaoliao 4142856
Update helm toolchain output directory to use `G_HELM_TOOLCHAIN_DIR`
junhaoliao 036222f
Remove `ct.yaml` and inline configuration in `lint.yaml` for clarity
junhaoliao e258b3d
Merge branch 'main' into helm-setup
junhaoliao bda53c1
Merge branch 'main' into helm-setup
junhaoliao c7789f8
Merge branch 'helm-setup' into helm
junhaoliao 476526c
Merge branch 'main' into helm
junhaoliao bfa2ea3
update values.yaml with the latest clp-config.yaml
junhaoliao 93fcbfe
Assign `nodeRole` to persistent volumes for control-plane targeting.
junhaoliao 7a1fff4
add back helper to create PersistentVolumeClaim templates.
junhaoliao ba6abb4
fix(helm): Rename values flag for sbin script access in results cache…
junhaoliao b25b243
refactor(helm): Update initContainer command syntax for better readab…
junhaoliao 4ef25b5
refactor(helm): Use configurable image pull policy for deployments.
junhaoliao 0ca3173
revert db port
junhaoliao e57243b
Merge branch 'main' into helm
junhaoliao 399373f
refactor(helm): Remove redundant host field from configuration values.
junhaoliao 0bb706b
remove empty line
junhaoliao 7f90a85
Update image tag to 'main' and pull policy to 'Always' in values.yaml.
junhaoliao 39fdcd6
feat(deployment): Add redis, queue (RabbitMQ), and results cache (Mon…
junhaoliao 72024e4
chore(deployment): Bump Helm chart version to 0.1.1.
junhaoliao 4fb6dd4
add empty newline at EOF
junhaoliao 1f4df0c
docs(deployment): Reorder parameters in Helm helper function document…
junhaoliao 2bbccca
Merge branch 'dbs' into helm
junhaoliao 683f03b
fix(helm): Simplify syntax for redis livenessProbe exec configuration.
junhaoliao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| apiVersion: "v2" | ||
| name: "clp-package" | ||
| 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" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| {{- include "clp-package.createLocalDataPv" (list . "database") }} | ||
| --- | ||
| {{- 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" . }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| TODO: This should be filled with usage instructions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tools/deployment/package-helmname fine?