Skip to content

Commit

Permalink
feat: able to configure public namespace for gpts
Browse files Browse the repository at this point in the history
Signed-off-by: bjwswang <bjwswang@gmail.com>
  • Loading branch information
bjwswang committed Mar 28, 2024
1 parent fe0a884 commit 99c14c1
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion deploy/charts/arcadia/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: arcadia
description: A Helm chart(Also a KubeBB Component) for KubeAGI Arcadia
type: application
version: 0.3.25
version: 0.3.26
appVersion: "0.2.1"

keywords:
Expand Down
8 changes: 4 additions & 4 deletions deploy/charts/arcadia/templates/agent-portal.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.agentportal.enabled }}
{{- if .Values.gpts.enabled }}
apiVersion: v1
data:
.env.production: |
Expand Down Expand Up @@ -32,7 +32,7 @@ spec:
app: {{ .Release.Name }}-agentportal
spec:
containers:
- image: {{ .Values.agentportal.image }}
- image: {{ .Values.gpts.agentportal.image }}
imagePullPolicy: IfNotPresent
name: agentportal
env:
Expand Down Expand Up @@ -116,14 +116,14 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
rules:
- host: {{ .Values.agentportal.ingress.host }}
- host: {{ .Values.gpts.agentportal.ingress.host }}
http:
paths:
- backend:
service:
name: {{ .Release.Name }}-agentportal
port:
number: 3000
path: "/{{ .Values.agentportal.ingress.path }}"
path: "/{{ .Values.gpts.agentportal.ingress.path }}"
pathType: ImplementationSpecific
{{- end }}
1 change: 1 addition & 0 deletions deploy/charts/arcadia/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ data:
database: {{ .Values.postgresql.global.postgresql.auth.database }}
# configurations for gpts
gptsConfig: |
public_namespace: {{ .Values.gpts.public_namespace }}
categories:
- id: 1
name: "通用对话"
Expand Down
18 changes: 10 additions & 8 deletions deploy/charts/arcadia/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,17 @@ opsconsole:
ingress:
path: kubeagi-portal-public
host: portal.<replaced-ingress-nginx-ip>.nip.io
# @section portal for arcadia GPT store
agentportal:

# @section configurations for GPT Store
gpts:
enabled: true
kubebbEnabled: true
image: kubeagi/agent-portal:latest
ingress:
path: ""
host: gpts.<replaced-ingress-nginx-ip>.nip.io
# all gpt resources are public in this namespace
public_namespace: gpts
agentportal:
image: kubeagi/agent-portal:latest
ingress:
path: ""
host: gpts.<replaced-ingress-nginx-ip>.nip.io

# @section fastchat is used as fastchat configurations for arcadia
fastchat:
Expand Down
4 changes: 3 additions & 1 deletion pkg/config/gpts_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ var (

// GPTsConfig is the configurations for GPT Store
type GPTsConfig struct {
Categories []Category `json:"categories,omitempty"`
// PublicNamespace is the namespace which all gpt-releated resources are public
PublicNamespace string `json:"public_namespace,omitempty"`
Categories []Category `json:"categories,omitempty"`
}

// Category in gpt store
Expand Down

0 comments on commit 99c14c1

Please sign in to comment.