Skip to content

Commit

Permalink
deployer: rename command instance-capacity to instance-capacities
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Nov 4, 2023
1 parent 1610669 commit baaea25
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions deployer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion deployer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit baaea25

Please sign in to comment.