Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

U/gonabavi/revert to a single vitesscluster #3947

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions paasta_tools/cli/cmds/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,14 @@
from paasta_tools.utils import PaastaColors
from paasta_tools.utils import remove_ansi_escape_sequences
from paasta_tools.utils import SystemPaastaConfig
from paasta_tools.vitesscell_tools import VitessCellConfig
from paasta_tools.vitesscluster_tools import VitessClusterConfig
from paasta_tools.vitesskeyspace_tools import VitessKeyspaceConfig
from paasta_tools.vitesscluster_tools import VitessDeploymentConfig

FLINK_STATUS_MAX_THREAD_POOL_WORKERS = 50
ALLOWED_INSTANCE_CONFIG: Sequence[Type[InstanceConfig]] = [
FlinkDeploymentConfig,
FlinkEksDeploymentConfig,
CassandraClusterDeploymentConfig,
VitessClusterConfig,
VitessCellConfig,
VitessKeyspaceConfig,
VitessDeploymentConfig,
KafkaClusterDeploymentConfig,
KubernetesDeploymentConfig,
EksDeploymentConfig,
Expand All @@ -119,9 +115,7 @@
FlinkDeploymentConfig,
FlinkEksDeploymentConfig,
CassandraClusterDeploymentConfig,
VitessClusterConfig,
VitessCellConfig,
VitessKeyspaceConfig,
VitessDeploymentConfig,
KafkaClusterDeploymentConfig,
KubernetesDeploymentConfig,
EksDeploymentConfig,
Expand All @@ -143,9 +137,7 @@
EKS_DEPLOYMENT_CONFIGS = [
EksDeploymentConfig,
FlinkEksDeploymentConfig,
VitessClusterConfig,
VitessCellConfig,
VitessKeyspaceConfig,
VitessDeploymentConfig,
]
FLINK_DEPLOYMENT_CONFIGS = [FlinkDeploymentConfig, FlinkEksDeploymentConfig]

Expand Down
20 changes: 3 additions & 17 deletions paasta_tools/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@
from paasta_tools.utils import PaastaColors
from paasta_tools.utils import SystemPaastaConfig
from paasta_tools.utils import validate_service_instance
from paasta_tools.vitesscell_tools import load_vitess_cell_instance_config
from paasta_tools.vitesscluster_tools import load_vitess_cluster_instance_config
from paasta_tools.vitesskeyspace_tools import load_vitess_keyspace_instance_config
from paasta_tools.vitesscluster_tools import load_vitess_instance_config

try:
from vault_tools.paasta_secret import get_client as get_vault_client
Expand Down Expand Up @@ -682,13 +680,7 @@ class LongRunningInstanceTypeHandler(NamedTuple):
get_service_instance_list, load_kafkacluster_instance_config
),
vitesscluster=InstanceTypeHandler(
get_service_instance_list, load_vitess_cluster_instance_config
),
vitesscell=InstanceTypeHandler(
get_service_instance_list, load_vitess_cell_instance_config
),
vitesskeyspace=InstanceTypeHandler(
get_service_instance_list, load_vitess_keyspace_instance_config
get_service_instance_list, load_vitess_instance_config
),
nrtsearchservice=InstanceTypeHandler(
get_service_instance_list, load_nrtsearchservice_instance_config
Expand Down Expand Up @@ -721,13 +713,7 @@ class LongRunningInstanceTypeHandler(NamedTuple):
get_service_instance_list, load_kafkacluster_instance_config
),
vitesscluster=LongRunningInstanceTypeHandler(
get_service_instance_list, load_vitess_cluster_instance_config
),
vitesscell=LongRunningInstanceTypeHandler(
get_service_instance_list, load_vitess_cell_instance_config
),
vitesskeyspace=LongRunningInstanceTypeHandler(
get_service_instance_list, load_vitess_keyspace_instance_config
get_service_instance_list, load_vitess_instance_config
),
nrtsearchservice=LongRunningInstanceTypeHandler(
get_service_instance_list, load_nrtsearchservice_instance_config
Expand Down
6 changes: 0 additions & 6 deletions paasta_tools/instance/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
from paasta_tools import monkrelaycluster_tools
from paasta_tools import nrtsearchservice_tools
from paasta_tools import smartstack_tools
from paasta_tools import vitesscell_tools
from paasta_tools import vitesscluster_tools
from paasta_tools import vitesskeyspace_tools
from paasta_tools.cli.utils import LONG_RUNNING_INSTANCE_TYPE_HANDLERS
from paasta_tools.instance.hpa_metrics_parser import HPAMetricsDict
from paasta_tools.instance.hpa_metrics_parser import HPAMetricsParser
Expand All @@ -59,8 +57,6 @@
"cassandracluster",
"kafkacluster",
"vitesscluster",
"vitesscell",
"vitesskeyspace",
}
INSTANCE_TYPES_K8S = {
"cassandracluster",
Expand All @@ -76,8 +72,6 @@
cassandracluster=cassandracluster_tools.cr_id,
kafkacluster=kafkacluster_tools.cr_id,
vitesscluster=vitesscluster_tools.cr_id,
vitesscell=vitesscell_tools.cr_id,
vitesskeyspace=vitesskeyspace_tools.cr_id,
nrtsearchservice=nrtsearchservice_tools.cr_id,
nrtsearchserviceeks=nrtsearchservice_tools.cr_id,
monkrelaycluster=monkrelaycluster_tools.cr_id,
Expand Down
10 changes: 2 additions & 8 deletions paasta_tools/setup_kubernetes_cr.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,13 @@
from paasta_tools.utils import get_git_sha_from_dockerurl
from paasta_tools.utils import load_all_configs
from paasta_tools.utils import load_system_paasta_config
from paasta_tools.vitesscell_tools import load_vitess_cell_instance_configs
from paasta_tools.vitesscluster_tools import load_vitess_cluster_instance_configs
from paasta_tools.vitesskeyspace_tools import load_vitess_keyspace_instance_configs
from paasta_tools.vitesscluster_tools import load_vitess_service_instance_configs


log = logging.getLogger(__name__)


INSTANCE_TYPE_TO_CONFIG_LOADER = {
"vitesscluster": load_vitess_cluster_instance_configs,
"vitesscell": load_vitess_cell_instance_configs,
"vitesskeyspace": load_vitess_keyspace_instance_configs,
}
INSTANCE_TYPE_TO_CONFIG_LOADER = {"vitesscluster": load_vitess_service_instance_configs}


class StdoutKubeClient:
Expand Down
4 changes: 0 additions & 4 deletions paasta_tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@
"cassandracluster",
"kafkacluster",
"vitesscluster",
"vitesscell",
"vitesskeyspace",
"monkrelays",
"nrtsearchservice",
"nrtsearchserviceeks",
Expand All @@ -158,8 +156,6 @@
"cassandracluster": "paasta-cassandraclusters",
"kafkacluster": "paasta-kafkaclusters",
"vitesscluster": "paasta-vitessclusters",
"vitesscell": "paasta-vitessclusters",
"vitesskeyspace": "paasta-vitessclusters",
"nrtsearchservice": "paasta-nrtsearchservices",
"nrtsearchserviceeks": "paasta-nrtsearchservices",
}
Expand Down
Loading
Loading