Skip to content

Commit

Permalink
deploy(k8s): add option to clean checked-out code (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz committed Mar 20, 2024
1 parent c7e87f5 commit 0d14e23
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ running [Faasm](https://github.com/faasm/faasm) cluster.
To install `faasmctl` you need a working `pip` (virtual-)environment. Then:

```bash
pip install faasmctl==0.37.0
pip install faasmctl==0.38.0
```

## Usage
Expand Down
5 changes: 3 additions & 2 deletions faasmctl/tasks/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,22 @@ def dist_tests(ctx, mount_source=None, ini_file=None):


@task
def k8s(ctx, workers=2, context=None, ini_file=None):
def k8s(ctx, workers=2, context=None, clean=False, ini_file=None):
"""
Deploy a Faasm cluster on k8s
Parameters:
- workers (int): number of workers to deploy
- context (str): path to the k8s config to use (defaults to ~/.kube/config)
- clean (bool): flag to clean the local checkout of the code tag
- ini_file (str): path to the ini_file to generate (if selected)
Returns:
- (str): path to the generated ini_file
"""
# First, check-out the Faasm source if necessary (we need it for the k8s
# deployment files, eventually we could publish them as helm charts)
faasm_checkout, faasm_ver = fetch_faasm_code()
faasm_checkout, faasm_ver = fetch_faasm_code(force=clean)

if context:
context = abspath(context)
Expand Down
2 changes: 1 addition & 1 deletion faasmctl/util/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FAASMCTL_VERSION = "0.37.0"
FAASMCTL_VERSION = "0.38.0"


def get_version():
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "faasmctl"
version = "0.37.0"
version = "0.38.0"
authors = [
{ name="Faasm Team", email="[email protected]" },
]
Expand Down

0 comments on commit 0d14e23

Please sign in to comment.