From baaea2509135710ec80475b9502c2b215ee4b479 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sat, 4 Nov 2023 10:59:41 +0100 Subject: [PATCH] deployer: rename command instance-capacity to instance-capacities --- deployer/README.md | 10 +++++----- deployer/__main__.py | 2 +- .../{instance_capacity.py => instance_capacities.py} | 8 ++++---- ...instance_capacity.yaml => instance_capacities.yaml} | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) rename deployer/commands/generate/resource_allocation/{instance_capacity.py => instance_capacities.py} (95%) rename deployer/commands/generate/resource_allocation/{instance_capacity.yaml => instance_capacities.yaml} (99%) diff --git a/deployer/README.md b/deployer/README.md index dda3f5f1a6..49548e0cb2 100644 --- a/deployer/README.md +++ b/deployer/README.md @@ -91,8 +91,8 @@ The `deployer.py` file is the main file, that contains all of the commands regis │   │   ├── daemonset_requests.py │   │   ├── daemonset_requests.yaml │   │   ├── generate_choices.py -│   │   ├── instance_capacity.py -│   │   ├── instance_capacity.yaml +│   │   ├── instance_capacities.py +│   │   ├── instance_capacities.yaml │   │   ├── node-capacity-info.json │   │   ├── resource_allocation_app.py │   │   └── update_nodeinfo.py @@ -277,12 +277,12 @@ To run this command for all clusters, `xargs` can be used like this: ls config/clusters | xargs -I {} deployer generate resource-allocation daemonset-requests {} -##### `generate resource-allocation instance-capacity` -Updates `instance_capacity.yaml` with an individual cluster's running instance types' total and allocatable capacity. +##### `generate resource-allocation instance-capacities` +Updates `instance_capacities.yaml` with an individual cluster's running instance types' total and allocatable capacity. To run this command for all clusters, `xargs` can be used like this: - ls config/clusters | xargs -I {} deployer generate resource-allocation instance-capacity {} + ls config/clusters | xargs -I {} deployer generate resource-allocation instance-capacities {} ##### `generate resource-allocation node-info-update` This updates the json file `node-capacity-info.json` with info about the capacity of a node of a certain type. This file is then used for generating the resource choices. diff --git a/deployer/__main__.py b/deployer/__main__.py index 985d55a59c..782f047f34 100644 --- a/deployer/__main__.py +++ b/deployer/__main__.py @@ -11,7 +11,7 @@ import deployer.commands.generate.helm_upgrade.jobs # noqa: F401 import deployer.commands.generate.resource_allocation.daemonset_requests # noqa: F401 import deployer.commands.generate.resource_allocation.generate_choices # noqa: F401 -import deployer.commands.generate.resource_allocation.instance_capacity # noqa: F401 +import deployer.commands.generate.resource_allocation.instance_capacities # noqa: F401 import deployer.commands.generate.resource_allocation.update_nodeinfo # noqa: F401 import deployer.commands.grafana.central_grafana # noqa: F401 import deployer.commands.grafana.deploy_dashboards # noqa: F401 diff --git a/deployer/commands/generate/resource_allocation/instance_capacity.py b/deployer/commands/generate/resource_allocation/instance_capacities.py similarity index 95% rename from deployer/commands/generate/resource_allocation/instance_capacity.py rename to deployer/commands/generate/resource_allocation/instance_capacities.py index 42e76b6d4f..5dc0df9947 100644 --- a/deployer/commands/generate/resource_allocation/instance_capacity.py +++ b/deployer/commands/generate/resource_allocation/instance_capacities.py @@ -91,18 +91,18 @@ def get_instance_capacities(): @resource_allocation_app.command() -def instance_capacity( +def instance_capacities( cluster_name: str = typer.Argument(..., help="Name of cluster to operate on"), ): """ - Updates `instance_capacity.yaml` with an individual cluster's running + Updates `instance_capacities.yaml` with an individual cluster's running instance types' total and allocatable capacity. To run this command for all clusters, `xargs` can be used like this: - ls config/clusters | xargs -I {} deployer generate resource-allocation instance-capacity {} + ls config/clusters | xargs -I {} deployer generate resource-allocation instance-capacities {} """ - file_path = HERE / "instance_capacity.yaml" + file_path = HERE / "instance_capacities.yaml" file_path.touch(exist_ok=True) # acquire a Cluster object diff --git a/deployer/commands/generate/resource_allocation/instance_capacity.yaml b/deployer/commands/generate/resource_allocation/instance_capacities.yaml similarity index 99% rename from deployer/commands/generate/resource_allocation/instance_capacity.yaml rename to deployer/commands/generate/resource_allocation/instance_capacities.yaml index ae00e228eb..ebe5eef58e 100644 --- a/deployer/commands/generate/resource_allocation/instance_capacity.yaml +++ b/deployer/commands/generate/resource_allocation/instance_capacities.yaml @@ -13,7 +13,7 @@ # This file isn't updated by automation, but can easily be updated by manually # by running a command once for each cluster: # -# ls config/clusters | xargs -I {} deployer generate resource-allocation instance-capacity {} +# ls config/clusters | xargs -I {} deployer generate resource-allocation instance-capacities {} # # GKE instance types n2-highmem-2: