Skip to content

Commit c1b7f65

Browse files
authored
feat(karpor): add AI proxy parameters to Karpor's value (#104)
1 parent d8351d5 commit c1b7f65

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

charts/karpor/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
name: karpor
3-
version: 0.7.3
3+
version: 0.7.4
44
type: application
5-
appVersion: 0.6.1
5+
appVersion: 0.6.2
66
description: A modern kubernetes visualization tool (Karpor).
77
home: https://github.com/KusionStack/karpor
88
icon: https://kusionstack.io/karpor/assets/logo/logo.svg

charts/karpor/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,16 @@ The Karpor Server Component is main backend server. It itself is an `apiserver`,
7070

7171
| Key | Type | Default | Description |
7272
|-----|------|---------|-------------|
73-
| server.ai | object | `{"authToken":"","backend":"openai","baseUrl":"","model":"gpt-3.5-turbo","temperature":1,"topP":1}` | AI configuration section. The AI analysis feature requires that [authToken, baseUrl] be assigned values. |
73+
| server.ai | object | `{"authToken":"","backend":"openai","baseUrl":"","model":"gpt-3.5-turbo","proxy":{"enabled":false,"httpProxy":"","httpsProxy":"","noProxy":""},"temperature":1,"topP":1}` | AI configuration section. The AI analysis feature requires that [authToken, baseUrl] be assigned values. |
7474
| server.ai.authToken | string | `""` | Authentication token for accessing the AI service. |
7575
| server.ai.backend | string | `"openai"` | Backend service or platform that the AI model is hosted on. Available options: <br/>- `"openai"`: OpenAI API (default)<br/>- `"azureopenai"`: Azure OpenAI Service<br/>- `"huggingface"`: Hugging Face API<br/> If the backend you are using is compatible with OpenAI, then there is no need to make any changes here. |
7676
| server.ai.baseUrl | string | `""` | Base URL of the AI service. e.g., "https://api.openai.com/v1". |
7777
| server.ai.model | string | `"gpt-3.5-turbo"` | Name or identifier of the AI model to be used. e.g., "gpt-3.5-turbo". |
78+
| server.ai.proxy | object | `{"enabled":false,"httpProxy":"","httpsProxy":"","noProxy":""}` | Proxy configuration for AI service connections |
79+
| server.ai.proxy.enabled | bool | `false` | Enable proxy settings for AI service connections. When false, proxy settings will be ignored. |
80+
| server.ai.proxy.httpProxy | string | `""` | HTTP proxy URL for AI service connections (e.g., "http://proxy.example.com:8080") |
81+
| server.ai.proxy.httpsProxy | string | `""` | HTTPS proxy URL for AI service connections (e.g., "https://proxy.example.com:8080") |
82+
| server.ai.proxy.noProxy | string | `""` | No proxy configuration for AI service connections (e.g., "localhost,127.0.0.1,example.com") |
7883
| server.ai.temperature | float | `1` | Temperature parameter for the AI model. This controls the randomness of the output, where a higher value (e.g., 1.0) makes the output more random, and a lower value (e.g., 0.0) makes it more deterministic. |
7984
| server.ai.topP | float | `1` | Top-p (nucleus sampling) parameter for the AI model. This controls Controls the probability mass to consider for sampling, where a higher value leads to greater diversity in the generated content (typically ranging from 0 to 1) |
8085
| server.enableRbac | bool | `false` | Enable RBAC authorization if set to true. |

charts/karpor/templates/karpor-server.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ spec:
6565
{{- if .Values.server.ai.topP }}
6666
- --ai-top-p={{ .Values.server.ai.topP }}
6767
{{- end }}
68+
{{- if .Values.server.ai.proxy.enabled }}
69+
- --ai-proxy-enabled=true
70+
{{- if .Values.server.ai.proxy.httpProxy }}
71+
- --ai-http-proxy={{ .Values.server.ai.proxy.httpProxy }}
72+
{{- end }}
73+
{{- if .Values.server.ai.proxy.httpsProxy }}
74+
- --ai-https-proxy={{ .Values.server.ai.proxy.httpsProxy }}
75+
{{- end }}
76+
{{- if .Values.server.ai.proxy.noProxy }}
77+
- --ai-no-proxy={{ .Values.server.ai.proxy.noProxy }}
78+
{{- end }}
79+
{{- end }}
6880
{{- end }}
6981
command:
7082
- /karpor

charts/karpor/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ server:
6060
# -- Top-p (nucleus sampling) parameter for the AI model. This controls Controls the probability mass to consider for
6161
# sampling, where a higher value leads to greater diversity in the generated content (typically ranging from 0 to 1)
6262
topP: 1.0
63+
# -- Proxy configuration for AI service connections
64+
proxy:
65+
# -- Enable proxy settings for AI service connections. When false, proxy settings will be ignored.
66+
enabled: false
67+
# -- HTTP proxy URL for AI service connections (e.g., "http://proxy.example.com:8080")
68+
httpProxy: ""
69+
# -- HTTPS proxy URL for AI service connections (e.g., "https://proxy.example.com:8080")
70+
httpsProxy: ""
71+
# -- No proxy configuration for AI service connections (e.g., "localhost,127.0.0.1,example.com")
72+
noProxy: ""
6373

6474
# Configuration for Karpor syncer
6575
syncer:

0 commit comments

Comments
 (0)