Skip to content

Commit 0a0306d

Browse files
author
Collin Walker
committed
fixes
1 parent 3134db4 commit 0a0306d

File tree

30 files changed

+487
-2488
lines changed

30 files changed

+487
-2488
lines changed

docs/troubleshooting/ssl-errors.md

Lines changed: 0 additions & 595 deletions
This file was deleted.

docs/user-guide/modelconfig-tls.md

Lines changed: 0 additions & 482 deletions
This file was deleted.

docs/user-guide/tls-rbac.md

Lines changed: 0 additions & 676 deletions
This file was deleted.

examples/modelconfig-with-tls.yaml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ stringData:
4747
key: sk-litellm-1234567890abcdef # Replace with your actual API key
4848

4949
---
50-
apiVersion: kagent.dev/v1alpha1
50+
apiVersion: kagent.dev/v1alpha2
5151
kind: ModelConfig
5252
metadata:
5353
name: litellm-internal
@@ -71,12 +71,13 @@ spec:
7171
caCertSecretRef: litellm-ca-cert
7272
caCertSecretKey: ca.crt
7373

74-
# Trust both system CAs and custom CA (recommended)
74+
# Trust both system CAs and custom CA (recommended, default behavior)
75+
# When false (default), system CAs are used for verification (safe behavior)
7576
# This allows connecting to both public services and internal services
76-
useSystemCAs: true
77+
disableSystemCAs: false
7778

7879
# Verification is enabled (secure)
79-
verifyDisabled: false
80+
disableVerify: false
8081

8182
---
8283
# Example 2: Multiple CA Certificates (Certificate Bundle)
@@ -106,7 +107,7 @@ stringData:
106107
-----END CERTIFICATE-----
107108
108109
---
109-
apiVersion: kagent.dev/v1alpha1
110+
apiVersion: kagent.dev/v1alpha2
110111
kind: ModelConfig
111112
metadata:
112113
name: corporate-llm
@@ -121,8 +122,8 @@ spec:
121122
tls:
122123
caCertSecretRef: corporate-ca-bundle
123124
caCertSecretKey: ca-bundle.crt # Reference the bundle key
124-
useSystemCAs: true
125-
verifyDisabled: false
125+
disableSystemCAs: false # Use system CAs (default, safe behavior)
126+
disableVerify: false
126127

127128
---
128129
# Example 3: Custom CA Only (No System CAs)
@@ -144,7 +145,7 @@ stringData:
144145
-----END CERTIFICATE-----
145146
146147
---
147-
apiVersion: kagent.dev/v1alpha1
148+
apiVersion: kagent.dev/v1alpha2
148149
kind: ModelConfig
149150
metadata:
150151
name: strict-internal-llm
@@ -161,10 +162,11 @@ spec:
161162
caCertSecretKey: ca.crt
162163

163164
# Only trust custom CA, not system CAs
165+
# When true, system CAs are disabled (only custom CA is trusted)
164166
# This prevents connections to public services
165-
useSystemCAs: false
167+
disableSystemCAs: true
166168

167-
verifyDisabled: false
169+
disableVerify: false
168170

169171
---
170172
# Example 4: Verification Disabled (Development/Testing Only)
@@ -175,7 +177,7 @@ spec:
175177
# Use Case: Local development where you want to quickly test without
176178
# managing certificates, or testing against a server with invalid certificates.
177179

178-
apiVersion: kagent.dev/v1alpha1
180+
apiVersion: kagent.dev/v1alpha2
179181
kind: ModelConfig
180182
metadata:
181183
name: litellm-dev
@@ -189,9 +191,9 @@ spec:
189191
baseUrl: https://localhost:8080
190192
tls:
191193
# Disable all SSL verification (insecure!)
192-
verifyDisabled: true
194+
disableVerify: true
193195

194-
# When verifyDisabled is true, other TLS fields are ignored
196+
# When disableVerify is true, other TLS fields are ignored
195197
# No Secret is required in this mode
196198

197199
# When this configuration is used, agents will log prominent warnings:
@@ -232,7 +234,7 @@ stringData:
232234
key: your-azure-api-key-here
233235

234236
---
235-
apiVersion: kagent.dev/v1alpha1
237+
apiVersion: kagent.dev/v1alpha2
236238
kind: ModelConfig
237239
metadata:
238240
name: azure-through-proxy
@@ -249,8 +251,8 @@ spec:
249251
tls:
250252
caCertSecretRef: azure-proxy-ca
251253
caCertSecretKey: ca.crt
252-
useSystemCAs: true
253-
verifyDisabled: false
254+
disableSystemCAs: false # Use system CAs (default, safe behavior)
255+
disableVerify: false
254256

255257
---
256258
# Example 6: Default Configuration (No TLS)
@@ -268,7 +270,7 @@ stringData:
268270
key: sk-openai-1234567890abcdef
269271

270272
---
271-
apiVersion: kagent.dev/v1alpha1
273+
apiVersion: kagent.dev/v1alpha2
272274
kind: ModelConfig
273275
metadata:
274276
name: openai-public
@@ -289,7 +291,7 @@ spec:
289291
# Complete example showing how to create an Agent that uses a ModelConfig
290292
# with TLS configuration.
291293

292-
apiVersion: kagent.dev/v1alpha1
294+
apiVersion: kagent.dev/v1alpha2
293295
kind: Agent
294296
metadata:
295297
name: internal-assistant
@@ -365,7 +367,7 @@ roleRef:
365367
# - Never commit Secrets to Git (use sealed secrets or external secret management)
366368
#
367369
# 3. Security:
368-
# - Always enable verification (verifyDisabled: false) in production
370+
# - Always enable verification (disableVerify: false) in production
369371
# - Use RBAC to limit Secret access to specific service accounts
370372
# - Use namespace isolation for different environments
371373
# - Monitor certificate expiry dates

go/api/v1alpha1/modelconfig_types.go

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -202,41 +202,6 @@ type OllamaConfig struct {
202202

203203
type GeminiConfig struct{}
204204

205-
// TLSConfig contains TLS/SSL configuration options for model provider connections.
206-
// This enables agents to connect to internal LiteLLM gateways or other providers
207-
// that use self-signed certificates or custom certificate authorities.
208-
type TLSConfig struct {
209-
// VerifyDisabled disables SSL certificate verification entirely.
210-
// WARNING: This should ONLY be used in development/testing environments.
211-
// Production deployments MUST use proper certificates.
212-
// +optional
213-
// +kubebuilder:default=false
214-
VerifyDisabled bool `json:"verifyDisabled,omitempty"`
215-
216-
// CACertSecretRef is a reference to a Kubernetes Secret containing
217-
// CA certificate(s) in PEM format. The Secret must be in the same
218-
// namespace as the ModelConfig.
219-
// When set, the certificate will be used to verify the provider's SSL certificate.
220-
// This field follows the same pattern as APIKeySecretRef.
221-
// +optional
222-
CACertSecretRef string `json:"caCertSecretRef,omitempty"`
223-
224-
// CACertSecretKey is the key within the Secret that contains the CA certificate data.
225-
// This field follows the same pattern as APIKeySecretKey.
226-
// Required when CACertSecretRef is set.
227-
// +optional
228-
// +kubebuilder:default="ca.crt"
229-
CACertSecretKey string `json:"caCertSecretKey,omitempty"`
230-
231-
// UseSystemCAs determines whether to use system CA certificates in addition
232-
// to custom CA certificates. When true, both system and custom CAs are trusted (additive).
233-
// When false, only the custom CA from CACertSecretRef is trusted.
234-
// This allows connecting to both public and internal services with a single configuration.
235-
// +optional
236-
// +kubebuilder:default=true
237-
UseSystemCAs bool `json:"useSystemCAs,omitempty"`
238-
}
239-
240205
// ModelConfigSpec defines the desired state of ModelConfig.
241206
//
242207
// +kubebuilder:validation:XValidation:message="provider.openAI must be nil if the provider is not OpenAI",rule="!(has(self.openAI) && self.provider != 'OpenAI')"
@@ -246,8 +211,6 @@ type TLSConfig struct {
246211
// +kubebuilder:validation:XValidation:message="provider.gemini must be nil if the provider is not Gemini",rule="!(has(self.gemini) && self.provider != 'Gemini')"
247212
// +kubebuilder:validation:XValidation:message="provider.geminiVertexAI must be nil if the provider is not GeminiVertexAI",rule="!(has(self.geminiVertexAI) && self.provider != 'GeminiVertexAI')"
248213
// +kubebuilder:validation:XValidation:message="provider.anthropicVertexAI must be nil if the provider is not AnthropicVertexAI",rule="!(has(self.anthropicVertexAI) && self.provider != 'AnthropicVertexAI')"
249-
// +kubebuilder:validation:XValidation:message="caCertSecretKey requires caCertSecretRef",rule="!(has(self.tls) && has(self.tls.caCertSecretKey) && self.tls.caCertSecretKey != '' && (!has(self.tls.caCertSecretRef) || self.tls.caCertSecretRef == ''))"
250-
// +kubebuilder:validation:XValidation:message="caCertSecretRef requires caCertSecretKey",rule="!(has(self.tls) && has(self.tls.caCertSecretRef) && self.tls.caCertSecretRef != '' && (!has(self.tls.caCertSecretKey) || self.tls.caCertSecretKey == ''))"
251214
type ModelConfigSpec struct {
252215
Model string `json:"model"`
253216

@@ -299,12 +262,6 @@ type ModelConfigSpec struct {
299262
// Anthropic-specific configuration
300263
// +optional
301264
AnthropicVertexAI *AnthropicVertexAIConfig `json:"anthropicVertexAI,omitempty"`
302-
303-
// TLS configuration for provider connections.
304-
// Enables agents to connect to internal LiteLLM gateways or other providers
305-
// that use self-signed certificates or custom certificate authorities.
306-
// +optional
307-
TLS *TLSConfig `json:"tls,omitempty"`
308265
}
309266

310267
// Model Configurations

0 commit comments

Comments
 (0)