Skip to content

Commit

Permalink
Remove vtgate lifecycle hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
VinaySagarGonabavi committed Sep 20, 2024
1 parent 14ad34d commit 8135002
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 40 deletions.
21 changes: 1 addition & 20 deletions paasta_tools/vitesscluster_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"throttle_check_as_check_self": "true",
"db_charset": "utf8mb4",
"disable_active_reparents": "true",
"init_shard": "0",
}


Expand Down Expand Up @@ -260,26 +261,6 @@ def get_cell_config(
config = CellConfigDict(
name=cell,
gateway=GatewayConfigDict(
lifecycle={
"preStop": {
"exec": {
"command": [
"/bin/sh",
"-c",
f"/cloudmap/scripts/deregister_from_cloudmap.sh vtgate-{cell} {aws_region}",
]
}
},
"postStart": {
"exec": {
"command": [
"/bin/sh",
"-c",
f"/cloudmap/scripts/register_to_cloudmap.sh vtgate-{cell} {aws_region}",
]
}
},
},
affinity={"nodeAffinity": node_affinity},
extraEnv=updated_vtgate_extra_env,
extraFlags={
Expand Down
22 changes: 2 additions & 20 deletions tests/test_vitesscluster_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,26 +132,6 @@
"name": "etc-srv-configs",
},
],
"lifecycle": {
"postStart": {
"exec": {
"command": [
"/bin/sh",
"-c",
"/cloudmap/scripts/register_to_cloudmap.sh vtgate-fake_cell mo-ck_r-e",
]
}
},
"preStop": {
"exec": {
"command": [
"/bin/sh",
"-c",
"/cloudmap/scripts/deregister_from_cloudmap.sh vtgate-fake_cell mo-ck_r-e",
]
}
},
},
"replicas": 1,
"resources": {
"limits": {"cpu": "100m", "memory": "256Mi"},
Expand Down Expand Up @@ -349,6 +329,7 @@
"enforce-tableacl-config": "true",
"grpc_max_message_size": "134217728",
"init_tablet_type": "replica",
"init_shard": "0",
"keep_logs": "72h",
"log_err_stacks": "true",
"queryserver-config-schema-reload-time": "1800",
Expand Down Expand Up @@ -537,6 +518,7 @@
"enforce-tableacl-config": "true",
"grpc_max_message_size": "134217728",
"init_tablet_type": "replica",
"init_shard": "0",
"keep_logs": "72h",
"log_err_stacks": "true",
"queryserver-config-schema-reload-time": "1800",
Expand Down

0 comments on commit 8135002

Please sign in to comment.