Skip to content

Commit

Permalink
Remove vtgate lifecycle hooks (#3966)
Browse files Browse the repository at this point in the history
Remove vtgate lifecycle hooks as we're not proceeding with #3959 and would like to have functional vtgate pods for testing
  • Loading branch information
VinaySagarGonabavi authored Oct 7, 2024
1 parent 3158208 commit f0c6b86
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 f0c6b86

Please sign in to comment.