From c2c89d8f241fcdcd3b05454126b02daeac387694 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 11 一月 2024 14:13:29 +0800 Subject: [PATCH] env完善 --- src/k8s/create_wms.go | 35 ++--------------------------------- 1 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/k8s/create_wms.go b/src/k8s/create_wms.go index 710acf5..14abb26 100644 --- a/src/k8s/create_wms.go +++ b/src/k8s/create_wms.go @@ -47,17 +47,8 @@ func (c *WmsCreate) CreateEnv(config Config, pairs map[string]string) []apiv1.EnvVar { envs := []apiv1.EnvVar{ { - Name: "GRPC_PORT", - Value: fmt.Sprint(config.RpcPort), - }, - { - Name: "DB_HOST", - ValueFrom: &apiv1.EnvVarSource{ - FieldRef: &apiv1.ObjectFieldSelector{ - APIVersion: "v1", - FieldPath: "status.hostIP", - }, - }, + Name: "DB_HOST", + Value: config.DBHost, }, { Name: "DB_NAME", @@ -77,28 +68,6 @@ }, } - if config.ALHost != "" { - envs = append(envs, apiv1.EnvVar{ - Name: "AL_HOST", - Value: config.ALHost, - }) - } - - if config.NodeID != "" { - envs = append(envs, apiv1.EnvVar{ - Name: "NODE_ID", - Value: config.NodeID, - }) - } - - if len(pairs) > 0 { - for name, value := range pairs { - envs = append(envs, apiv1.EnvVar{ - Name: name, - Value: value, - }) - } - } for name, value := range pairs { envs = append(envs, apiv1.EnvVar{ Name: name, -- Gitblit v1.8.0