Skip to content

Improve error message when Helm chart has malformed YAML #211

@drew

Description

@drew

Problem

When a Helm chart template produces malformed YAML (e.g., missing apiVersion), the error message from the gateway startup is:

Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: apiVersion not set

This error is buried in the Helm install job logs and not surfaced to the user. The user sees only:

x Starting gateway
x Gateway failed: openshell
Error:   × K8s namespace not ready
  ╰─▶ timed out waiting for namespace 'openshell' to exist

This makes debugging very difficult because:

  1. The actual root cause (malformed YAML) is hidden
  2. The user has to manually inspect helm-install-* job logs to find the real error
  3. The "namespace not ready" message is misleading — the namespace doesn't exist because the Helm install failed

Context

This was encountered when serviceaccount.yaml had a template directive that ate a newline, causing apiVersion: v1 to be concatenated with a comment line.

Proposed Solution

When waiting for the namespace to exist, if the timeout is reached, check the Helm install job status and logs. If the job failed, surface the Helm error message to the user instead of (or in addition to) the generic "namespace not ready" timeout.

Acceptance Criteria

  • When Helm install fails, the actual Helm error is shown to the user
  • The error message indicates the Helm install job failed (not just "namespace not ready")
  • Ideally include the job name and how to get more details (kubectl logs -n kube-system -l job-name=helm-install-<chart>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions