添加qiming-rcoder模块

This commit is contained in:
Codex
2026-06-01 13:54:52 +08:00
parent 8092c4b1f8
commit 4b1a580132
539 changed files with 151650 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# ClusterRoleBinding - 本地测试环境
# 把 base 里共享的 ClusterRole 绑定到 local namespace 的 ServiceAccount
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rcoder-pods-crb-local
subjects:
- kind: ServiceAccount
name: rcoder-pods-sa
namespace: rcoder-local
roleRef:
kind: ClusterRole
name: rcoder-pods-clusterrole
apiGroup: rbac.authorization.k8s.io

View File

@@ -0,0 +1,12 @@
# 存储层凭据 Secret - 本地测试环境
apiVersion: v1
kind: Secret
metadata:
name: rcoder-credentials
namespace: rcoder-local
type: Opaque
stringData:
POSTGRES_USER: "juicefs"
POSTGRES_PASSWORD: "juicefs_password"
MINIO_ROOT_USER: "minioadmin"
MINIO_ROOT_PASSWORD: "minioadmin"

View File

@@ -0,0 +1,91 @@
# Local overlay - OrbStack 本地测试
# 用法: kubectl apply -k k8s/manifests/overlays/local
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: rcoder-local
resources:
- ../../base
- clusterrolebinding.yaml
- credentials.yaml
- rcoder-configmap.yaml
labels:
- pairs:
environment: local
includeSelectors: false
includeTemplates: true
replicas:
- name: rcoder
count: 1
images:
- name: nuwax-docker-images-registry.cn-hangzhou.cr.aliyuncs.com/dev/rcoder
newName: rcoder-local
newTag: latest
- name: nuwax-docker-images-registry.cn-hangzhou.cr.aliyuncs.com/dev/rcoder-agent-runner
newName: rcoder-agent-runner-local
newTag: latest
patches:
# PVC 使用 local-pathOrbStack 默认 StorageClass
# local-path 只支持 ReadWriteOnce本地测试改为单节点读写
- patch: |-
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rcoder-workspace
spec:
storageClassName: local-path
accessModes:
- ReadWriteOnce
target:
kind: PersistentVolumeClaim
name: rcoder-workspace
# Deployment 环境变量适配
- patch: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: rcoder
spec:
template:
spec:
containers:
- name: rcoder
env:
- name: RCODER_K8S_NAMESPACE
value: rcoder-local
- name: RCODER_K8S_STORAGE_CLASS
value: local-path
- name: RCODER_K8S_PVC_ACCESS_MODE
value: ReadWriteOnce
- name: RUST_LOG
value: "debug"
- name: RCODER_DOCKER_IMAGE
value: "rcoder-local:latest"
- name: RCODER_DOCKER_IMAGE_COMPUTER
value: "rcoder-agent-runner-local:latest"
target:
kind: Deployment
name: rcoder
# Service 使用 NodePort本地访问
- patch: |-
apiVersion: v1
kind: Service
metadata:
name: rcoder
spec:
type: NodePort
ports:
- port: 8087
targetPort: 8087
nodePort: 30087
target:
kind: Service
name: rcoder

View File

@@ -0,0 +1,50 @@
# RCoder ConfigMap - 本地测试环境
apiVersion: v1
kind: ConfigMap
metadata:
name: rcoder-config
data:
config.yml: |
default_agent: "Claude"
projects_dir: "/app/project_workspace"
port: 8087
cleanup_config:
enabled: true
idle_timeout_seconds: 600
cleanup_interval_seconds: 300
docker_stop_timeout_seconds: 30
docker_config:
multi_image_config:
global_defaults:
registry_prefix: ""
services:
rcoder:
service_type: "RCoder"
arm64_image: "rcoder-local:latest"
amd64_image: "rcoder-local:latest"
default_image: "rcoder-local:latest"
image_tag_prefix: "rcoder"
enabled: true
computer-agent-runner:
service_type: "ComputerAgentRunner"
arm64_image: "rcoder-agent-runner-local:latest"
amd64_image: "rcoder-agent-runner-local:latest"
default_image: "rcoder-agent-runner-local:latest"
image_tag_prefix: "rcoder-agent-runner"
enabled: true
selection_strategy: "ServiceOnly"
network_base_name: "agent-network"
network_mode: "bridge"
work_dir: "/app"
auto_cleanup: true
container_ttl_seconds: 3600
api_key_auth:
enabled: false
kubernetes_config:
storage_class: "local-path"