Skip to content

feat(chart): show real endpoints in Helm post-install notes#2801

Open
ghophp wants to merge 1 commit intochainloop-dev:mainfrom
ghophp:ghophp/issue-97/dynamic-helm-notes
Open

feat(chart): show real endpoints in Helm post-install notes#2801
ghophp wants to merge 1 commit intochainloop-dev:mainfrom
ghophp:ghophp/issue-97/dynamic-helm-notes

Conversation

@ghophp
Copy link
Contributor

@ghophp ghophp commented Mar 2, 2026

Closes #97

Summary

The Helm chart NOTES.txt previously showed hardcoded placeholder endpoints (my-controlplane.acme.com:80). It now detects the actual service configuration (Ingress, LoadBalancer, NodePort, or ClusterIP) for both the Control Plane and Artifact CAS gRPC services and shows actionable connection instructions.

  • When both endpoints use Ingress, a single ready-to-use chainloop config save command is shown with real hostnames
  • For LoadBalancer/NodePort, kubectl commands to discover the external IP/port are provided
  • For ClusterIP (default), kubectl port-forward instructions are shown
  • The --insecure flag is only included when at least one endpoint lacks TLS
  • Follows the same pattern used by Bitnami charts

Example output

Default (ClusterIP):

###########################################################################
  CONFIGURE CLI
###########################################################################

To configure the CLI, you need the Control Plane and Artifact CAS gRPC endpoints.

1. The Control Plane gRPC API is not externally accessible (ClusterIP). Use port-forwarding:

     kubectl port-forward --namespace default svc/test-chainloop-controlplane-api 9000:80 &

2. The Artifact CAS gRPC API is not externally accessible (ClusterIP). Use port-forwarding:

     kubectl port-forward --namespace default svc/test-chainloop-cas-api 9001:80 &

3. Configure the CLI:

     chainloop --insecure config save \
       --control-plane localhost:9000 \
       --artifact-cas localhost:9001

Ingress with TLS:

###########################################################################
  CONFIGURE CLI
###########################################################################

Configure the CLI to point to this instance:

  chainloop config save \
    --control-plane api.cp.example.com:443 \
    --artifact-cas api.cas.example.com:443

Helm unit tests

Added snapshot tests using helm-unittest with matchSnapshotRaw covering all 6 service type combinations (ClusterIP, Ingress, Ingress+TLS, LoadBalancer, NodePort, mixed). The tests are opt-in for now and not part of the CI pipeline. To run them locally:

helm plugin install https://github.com/helm-unittest/helm-unittest.git
helm unittest deployment/chainloop

Team: worth discussing whether we want to add helm unittest to the CI pipeline and helm plugin install to make init so these run automatically going forward.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Auto-approved: This PR enhances the Helm chart's post-installation instructions (NOTES.txt) with dynamic endpoint detection and adds helm-unittest snapshots. It does not modify core application or infrastructure逻辑.

Copy link
Member

@migmartri migmartri left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

Just added a commment re: reusability of existing codebase. We might have external_urls for both controlplane and cas apis that are configuration aware already and just need to be used.

@Filip7656
Copy link
Contributor

Hi, thanks for the contribution, i would create a new PR with implementation of unit tests as they are not covered right now (and are a big thing) and keep only NOTES.txt changes in this one.

Replace hardcoded placeholder endpoints in NOTES.txt with dynamic
detection of actual service configuration. Add reusable gRPC endpoint
helper templates (controlplane.external_grpc_url, cas.external_grpc_url)
to _helpers.tpl following the same pattern as the existing HTTP helpers.

NOTES.txt now provides tailored connection instructions based on the
deployment type (Ingress, LoadBalancer, NodePort, ClusterIP).

Closes chainloop-dev#97

Signed-off-by: ghophp <ghophp@users.noreply.github.com>
Signed-off-by: Guilherme Oliveira <ghophp@gmail.com>
@ghophp ghophp force-pushed the ghophp/issue-97/dynamic-helm-notes branch from 1fe5414 to ff6cb78 Compare March 4, 2026 09:20
@ghophp
Copy link
Contributor Author

ghophp commented Mar 4, 2026

Hey @migmartri @Filip7656, thanks for the feedback! I've addressed both points:

  • Extracted the gRPC endpoint resolution into reusable helper templates (chainloop.controlplane.external_grpc_url and chainloop.cas.external_grpc_url) in _helpers.tpl, following the same pattern as the existing HTTP helpers
  • Refactored NOTES.txt to use those helpers instead of inlining the logic
  • Removed the helm-unittest introduction from this PR to keep the scope focused

@ghophp ghophp requested review from Filip7656 and migmartri March 4, 2026 09:39
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.

chart: improve installation output (notes.md)

3 participants