From 23844365442f11bbbf69a51e270e073e9b9cbd30 Mon Sep 17 00:00:00 2001 From: andreivince Date: Thu, 11 Jun 2026 14:12:58 -0300 Subject: [PATCH] fix: render ModelConfig TLS in Helm chart Signed-off-by: andreivince --- helm/kagent/templates/modelconfig.yaml | 4 ++++ helm/kagent/tests/modelconfig_test.yaml | 25 ++++++++++++++++++++++++- helm/kagent/values.yaml | 7 +++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/helm/kagent/templates/modelconfig.yaml b/helm/kagent/templates/modelconfig.yaml index 4c7651e512..e6dcc9a4c6 100644 --- a/helm/kagent/templates/modelconfig.yaml +++ b/helm/kagent/templates/modelconfig.yaml @@ -26,6 +26,10 @@ spec: defaultHeaders: {{- toYaml $model.defaultHeaders | nindent 4 }} {{- end }} + {{- if $model.tls }} + tls: + {{- toYaml $model.tls | nindent 4 }} + {{- end }} {{- if $model.config }} {{ $dot.Values.providers.default }}: {{- toYaml $model.config | nindent 4 }} diff --git a/helm/kagent/tests/modelconfig_test.yaml b/helm/kagent/tests/modelconfig_test.yaml index f71ec2cf2c..c85f28b55e 100644 --- a/helm/kagent/tests/modelconfig_test.yaml +++ b/helm/kagent/tests/modelconfig_test.yaml @@ -89,6 +89,29 @@ tests: path: spec.model value: "gpt-4-turbo" + - it: should render provider tls configuration + set: + providers: + openAI: + tls: + disableVerify: true + caCertSecretRef: custom-ca + caCertSecretKey: ca.crt + disableSystemCAs: true + asserts: + - equal: + path: spec.tls.disableVerify + value: true + - equal: + path: spec.tls.caCertSecretRef + value: custom-ca + - equal: + path: spec.tls.caCertSecretKey + value: ca.crt + - equal: + path: spec.tls.disableSystemCAs + value: true + - it: should have correct labels asserts: - equal: @@ -113,4 +136,4 @@ tests: asserts: - equal: path: metadata.namespace - value: custom-namespace \ No newline at end of file + value: custom-namespace diff --git a/helm/kagent/values.yaml b/helm/kagent/values.yaml index 3cc24721fd..6d29dffad5 100644 --- a/helm/kagent/values.yaml +++ b/helm/kagent/values.yaml @@ -426,6 +426,13 @@ providers: apiKeySecretRef: kagent-openai apiKeySecretKey: OPENAI_API_KEY # apiKey: "" + # Optional TLS settings for the generated ModelConfig. + # This same block can be used under any provider. + # tls: + # disableVerify: false + # caCertSecretRef: "" + # caCertSecretKey: "" + # disableSystemCAs: false ollama: provider: Ollama model: "llama3.2"