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:
- The actual root cause (malformed YAML) is hidden
- The user has to manually inspect
helm-install-* job logs to find the real error
- 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
Problem
When a Helm chart template produces malformed YAML (e.g., missing
apiVersion), the error message from the gateway startup is:This error is buried in the Helm install job logs and not surfaced to the user. The user sees only:
This makes debugging very difficult because:
helm-install-*job logs to find the real errorContext
This was encountered when
serviceaccount.yamlhad a template directive that ate a newline, causingapiVersion: v1to 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
kubectl logs -n kube-system -l job-name=helm-install-<chart>)