Skip to content

Commit 1610669

Browse files
committed
deployer: update docstring for info commands
1 parent 089f8f9 commit 1610669

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

deployer/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,20 @@ This sub-command can be used to generate the resource allocation choices for giv
269269
This generates a custom number of resource allocation choices for a certain instance type, depending on a certain chosen strategy that can be used in the profile list of a hub.
270270

271271
##### `generate resource-allocation daemonset-requests`
272-
Updates `daemonset_requests.yaml` with an individual cluster's DaemonSets with running pods combined requests of CPU and memory, excluding GPU related DaemonSets.
272+
Updates `daemonset_requests.yaml` with an individual cluster's DaemonSets' requests summarized.
273+
274+
Only DaemonSet's with running pods are considered, and GPU related DaemonSets (with "nvidia" in the name) are also ignored.
275+
276+
To run this command for all clusters, `xargs` can be used like this:
277+
278+
ls config/clusters | xargs -I {} deployer generate resource-allocation daemonset-requests {}
273279

274280
##### `generate resource-allocation instance-capacity`
275-
Updates `instance_capacity.yaml` with instance types' total and allocatable capacity reported by `kubectl get node`.
281+
Updates `instance_capacity.yaml` with an individual cluster's running instance types' total and allocatable capacity.
282+
283+
To run this command for all clusters, `xargs` can be used like this:
284+
285+
ls config/clusters | xargs -I {} deployer generate resource-allocation instance-capacity {}
276286

277287
##### `generate resource-allocation node-info-update`
278288
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.

deployer/commands/generate/resource_allocation/daemonset_requests.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,15 @@ def daemonset_requests(
121121
cluster_name: str = typer.Argument(..., help="Name of cluster to operate on"),
122122
):
123123
"""
124-
Updates `daemonset_requests.yaml` with an individual cluster's DaemonSets
125-
with running pods combined requests of CPU and memory, excluding GPU related
126-
DaemonSets.
124+
Updates `daemonset_requests.yaml` with an individual cluster's DaemonSets'
125+
requests summarized.
126+
127+
Only DaemonSet's with running pods are considered, and GPU related
128+
DaemonSets (with "nvidia" in the name) are also ignored.
129+
130+
To run this command for all clusters, `xargs` can be used like this:
131+
132+
ls config/clusters | xargs -I {} deployer generate resource-allocation daemonset-requests {}
127133
"""
128134
file_path = HERE / "daemonset_requests.yaml"
129135
file_path.touch(exist_ok=True)

deployer/commands/generate/resource_allocation/instance_capacity.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,12 @@ def instance_capacity(
9595
cluster_name: str = typer.Argument(..., help="Name of cluster to operate on"),
9696
):
9797
"""
98-
Updates `instance_capacity.yaml` with instance types' total and allocatable
99-
capacity reported by `kubectl get node`.
98+
Updates `instance_capacity.yaml` with an individual cluster's running
99+
instance types' total and allocatable capacity.
100+
101+
To run this command for all clusters, `xargs` can be used like this:
102+
103+
ls config/clusters | xargs -I {} deployer generate resource-allocation instance-capacity {}
100104
"""
101105
file_path = HERE / "instance_capacity.yaml"
102106
file_path.touch(exist_ok=True)

0 commit comments

Comments
 (0)