Skip to content

Commit

Permalink
feature: 在云区域为0,且使用到 Proxy 的 agent配置增加enable_static_access (closed Te…
Browse files Browse the repository at this point in the history
  • Loading branch information
wyyalt committed Jun 20, 2023
1 parent 76558e4 commit e8aaee3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class AgentConfigContext(GseConfigContext):
cloud_id: int
zone_id: str
city_id: str
enable_static_access: str
extra_config_directory: str = ""

def __post_init__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ def __post_init__(self):
cloud_id=self.host.bk_cloud_id,
zone_id=self.ap.region_id,
city_id=self.ap.city_id,
# 管控区域为0, 且使用到Proxy场景的Agent需要设置为true
enable_static_access=["false", "true"][
all(
[
self.host.bk_cloud_id == constants.DEFAULT_CLOUD,
self.host.install_channel_id is not None,
self.host.node_type == constants.NodeType.AGENT,
]
)
],
),
context_dataclass.AccessConfigContext(
cluster_endpoints=",".join(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"cloud_id": __BK_GSE_CLOUD_ID__,
"zone_id": "__BK_GSE_ZONE_ID__",
"city_id": "__BK_GSE_CITY_ID__",
"enable_static_access": __BK_GSE_ENABLE_STATIC_ACCESS__,
"access": {
"cluster_endpoints": "__BK_GSE_ACCESS_CLUSTER_ENDPOINTS__",
"data_endpoints": "__BK_GSE_ACCESS_DATA_ENDPOINTS__",
Expand Down

0 comments on commit e8aaee3

Please sign in to comment.