feat(charts): add Helm chart for StreamNative MCP Server#67
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive Helm chart for deploying the StreamNative MCP Server on Kubernetes in Multi-Session Pulsar mode, along with refactoring the SSE server code to support health endpoints and updating the golangci-lint configuration.
Key changes:
- Refactored SSE server to support health and readiness endpoints (
/healthzand/readyz) - Unified HTTP server lifecycle management for both single and multi-session modes
- Added complete Helm chart with configurable deployment, service, ingress, and security settings
- Updated golangci-lint to v2.7.2 with new configuration format
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/schema/common.go | Updated comment translation from Chinese to English |
| pkg/cmd/mcp/sse.go | Major refactoring: added health endpoints, unified HTTP server management, simplified authentication middleware |
| charts/snmcp/Chart.yaml | Helm chart metadata for StreamNative MCP Server v0.1.0 |
| charts/snmcp/values.yaml | Comprehensive values configuration with Pulsar, TLS, session, and Kubernetes resource settings |
| charts/snmcp/templates/deployment.yaml | Kubernetes deployment with multi-session Pulsar mode, health probes, and security contexts |
| charts/snmcp/templates/configmap.yaml | ConfigMap for environment variable configuration |
| charts/snmcp/templates/service.yaml | Kubernetes service definition |
| charts/snmcp/templates/ingress.yaml | Optional ingress configuration |
| charts/snmcp/templates/serviceaccount.yaml | Service account template |
| charts/snmcp/templates/_helpers.tpl | Helm template helper functions |
| charts/snmcp/templates/NOTES.txt | Post-installation instructions |
| charts/snmcp/README.md | Comprehensive chart documentation with examples |
| CLAUDE.md | Updated architecture documentation with builder registry pattern and feature flags |
| AGENTS.md | Added reference to CLAUDE.md |
| .golangci.yml | Migrated to golangci-lint v2 configuration format |
| .github/workflows/lint.yaml | Updated golangci-lint version to 2.7.2 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This reverts commit ebef862.
…r into freeznet/helm-charts # Conflicts: # pkg/cmd/mcp/sse.go
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 23 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 23 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| path: {{ trimSuffix "/" .Values.server.httpPath }}/readyz | ||
| port: http | ||
| initialDelaySeconds: 5 | ||
| periodSeconds: 10 |
There was a problem hiding this comment.
The readiness probe has a timeout of 3 seconds and failure threshold of 3, meaning the pod will be marked not ready after 3 consecutive failures. However, the periodSeconds is 10, so it would take 30 seconds to detect if the service becomes unhealthy. For SSE connections and MCP server operations, consider if this delay is acceptable or if a shorter period (e.g., 5s) would provide faster detection of service issues.
| periodSeconds: 10 | |
| periodSeconds: 5 |
| SNMCP_CONFIG_DIR: {{ .Values.server.configDir | quote }} | ||
| SNMCP_READ_ONLY: {{ .Values.server.readOnly | quote }} | ||
| {{- if .Values.server.features }} | ||
| SNMCP_FEATURES: {{ .Values.server.features | join "," | quote }} | ||
| {{- end }} | ||
| {{- if .Values.pulsar.tls.enabled }} |
There was a problem hiding this comment.
The ConfigMap defines SNMCP_CONFIG_DIR and SNMCP_READ_ONLY environment variables, but these don't appear to be used by the application. The deployment.yaml passes --read-only as a command-line flag (line 56) when readOnly is true, and server.configDir is not passed as a command-line argument at all. These unused environment variables could be removed from the ConfigMap, or if they're intended to be used, the deployment should reference them.
| SNMCP_CONFIG_DIR: {{ .Values.server.configDir | quote }} | |
| SNMCP_READ_ONLY: {{ .Values.server.readOnly | quote }} | |
| {{- if .Values.server.features }} | |
| SNMCP_FEATURES: {{ .Values.server.features | join "," | quote }} | |
| {{- end }} | |
| {{- if .Values.pulsar.tls.enabled }} | |
| {{- if .Values.server.features }} | |
| SNMCP_FEATURES: {{ .Values.server.features | join "," | quote }} | |
| {{- end }} | |
| {{- if .Values.pulsar.tls.enabled }} | |
| {{- if .Values.pulsar.tls.enabled }} |
| livenessProbe: | ||
| httpGet: | ||
| path: {{ trimSuffix "/" .Values.server.httpPath }}/healthz | ||
| port: http | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 30 | ||
| timeoutSeconds: 5 | ||
| failureThreshold: 3 |
There was a problem hiding this comment.
Consider adding a startupProbe in addition to the liveness and readiness probes. This would prevent the liveness probe from killing the container during slow startup scenarios (e.g., when connecting to an external Pulsar cluster with network delays). A startup probe with a longer failureThreshold would give the application more time to initialize while still allowing fast health checks once running.
| @@ -0,0 +1 @@ | |||
| snmcp-e2e-test-secret-key-32-bytes-long | |||
There was a problem hiding this comment.
The secret key "snmcp-e2e-test-secret-key-32-bytes-long" is exactly 39 bytes (characters), not 32 bytes as the name suggests. This is potentially misleading. Consider using a key that's actually 32 bytes or updating the name to match the actual length, or documenting why the length differs from the name.
| snmcp-e2e-test-secret-key-32-bytes-long | |
| snmcp-e2e-test-secret-key-39-bytes-long |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.