From 841ef534c1ae50138ccab31d325f66a64a8ced16 Mon Sep 17 00:00:00 2001 From: "wurongjun@duiba.com.cn" <775105396@qq.com> Date: Wed, 23 Sep 2020 16:42:06 +0800 Subject: [PATCH] neat clusterip of service --- cmd/neat.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/neat.go b/cmd/neat.go index 4e72765..ca36cf1 100644 --- a/cmd/neat.go +++ b/cmd/neat.go @@ -82,6 +82,10 @@ func Neat(in string) (string, error) { if err != nil { return draft, fmt.Errorf("error in neatStatus : %v", err) } + draft, err = neatClusterIP(draft) + if err != nil { + return draft, fmt.Errorf("error in neatClusterIP : %v", err) + } draft, err = neatEmpty(draft) if err != nil { return draft, fmt.Errorf("error in neatEmpty : %v", err) @@ -109,6 +113,10 @@ func neatStatus(in string) (string, error) { return sjson.Delete(in, "status") } +func neatClusterIP(in string) (string, error) { + return sjson.Delete(in, "spec.clusterIP") +} + func neatScheduler(in string) (string, error) { return sjson.Delete(in, "spec.nodeName") }