Skip to content

Commit 7907d26

Browse files
committed
feat: add tls configuration in mcpserver
1 parent 89d1509 commit 7907d26

4 files changed

Lines changed: 112 additions & 105 deletions

File tree

api/v1alpha1/mcpserver_types.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,27 @@ type HTTPTransport struct {
160160

161161
// the target path where MCP is served
162162
TargetPath string `json:"path,omitempty"`
163+
164+
// TLS defines the TLS configuration for HTTPS access to the MCP server.
165+
// +optional
166+
TLS *HTTPTransportTLS `json:"tls,omitempty"`
167+
}
168+
169+
// HTTPTransportTLS defines the TLS configuration for HTTP transport.
170+
type HTTPTransportTLS struct {
171+
// SecretRef is a reference to a Kubernetes Secret containing
172+
// the client certificate (tls.crt), key (tls.key), and optionally
173+
// the CA certificate (ca.crt) for mTLS authentication.
174+
// The Secret must be in the same namespace as the MCPServer.
175+
// +optional
176+
SecretRef string `json:"secretRef,omitempty"`
177+
178+
// InsecureSkipVerify disables SSL certificate verification.
179+
// WARNING: This should ONLY be used in development/testing environments.
180+
// Production deployments MUST use proper certificates.
181+
// +optional
182+
// +kubebuilder:default=false
183+
InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
163184
}
164185

165186
// MCPServerStatus defines the observed state of MCPServer.

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 53 additions & 105 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/kagent.dev_mcpservers.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,6 +2037,25 @@ spec:
20372037
server.over HTTP
20382038
format: int32
20392039
type: integer
2040+
tls:
2041+
description: TLS defines the TLS configuration for HTTPS access
2042+
to the MCP server.
2043+
properties:
2044+
insecureSkipVerify:
2045+
default: false
2046+
description: |-
2047+
InsecureSkipVerify disables SSL certificate verification.
2048+
WARNING: This should ONLY be used in development/testing environments.
2049+
Production deployments MUST use proper certificates.
2050+
type: boolean
2051+
secretRef:
2052+
description: |-
2053+
SecretRef is a reference to a Kubernetes Secret containing
2054+
the client certificate (tls.crt), key (tls.key), and optionally
2055+
the CA certificate (ca.crt) for mTLS authentication.
2056+
The Secret must be in the same namespace as the MCPServer.
2057+
type: string
2058+
type: object
20402059
type: object
20412060
stdioTransport:
20422061
description: StdioTransport defines the configuration for a standard

helm/kmcp-crds/templates/mcpserver-crd.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,6 +1990,25 @@ spec:
19901990
server.over HTTP
19911991
format: int32
19921992
type: integer
1993+
tls:
1994+
description: TLS defines the TLS configuration for HTTPS access
1995+
to the MCP server.
1996+
properties:
1997+
insecureSkipVerify:
1998+
default: false
1999+
description: |-
2000+
InsecureSkipVerify disables SSL certificate verification.
2001+
WARNING: This should ONLY be used in development/testing environments.
2002+
Production deployments MUST use proper certificates.
2003+
type: boolean
2004+
secretRef:
2005+
description: |-
2006+
SecretRef is a reference to a Kubernetes Secret containing
2007+
the client certificate (tls.crt), key (tls.key), and optionally
2008+
the CA certificate (ca.crt) for mTLS authentication.
2009+
The Secret must be in the same namespace as the MCPServer.
2010+
type: string
2011+
type: object
19932012
type: object
19942013
stdioTransport:
19952014
description: StdioTransport defines the configuration for a standard

0 commit comments

Comments
 (0)