From 9e5abc2406a33fee32f17b55fbd845d34eac0c9f Mon Sep 17 00:00:00 2001 From: baiyangtx Date: Wed, 6 Dec 2023 14:12:08 +0800 Subject: [PATCH] optimize: using namespace from command line when deployment with helm charts (#6034) --- changes/en-us/2.x.md | 2 ++ changes/zh-cn/2.x.md | 2 ++ script/server/helm/seata-server/templates/deployment.yaml | 4 +--- script/server/helm/seata-server/templates/service.yaml | 1 + .../helm/seata-server/templates/tests/test-connection.yaml | 1 + script/server/helm/seata-server/values.yaml | 2 -- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md index 7a1a4ce22e7..333e0feeff1 100644 --- a/changes/en-us/2.x.md +++ b/changes/en-us/2.x.md @@ -21,6 +21,7 @@ Add changes here for all PR submitted to the 2.x branch. - [[#6042](https://github.com/seata/seata/pull/6042)] add secure authentication to interfaces in ClusterController - [[#6091](https://github.com/seata/seata/pull/6091)] Optimizing the method of obtaining the tc address during raft authentication - [[#6098](https://github.com/seata/seata/pull/6098)] optimize the retry logic in the acquireMetadata method +- [[#6034](https://github.com/seata/seata/pull/6034)] using namespace from command line when deployment with helm charts ### security: @@ -44,5 +45,6 @@ Thanks to these contributors for their code commits. Please report an unintended - [ggbocoder](https://github.com/ggbocoder) - [leezongjie](https://github.com/leezongjie) - [l81893521](https://github.com/l81893521) +- [baiyangtx](https://github.com/baiyangtx) Also, we receive many valuable issues, questions and advices from our community. Thanks for you all. diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md index cc6675ca9ed..60eb11af125 100644 --- a/changes/zh-cn/2.x.md +++ b/changes/zh-cn/2.x.md @@ -21,6 +21,7 @@ - [[#6042](https://github.com/seata/seata/pull/6042)] 增加raft模式鉴权机制 - [[#6091](https://github.com/seata/seata/pull/6091)] 优化raft鉴权时获取tc地址的方式 - [[#6098](https://github.com/seata/seata/pull/6098)] 优化acquireMetadata方法的重试逻辑 +- [[#6034](https://github.com/seata/seata/pull/6034)] 使用helm图表进行部署时使用命令行中的命名空间 ### security: - [[#6069](https://github.com/seata/seata/pull/6069)] 升级Guava依赖版本,修复安全漏洞 @@ -43,5 +44,6 @@ - [ggbocoder](https://github.com/ggbocoder) - [leezongjie](https://github.com/leezongjie) - [l81893521](https://github.com/l81893521) +- [baiyangtx](https://github.com/baiyangtx) 同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。 diff --git a/script/server/helm/seata-server/templates/deployment.yaml b/script/server/helm/seata-server/templates/deployment.yaml index 71af7c2965b..17f53d34442 100644 --- a/script/server/helm/seata-server/templates/deployment.yaml +++ b/script/server/helm/seata-server/templates/deployment.yaml @@ -1,9 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: -{{- if .Values.namespace }} - namespace: {{ .Values.namespace }} -{{- end}} + namespace: {{ .Release.Namespace | quote }} name: {{ include "seata-server.name" . }} labels: {{ include "seata-server.labels" . | indent 4 }} diff --git a/script/server/helm/seata-server/templates/service.yaml b/script/server/helm/seata-server/templates/service.yaml index 812415b2337..ab9c121fc2a 100644 --- a/script/server/helm/seata-server/templates/service.yaml +++ b/script/server/helm/seata-server/templates/service.yaml @@ -1,6 +1,7 @@ apiVersion: v1 kind: Service metadata: + namespace: {{ .Release.Namespace | quote }} name: {{ include "seata-server.fullname" . }} labels: {{ include "seata-server.labels" . | indent 4 }} diff --git a/script/server/helm/seata-server/templates/tests/test-connection.yaml b/script/server/helm/seata-server/templates/tests/test-connection.yaml index 97d69903752..5fb79ccfd6b 100644 --- a/script/server/helm/seata-server/templates/tests/test-connection.yaml +++ b/script/server/helm/seata-server/templates/tests/test-connection.yaml @@ -1,6 +1,7 @@ apiVersion: v1 kind: Pod metadata: + namespace: {{ .Release.Namespace | quote }} name: "{{ include "seata-server.fullname" . }}-test-connection" labels: {{ include "seata-server.labels" . | indent 4 }} diff --git a/script/server/helm/seata-server/values.yaml b/script/server/helm/seata-server/values.yaml index 9e88f9af037..e9f9829064c 100644 --- a/script/server/helm/seata-server/values.yaml +++ b/script/server/helm/seata-server/values.yaml @@ -1,7 +1,5 @@ replicaCount: 1 -namespace: default - image: repository: seataio/seata-server tag: latest