Skip to content

feat(charts): add Helm chart for StreamNative MCP Server#67

Merged
freeznet merged 14 commits intomainfrom
freeznet/helm-charts
Jan 14, 2026
Merged

feat(charts): add Helm chart for StreamNative MCP Server#67
freeznet merged 14 commits intomainfrom
freeznet/helm-charts

Conversation

@freeznet
Copy link
Member

@freeznet freeznet commented Jan 8, 2026

No description provided.

@freeznet freeznet self-assigned this Jan 8, 2026
@freeznet freeznet requested a review from a team as a code owner January 8, 2026 04:06
@freeznet freeznet requested a review from Copilot January 8, 2026 04:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 (/healthz and /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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

freeznet and others added 4 commits January 12, 2026 22:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
periodSeconds: 10
periodSeconds: 5

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +24
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 }}
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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 }}

Copilot uses AI. Check for mistakes.
Comment on lines +89 to +96
livenessProbe:
httpGet:
path: {{ trimSuffix "/" .Values.server.httpPath }}/healthz
port: http
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
snmcp-e2e-test-secret-key-32-bytes-long
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
snmcp-e2e-test-secret-key-32-bytes-long
snmcp-e2e-test-secret-key-39-bytes-long

Copilot uses AI. Check for mistakes.
@freeznet freeznet merged commit 4dc4577 into main Jan 14, 2026
17 checks passed
freeznet added a commit that referenced this pull request Jan 19, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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