Skip to content

Add installation of Tracebloc client Helm chart to script - #30

Merged
saadqbal merged 4 commits into
developfrom
tb-helmchat
Mar 5, 2026
Merged

Add installation of Tracebloc client Helm chart to script#30
saadqbal merged 4 commits into
developfrom
tb-helmchat

Conversation

@saadqbal

@saadqbalsaadqbal commented Mar 5, 2026

Copy link
Copy Markdown
Contributor
  • Updated install-k8s.ps1 to include a new function for installing the Tracebloc client Helm chart as step 6.
  • Created install-client-helm.sh script to handle user input for configuration values and manage Helm chart installation.
  • Modified cluster.sh to ensure necessary directories for Tracebloc are created before cluster setup.
  • Updated install.sh and install-k8s.sh to source the new installation script and call the installation function during the setup process.

Note

Medium Risk
Changes the Helm chart’s StorageClass naming and imagePullSecrets/registry secret rendering, which could affect upgrades and existing release expectations. Installer scripts now automatically prompt for credentials and run helm upgrade --install, so failures or misconfiguration impact the end-to-end setup flow.

Overview
Automates Tracebloc client installation via Helm by adding a new “step 6” to both install-k8s.sh (via new lib/install-client-helm.sh) and install-k8s.ps1, prompting for namespace and client credentials, generating values.yaml under HOST_DATA_DIR, and running helm upgrade --install from the Tracebloc Helm repo; CLIENT_ENV can be injected via env var.

Helm chart hardening/config changes: bumps chart version to 1.0.2, makes StorageClass names release-unique when storageClass.create is true (and updates PV/PVC/templates/NOTES to use tracebloc.storageClassName), and makes dockerRegistry optional—only creating the registry secret and adding imagePullSecrets when dockerRegistry.create: true (with schema/values/docs + helm-unittest updates).

Written by Cursor Bugbot for commit 148e267. This will update automatically on new commits. Configure here.

- Updated install-k8s.ps1 to include a new function for installing the Tracebloc client Helm chart as step 6.
- Created install-client-helm.sh script to handle user input for configuration values and manage Helm chart installation.
- Modified cluster.sh to ensure necessary directories for Tracebloc are created before cluster setup.
- Updated install.sh and install-k8s.sh to source the new installation script and call the installation function during the setup process.
- Set TRACEBLOC_HELM_REPO_NAME to "tracebloc" for clarity.
- Updated TRACEBLOC_CHART_NAME to "client" for consistency with naming conventions.
Comment threadclient/templates/_helpers.tpl
- Modified the values schema to allow the dockerRegistry type to be either an object or null, clarifying its usage for public images.
- Updated test case descriptions to accurately reflect the behavior of docker registry secret creation when the 'create' field is omitted.

# ── GPU limits: nvidia.com/gpu=1 if NVIDIA GPU available, else "" ──────────
local gpu_val
if [[ "${GPU_VENDOR:-}" == "nvidia" ]]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bash GPU check omits NVIDIA driver readiness verification

Medium Severity

The bash script checks only GPU_VENDOR == "nvidia" to decide whether to set GPU limits, but the PowerShell equivalent at install-k8s.ps1 correctly also checks $NVIDIA_DRIVER_OK. In detect-gpu.sh, GPU_VENDOR is set to "nvidia" even when the driver is not installed (detected via lspci), with NVIDIA_DRIVER_OK=false. This causes the bash script to write GPU_LIMITS: "nvidia.com/gpu=1" into the values file when the driver isn't functional, leading to pod scheduling failures.

Additional Locations (1)

Fix in CursorFix in Web

_extract_yaml_value() {
local file="$1" key="$2"
local line
line=$(grep -E "^${key}:" "$file" 2>/dev/null | head -1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Grep failure in extract function crashes script under pipefail

Medium Severity

_extract_yaml_value uses grep ... | head -1 on line 16, but when grep finds no match it exits non-zero. With set -euo pipefail inherited from the parent script, the pipeline's non-zero exit terminates the subshell before reaching the [[ -z "$line" ]] && return guard on line 17. This crashes the entire install script when a key is missing from an existing values file.

Fix in CursorFix in Web

- Enhanced install-k8s.ps1 and install-client-helm.sh to include prompts for client ID and password during installation.
- Provided a link for users to create a client, emphasizing that the setup is free.
@saadqbal
saadqbal merged commit e4ca94b into developMar 5, 2026
1 check passed

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

{{- if and .Values.dockerRegistry (default false .Values.dockerRegistry.create) -}}
true
{{- end -}}
{{- end }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nil pointer panic when dockerRegistry is omitted or null

High Severity

The tracebloc.useImagePullSecrets helper accesses .Values.dockerRegistry.create inside the and call. Go templates evaluate all function arguments before invoking the function — and does not short-circuit evaluation. When dockerRegistry is nil (the default, since it's commented out in values.yaml), evaluating .Values.dockerRegistry.create triggers a "nil pointer evaluating interface{}.create" panic. The existing imagePullSecret template correctly uses {{- with .Values.dockerRegistry }} to guard against nil; this helper needs a similar approach.

Fix in CursorFix in Web

saadqbal added a commit that referenced this pull request Mar 5, 2026
Add installation of Tracebloc client Helm chart to script (#30)
@saadqbalsaadqbal self-assigned this Apr 28, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@saadqbal