feat(k8s): M8+M9 存储挂载/高级设置/服务路由 Tab — Deployment 可视化编辑器 5 Tab 全部完成

M8 存储挂载 Tab (DeploymentEditStorage.tsx, 437行):
- 6种数据卷类型: EmptyDir/HostPath/ConfigMap/Secret/PVC/NFS
- 每种类型独立字段编辑 + volumeMounts 只读汇总
M8 高级设置 Tab (DeploymentEditAdvanced.tsx, 632行):
- 更新策略(RollingUpdate/Recreate) + revisionHistoryLimit/progressDeadlineSeconds
- 调度: nodeSelector + tolerations(key/operator/value/effect/tolerationSeconds)
- DNS: dnsPolicy + dnsConfig(nameservers/searches/options)
- 主机设置: hostNetwork/hostIPC/hostPID/shareProcessNamespace + hostAliases
- Pod 安全上下文: runAsUser/runAsGroup/fsGroup/runAsNonRoot
M9 服务路由 Tab (DeploymentEditService.tsx):
- selector 双路径关联 Service(spec.selector.matchLabels || selector)
- Service/Ingress 创建/删除集成

EditModeContainer 5 Tab 全部 available:
basic / containers / storage / advanced / service

验证: go build OK + tsc --noEmit OK + vite build OK + SPA edit路由200 + YAML API有效
This commit is contained in:
attacker committed 2026-06-23 13:40:13 +08:00
1 parent 60934277ac
commit 28dfc519e1
10 files changed
+691 -665

No files matched your search

@@ -37,13 +37,11 @@ import { useToast } from '@/hooks/use-toast';
*
* @author Logan <admin@attacker.club>
*/
interface PodExecTerminalProps {
export interface PodExecTerminalProps {
open: boolean;
onOpenChange: (open: boolean) => void;
/** 集群 ID(用于 ws 路由 :clusterId) */
clusterId: number | string;
/** 集群 code(备用,部分后端用 code) */
clusterCode?: string;
namespace: string;
podName: string;
/** 可选:Pod 容器名列表,缺省时仅显示 shell 选择 */
@@ -57,7 +55,6 @@ type ConnState = 'idle' | 'connecting' | 'connected' | 'error' | 'closed';
const SHELLS = [
{ value: 'bash', label: '/bin/bash' },
{ value: 'sh', label: '/bin/sh' },
{ value: 'sh', label: '/bin/ash' },
];
export function PodExecTerminal({
@@ -302,14 +299,15 @@ export function PodExecTerminal({
</Select>
)}
{/* Shell 选择 */}
{/* Shell 选择 — bash/sh 可选,默认 bash */}
<Select value={shell} onValueChange={setShell}>
<SelectTrigger className="h-8 w-[100px] text-xs bg-[var(--dg-bg-hover)] border-[var(--dg-border)]">
<SelectTrigger className="h-8 w-[110px] text-xs bg-[var(--dg-bg-hover)] border-[var(--dg-border)]">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="bash">/bin/bash</SelectItem>
<SelectItem value="sh">/bin/sh</SelectItem>
{SHELLS.map(s => (
<SelectItem key={s.value} value={s.value}>{s.label}</SelectItem>
))}
</SelectContent>
</Select>