fix: YAML查看器按钮文案 '清理并编辑' → '编辑',统一简洁命名

This commit is contained in:
attacker committed 2026-06-23 01:23:27 +00:00
1 parent a8b4af4409
commit 4bd9fa629b
14 files changed
+2146 -400

No files matched your search

+31 -1
View File
@@ -349,7 +349,32 @@ type IngressTLS struct {
}
type IngressRule struct {
Host string `json:"host"`
Host string `json:"host"`
HTTP *IngressHTTP `json:"http,omitempty"`
}
type IngressHTTP struct {
Paths []IngressPath `json:"paths"`
}
type IngressPath struct {
Path string `json:"path"`
PathType string `json:"pathType"`
Backend IngressBackend `json:"backend"`
}
type IngressBackend struct {
Service IngressBackendService `json:"service"`
}
type IngressBackendService struct {
Name string `json:"name"`
Port IngressServicePort `json:"port"`
}
type IngressServicePort struct {
Number int `json:"number,omitempty"`
Name string `json:"name,omitempty"`
}
// ObjectMeta
@@ -1264,6 +1289,11 @@ func (c *Client) UpdateResourceYAML(apiPath string, yamlData []byte) error {
return c.putRaw(apiPath, "application/yaml", yamlData)
}
// DeleteResource deletes a K8s resource by apiPath (generic)
func (c *Client) DeleteResource(apiPath string) error {
return c.delete(apiPath)
}
// applyRaw parses YAML and applies it via create-or-update pattern
func (c *Client) applyRaw(yamlContent string) (map[string]interface{}, error) {
// Parse YAML to extract resource metadata