From 4cf8fac4439b59da2e4ddc38e2a1e44900178e33 Mon Sep 17 00:00:00 2001 From: syf2211 Date: Fri, 26 Jun 2026 16:03:10 +0000 Subject: [PATCH 1/2] docs(operator-chart): add post-install NOTES.txt guidance Add Helm post-install notes for the operator chart with copy-pasteable commands to verify the deployment, inspect logs, apply a minimal MCPServer, and links to operator documentation. Includes helm-unittest coverage for the rendered NOTES content. Fixes #4615 --- deploy/charts/operator/templates/NOTES.txt | 77 ++++++++++++++++++++ deploy/charts/operator/tests/notes_test.yaml | 34 +++++++++ 2 files changed, 111 insertions(+) create mode 100644 deploy/charts/operator/templates/NOTES.txt create mode 100644 deploy/charts/operator/tests/notes_test.yaml diff --git a/deploy/charts/operator/templates/NOTES.txt b/deploy/charts/operator/templates/NOTES.txt new file mode 100644 index 0000000000..8de913ddc5 --- /dev/null +++ b/deploy/charts/operator/templates/NOTES.txt @@ -0,0 +1,77 @@ +Thank you for installing {{ .Chart.Name }}! + +Release: {{ .Release.Name }} +Namespace: {{ .Release.Namespace }} +Chart version: {{ .Chart.Version }} +Operator version: {{ .Chart.AppVersion }} + +The ToolHive Operator is being deployed. It watches ToolHive custom resources +and reconciles MCP server workloads in your cluster. + +1. Verify the operator pod is running + + kubectl get pods -n {{ .Release.Namespace }} \ + -l app.kubernetes.io/name={{ include "toolhive-operator.name" . }},app.kubernetes.io/instance={{ .Release.Name }} + + Wait for the manager container to become Ready: + + kubectl rollout status deployment/{{ include "toolhive-operator.fullname" . }} -n {{ .Release.Namespace }} + +2. Check operator logs + + kubectl logs -n {{ .Release.Namespace }} \ + -l app.kubernetes.io/name={{ include "toolhive-operator.name" . }},app.kubernetes.io/instance={{ .Release.Name }} \ + -c manager --tail=50 + +3. Create your first MCPServer + + Save the manifest below, then apply it: + + kubectl apply -f mcpserver-fetch.yaml + + --- mcpserver-fetch.yaml --- + apiVersion: toolhive.stacklok.dev/v1beta1 + kind: MCPServer + metadata: + name: fetch + namespace: {{ .Release.Namespace }} + spec: + image: ghcr.io/stackloklabs/gofetch/server + transport: streamable-http + proxyPort: 8080 + mcpPort: 8080 + resources: + requests: + cpu: "50m" + memory: "64Mi" + limits: + cpu: "100m" + memory: "128Mi" + --- end --- + + Confirm the workload was reconciled: + + kubectl get mcpserver fetch -n {{ .Release.Namespace }} + kubectl get pods -n {{ .Release.Namespace }} -l app.kubernetes.io/name=mcpserver,app.kubernetes.io/instance=fetch + +4. Learn more + + Operator guide: + https://github.com/stacklok/toolhive/blob/main/docs/kind/deploying-mcp-server-with-operator.md + + Example manifests: + https://github.com/stacklok/toolhive/tree/main/examples/operator + + Documentation: + https://docs.stacklok.com/toolhive/ + +{{- if eq .Values.operator.rbac.scope "namespace" }} + +Note: RBAC scope is set to "namespace". The operator only manages resources in: +{{- range .Values.operator.rbac.allowedNamespaces }} + - {{ . }} +{{- end }} +{{- if not .Values.operator.rbac.allowedNamespaces }} + (no namespaces configured — set operator.rbac.allowedNamespaces) +{{- end }} +{{- end }} diff --git a/deploy/charts/operator/tests/notes_test.yaml b/deploy/charts/operator/tests/notes_test.yaml new file mode 100644 index 0000000000..de09c3a85d --- /dev/null +++ b/deploy/charts/operator/tests/notes_test.yaml @@ -0,0 +1,34 @@ +suite: post-install notes +# NOTES.txt is the only user-facing output after `helm install`. Pin the +# actionable commands and key guidance so template refactors don't silently +# drop the post-install walkthrough. +release: + name: toolhive-operator + namespace: toolhive-system +templates: + - NOTES.txt +tests: + - it: renders release and namespace context + asserts: + - matchRegexRaw: + pattern: 'Release: toolhive-operator' + - matchRegexRaw: + pattern: 'Namespace: toolhive-system' + + - it: includes verification and troubleshooting commands + asserts: + - matchRegexRaw: + pattern: 'kubectl get pods -n toolhive-system' + - matchRegexRaw: + pattern: 'kubectl rollout status deployment/toolhive-operator' + - matchRegexRaw: + pattern: 'kubectl logs -n toolhive-system' + + - it: includes a minimal MCPServer example and documentation links + asserts: + - matchRegexRaw: + pattern: 'kind: MCPServer' + - matchRegexRaw: + pattern: 'deploying-mcp-server-with-operator\.md' + - matchRegexRaw: + pattern: 'docs\.stacklok\.com/toolhive/' From 9e0e215bc029cc6a3f3cc77d23c5f571fc3636fa Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 26 Jun 2026 16:34:56 +0000 Subject: [PATCH 2/2] docs(operator-chart): trim NOTES.txt to docs-only guidance Per maintainer feedback, remove kubectl verification commands and the MCPServer example snippet that can go stale quickly. Keep release context and documentation links. --- deploy/charts/operator/templates/NOTES.txt | 48 +------------------- deploy/charts/operator/tests/notes_test.yaml | 17 ++----- 2 files changed, 4 insertions(+), 61 deletions(-) diff --git a/deploy/charts/operator/templates/NOTES.txt b/deploy/charts/operator/templates/NOTES.txt index 8de913ddc5..d4d35e8c50 100644 --- a/deploy/charts/operator/templates/NOTES.txt +++ b/deploy/charts/operator/templates/NOTES.txt @@ -8,53 +8,7 @@ Operator version: {{ .Chart.AppVersion }} The ToolHive Operator is being deployed. It watches ToolHive custom resources and reconciles MCP server workloads in your cluster. -1. Verify the operator pod is running - - kubectl get pods -n {{ .Release.Namespace }} \ - -l app.kubernetes.io/name={{ include "toolhive-operator.name" . }},app.kubernetes.io/instance={{ .Release.Name }} - - Wait for the manager container to become Ready: - - kubectl rollout status deployment/{{ include "toolhive-operator.fullname" . }} -n {{ .Release.Namespace }} - -2. Check operator logs - - kubectl logs -n {{ .Release.Namespace }} \ - -l app.kubernetes.io/name={{ include "toolhive-operator.name" . }},app.kubernetes.io/instance={{ .Release.Name }} \ - -c manager --tail=50 - -3. Create your first MCPServer - - Save the manifest below, then apply it: - - kubectl apply -f mcpserver-fetch.yaml - - --- mcpserver-fetch.yaml --- - apiVersion: toolhive.stacklok.dev/v1beta1 - kind: MCPServer - metadata: - name: fetch - namespace: {{ .Release.Namespace }} - spec: - image: ghcr.io/stackloklabs/gofetch/server - transport: streamable-http - proxyPort: 8080 - mcpPort: 8080 - resources: - requests: - cpu: "50m" - memory: "64Mi" - limits: - cpu: "100m" - memory: "128Mi" - --- end --- - - Confirm the workload was reconciled: - - kubectl get mcpserver fetch -n {{ .Release.Namespace }} - kubectl get pods -n {{ .Release.Namespace }} -l app.kubernetes.io/name=mcpserver,app.kubernetes.io/instance=fetch - -4. Learn more +Learn more Operator guide: https://github.com/stacklok/toolhive/blob/main/docs/kind/deploying-mcp-server-with-operator.md diff --git a/deploy/charts/operator/tests/notes_test.yaml b/deploy/charts/operator/tests/notes_test.yaml index de09c3a85d..35cfaf611e 100644 --- a/deploy/charts/operator/tests/notes_test.yaml +++ b/deploy/charts/operator/tests/notes_test.yaml @@ -1,7 +1,7 @@ suite: post-install notes # NOTES.txt is the only user-facing output after `helm install`. Pin the -# actionable commands and key guidance so template refactors don't silently -# drop the post-install walkthrough. +# release context and documentation links so template refactors don't silently +# drop post-install guidance. release: name: toolhive-operator namespace: toolhive-system @@ -15,19 +15,8 @@ tests: - matchRegexRaw: pattern: 'Namespace: toolhive-system' - - it: includes verification and troubleshooting commands + - it: includes documentation links asserts: - - matchRegexRaw: - pattern: 'kubectl get pods -n toolhive-system' - - matchRegexRaw: - pattern: 'kubectl rollout status deployment/toolhive-operator' - - matchRegexRaw: - pattern: 'kubectl logs -n toolhive-system' - - - it: includes a minimal MCPServer example and documentation links - asserts: - - matchRegexRaw: - pattern: 'kind: MCPServer' - matchRegexRaw: pattern: 'deploying-mcp-server-with-operator\.md' - matchRegexRaw: