diff --git a/library/gke.py b/library/gke.py index 095c1a0..a1332a7 100755 --- a/library/gke.py +++ b/library/gke.py @@ -49,7 +49,6 @@ def image_pull_secret(self): data = check_output(['kubectl', 'create', 'secret', 'docker-registry', name, '--docker-server', server, '--docker-username', username, '--docker-password', password, '--docker-email', email, '--dry-run', '-o', 'yaml']).decode('UTF-8') run(['kubectl', 'apply', '-f', '-'], input=data, encoding='UTF-8', stdout=PIPE) - @WrapPrint('Cleaning up... ', 'done') def clean_up(self, containers: List[str]): untagged_images = [] for container in containers: @@ -65,6 +64,8 @@ def clean_up(self, containers: List[str]): for untagged_image in untagged_images: command = ['gcloud', 'container', 'images', 'delete', '--quiet', untagged_image] call(command, stdout=PIPE) + else: + print('Nothing to clean') def auth(self): variables = load_environment_variables(['GOOGLE_AUTH_KEY_FILE'])