Skip to content

fix(helm): derive grpcEndpoint from chart context#1241

Open
TaylorMutch wants to merge 2 commits intomainfrom
tmutch/fix-helm-grpc-endpoint
Open

fix(helm): derive grpcEndpoint from chart context#1241
TaylorMutch wants to merge 2 commits intomainfrom
tmutch/fix-helm-grpc-endpoint

Conversation

@TaylorMutch
Copy link
Copy Markdown
Collaborator

Summary

server.grpcEndpoint was hardcoded in values.yaml to https://openshell.openshell.svc.cluster.local:8080, which only matched the in-cluster Service DNS for releases named openshell in namespace openshell. The chart now derives the endpoint from chart context, so the default works for any release name, namespace, or service port without an override. An explicit server.grpcEndpoint is used verbatim.

Also bails out early in helm-k3s-local.sh when the branch-derived k3d cluster name exceeds k3d's 32-char cap, with a copy-pasteable override hint.

Related Issue

n/a

Changes

  • New openshell.grpcEndpoint helper in _helpers.tpl builds <scheme>://<fullname>.<namespace>.svc.cluster.local:<service.port> from chart context, picking the scheme from server.disableTls. An explicit server.grpcEndpoint is passed through verbatim.
  • templates/statefulset.yaml consumes the helper for OPENSHELL_GRPC_ENDPOINT.
  • values.yaml defaults server.grpcEndpoint to empty with a comment explaining auto-derivation.
  • deploy/kube/manifests/openshell-helmchart.yaml drops the redundant hardcoded value.
  • examples/gateway-deploy-connect.md drops the now-unnecessary --set server.grpcEndpoint=... flag.
  • tasks/scripts/helm-k3s-local.sh validates the cluster name length in cmd_create before calling docker/k3d.

Testing

  • mise run pre-commit passes
  • helm template rendered correctly across: default mTLS, plaintext (disableTls=true), custom release name + namespace, explicit override (verbatim), explicit override with disableTls=true (still verbatim)
  • Deployed via mise run helm:skaffold:run against a local k3d cluster — pod healthy, resolved env OPENSHELL_GRPC_ENDPOINT=http://openshell.openshell.svc.cluster.local:8080
  • Created and deleted a sandbox via port-forward — supervisor callback used the chart-derived endpoint successfully
  • helm-k3s-local.sh create with a long branch suffix exits early with the suggested HELM_K3S_CLUSTER_NAME=... override; status, --help, start, stop, delete are unaffected

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

The chart hardcoded server.grpcEndpoint to
https://openshell.openshell.svc.cluster.local:8080, which only matched the
in-cluster Service DNS for the standard release name and namespace. A new
helper now builds <scheme>://<fullname>.<namespace>.svc.cluster.local:<port>
from chart context, picking the scheme from server.disableTls. An explicit
server.grpcEndpoint override is passed through verbatim.
helm-k3s-local.sh derives the cluster name from the current branch suffix.
Long branch names produced names exceeding k3d's 32-char cap and failed
deep inside k3d cluster create with a confusing validation error. cmd_create
now bails out before invoking docker/k3d with a copy-pasteable
HELM_K3S_CLUSTER_NAME override hint. Status, start, stop, delete, and help
remain unaffected so an over-long derived name does not block diagnostics.
@sjenning
Copy link
Copy Markdown
Contributor

sjenning commented May 7, 2026

Tested and lgtm 👍

Sign up for free to 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.

2 participants