Skip to content

Commit

Permalink
fix: tweaks to google scaler (#20)
Browse files Browse the repository at this point in the history
* fix: tweaks to google scaler

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch authored Mar 26, 2024
1 parent e96b85a commit 160cf28
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
The versions coincide with releases on pip. Only major versions will be released as tags on Github.

## [0.0.x](https://github.com/converged-computing/kubescaler/tree/main) (0.0.x)
- ensure we do not add size for node scaling up/down times (0.0.19)
- do not use the waiter for nodegroup_active it does not work! (0.0.18)
- support for Google Cloud instance group creation, etc.
- support adding one-off node groups to a cluster (0.0.17)
Expand Down
8 changes: 6 additions & 2 deletions kubescaler/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ def __get__(self, obj, objtype):
def __call__(self, cls, *args, **kwargs):
name = self.func.__name__

# If it's not create or delete cluster we need the node count
if name not in ["create_cluster", "delete_cluster"]:
if name not in [
"create_cluster",
"delete_cluster",
"create_cluster_nodes",
"delete_nodegroup",
]:
name = f"{name}-size-{cls.node_count}"
start = time.time()
res = self.func(cls, *args, **kwargs)
Expand Down
1 change: 1 addition & 0 deletions kubescaler/scaler/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ def location(self):
"""
return self.zone or self.region

@timed
def delete_nodegroup(self, name=None):
"""
Delete a named node group.
Expand Down
2 changes: 1 addition & 1 deletion kubescaler/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# SPDX-License-Identifier: (MIT)

__version__ = "0.0.18"
__version__ = "0.0.19"
AUTHOR = "Vanessa Sochat"
EMAIL = "vsoch@users.noreply.github.com"
NAME = "kubescaler"
Expand Down

0 comments on commit 160cf28

Please sign in to comment.