feat(k8s): M7 容器信息Tab — 完整容器编辑器(工作容器+初始化容器)
- 新增 DeploymentEditContainers.tsx (~700行): Kuboard 风格容器编辑器
- 工作容器 + 初始化容器分组管理(增/删/复制)
- 完整字段编辑: 镜像/拉取策略/命令/参数/工作目录
- 环境变量/端口(TCP/UDP/SCTP)/资源requests-limits
- 健康检查: liveness/readiness/startup三种探针
httpGet/tcpSocket/exec 三种检测方式可切换
- 生命周期回调: postStart/preStop (exec/httpGet/tcpSocket)
- 安全上下文: runAsUser/runAsGroup/privileged/capabilities等
- 卷挂载: name/mountPath/subPath/readOnly
- Pod级镜像拉取凭证(imagePullSecrets)编辑
- DeploymentWorkload.tsx: 容器Tab从旧DeploymentEdit替换为DeploymentEditContainers
- 纯前端工程, 后端GetYAML/UpdateYAML已完善
- 验证: tsc零错误 + vite build成功 + SPA路由200 + YAML PUT保存200
Closes M7
This commit is contained in:
1 parent
68a954c1c5
commit
a8b4af4409
5 files changed
+1078
-11
No files matched your search
@@ -24,7 +24,7 @@ import { useToast } from '@/hooks/use-toast';
|
||||
import { useUserStore } from '@/store';
|
||||
import { YamlViewer } from './YamlViewer';
|
||||
import { DeploymentView } from './DeploymentView';
|
||||
import { DeploymentEdit } from './DeploymentEdit';
|
||||
import { DeploymentEditContainers } from './DeploymentEditContainers';
|
||||
import { DeploymentEditBasic } from './DeploymentEditBasic';
|
||||
|
||||
type WorkloadMode = 'view' | 'edit' | 'yaml';
|
||||
@@ -549,7 +549,7 @@ function EditModeContainer({ clusterCode, namespace, deploymentName, manifest, o
|
||||
|
||||
const tabs: Array<{ key: EditTab; label: string; icon: typeof Settings; available: boolean; badge?: string }> = [
|
||||
{ key: 'basic', label: '基本信息', icon: Settings, available: true },
|
||||
{ key: 'containers', label: '容器信息', icon: Container, available: true, badge: 'M7' },
|
||||
{ key: 'containers', label: '容器信息', icon: Container, available: true },
|
||||
{ key: 'storage', label: '存储挂载', icon: Container, available: false, badge: 'M8' },
|
||||
{ key: 'advanced', label: '高级设置', icon: Settings, available: false, badge: 'M8' },
|
||||
{ key: 'service', label: '服务/应用路由', icon: Network, available: false, badge: 'M9' },
|
||||
@@ -598,8 +598,8 @@ function EditModeContainer({ clusterCode, namespace, deploymentName, manifest, o
|
||||
onCancel={onCancel}
|
||||
/>
|
||||
) : activeTab === 'containers' ? (
|
||||
/* M7 预留:容器编辑 — 暂用旧 DeploymentEdit */
|
||||
<DeploymentEdit
|
||||
/* M7: 完整容器编辑器 — 工作容器 + 初始化容器 */
|
||||
<DeploymentEditContainers
|
||||
clusterCode={clusterCode}
|
||||
namespace={namespace}
|
||||
deploymentName={deploymentName}
|
||||
|
||||
Reference in new issue
Block a user