From 3a5b8d2b82e4842619fef1e0c67314d5434c0044 Mon Sep 17 00:00:00 2001 From: kqzh <35095889+kqzh@users.noreply.github.com> Date: Mon, 18 Sep 2023 17:59:31 +0800 Subject: [PATCH] fix: port --- apis/apps/v1alpha1/nebulacluster_common.go | 2 +- apis/apps/v1alpha1/nebulacluster_graphd.go | 2 -- apis/apps/v1alpha1/nebulacluster_metad.go | 2 -- apis/apps/v1alpha1/nebulacluster_storaged.go | 6 ++++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apis/apps/v1alpha1/nebulacluster_common.go b/apis/apps/v1alpha1/nebulacluster_common.go index bded936e..624a6087 100644 --- a/apis/apps/v1alpha1/nebulacluster_common.go +++ b/apis/apps/v1alpha1/nebulacluster_common.go @@ -471,7 +471,7 @@ func generateContainers(c NebulaClusterComponent, cm *corev1.ConfigMap) []corev1 flags += " --assigned_zone=$NODE_ZONE" } if !c.IsDefaultThriftPort() { - flags += " --port=" + strconv.Itoa(int(c.GetHTTPPort())) + flags += " --port=" + strconv.Itoa(int(c.GetThriftPort())) } if !c.IsDefaultHTTPPort() { flags += " --ws_http_port=" + strconv.Itoa(int(c.GetHTTPPort())) diff --git a/apis/apps/v1alpha1/nebulacluster_graphd.go b/apis/apps/v1alpha1/nebulacluster_graphd.go index 7a3ea898..b42c9401 100644 --- a/apis/apps/v1alpha1/nebulacluster_graphd.go +++ b/apis/apps/v1alpha1/nebulacluster_graphd.go @@ -33,8 +33,6 @@ const ( defaultGraphdPortThrift = 9669 GraphdPortNameHTTP = "http" defaultGraphdPortHTTP = 19669 - GraphdPortNameHTTP2 = "http2" - defaultGraphdPortHTTP2 = 19670 defaultGraphdImage = "vesoft/nebula-graphd" ) diff --git a/apis/apps/v1alpha1/nebulacluster_metad.go b/apis/apps/v1alpha1/nebulacluster_metad.go index 54af4b18..bf8172f9 100644 --- a/apis/apps/v1alpha1/nebulacluster_metad.go +++ b/apis/apps/v1alpha1/nebulacluster_metad.go @@ -33,8 +33,6 @@ const ( defaultMetadPortThrift = 9559 MetadPortNameHTTP = "http" defaultMetadPortHTTP = 19559 - MetadPortNameHTTP2 = "http2" - defaultMetadPortHTTP2 = 19560 defaultMetadImage = "vesoft/nebula-metad" ) diff --git a/apis/apps/v1alpha1/nebulacluster_storaged.go b/apis/apps/v1alpha1/nebulacluster_storaged.go index 86ef828c..df1d175e 100644 --- a/apis/apps/v1alpha1/nebulacluster_storaged.go +++ b/apis/apps/v1alpha1/nebulacluster_storaged.go @@ -33,8 +33,6 @@ const ( defaultStoragedPortThrift = 9779 StoragedPortNameHTTP = "http" defaultStoragedPortHTTP = 19779 - StoragedPortNameHTTP2 = "http2" - defaultStoragedPortHTTP2 = 19780 StoragedPortNameAdmin = "admin" defaultStoragedPortAdmin = 9778 defaultStoragedImage = "vesoft/nebula-storaged" @@ -165,6 +163,10 @@ func (c *storagedComponent) GenerateContainerPorts() []corev1.ContainerPort { Name: StoragedPortNameHTTP, ContainerPort: c.nc.Spec.Storaged.HTTPPort, }, + { + Name: StoragedPortNameAdmin, + ContainerPort: c.nc.Spec.Storaged.Port - 1, + }, } }