From ec72f9ffb63f07cd7187a8ec01c7ebc14db8882b Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Wed, 20 Jul 2022 13:46:30 +0200 Subject: [PATCH] feat: renamed `delete environment` to `delete namespace` --- core/src/commands/delete.ts | 23 +++++++++++------------ docs/reference/commands.md | 21 ++++++++++----------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/core/src/commands/delete.ts b/core/src/commands/delete.ts index f533712cd5..3d89d5066b 100644 --- a/core/src/commands/delete.ts +++ b/core/src/commands/delete.ts @@ -45,7 +45,7 @@ type DeleteSecretArgs = typeof deleteSecretArgs export class DeleteSecretCommand extends Command { name = "secret" - help = "Delete a secret from the environment." + help = "Delete a secret from the namespace." protected = true description = dedent` @@ -82,7 +82,7 @@ const dependantsFirstOpt = { "dependants-first": new BooleanParameter({ help: deline` Delete services in reverse dependency order. That is, if service-a has a dependency on service-b, service-a - will be deleted before service-b when calling \`garden cleanup environment service-a,service-b --dependants-first\`. + will be deleted before service-b when calling \`garden cleanup namespace service-a,service-b --dependants-first\`. When this flag is not used, all services in the project are deleted simultaneously. `, }), @@ -98,9 +98,9 @@ interface DeleteEnvironmentResult { } export class DeleteEnvironmentCommand extends Command<{}, DeleteEnvironmentOpts> { - name = "environment" - alias = "env" - help = "Deletes a running environment." + name = "namespace" + alias = "ns" + help = "Deletes a running namespace." protected = true streamEvents = true @@ -108,25 +108,24 @@ export class DeleteEnvironmentCommand extends Command<{}, DeleteEnvironmentOpts> options = deleteEnvironmentOpts description = dedent` - This will delete all services in the specified environment, and trigger providers to clear up any other resources - and reset it. When you then run \`garden deploy\`, the environment will be reconfigured. + This will delete all services in the specified namespace, and trigger providers to clear up any other resources + and reset it. When you then run \`garden deploy\`, the namespace will be reconfigured. - This can be useful if you find the environment to be in an inconsistent state, or need/want to free up - resources. + This can be useful if you find the namespace to be in an inconsistent state, or need/want to free up resources. ` outputsSchema = () => joi.object().keys({ providerStatuses: joiIdentifierMap(environmentStatusSchema()).description( - "The status of each provider in the environment." + "The status of each provider in the namespace." ), serviceStatuses: joiIdentifierMap(serviceStatusSchema()).description( - "The status of each service in the environment." + "The status of each service in the namespace." ), }) printHeader({ headerLog }) { - printHeader(headerLog, `Cleanup environment`, "skull_and_crossbones") + printHeader(headerLog, `Cleanup namespace`, "skull_and_crossbones") } async action({ diff --git a/docs/reference/commands.md b/docs/reference/commands.md index 4fb166a0a2..a0c6e9dfef 100644 --- a/docs/reference/commands.md +++ b/docs/reference/commands.md @@ -374,7 +374,7 @@ Examples: ### garden cleanup secret -**Delete a secret from the environment.** +**Delete a secret from the namespace.** Returns with an error if the provided key could not be found by the provider. @@ -396,30 +396,29 @@ Examples: -### garden cleanup environment +### garden cleanup namespace -**Deletes a running environment.** +**Deletes a running namespace.** -This will delete all services in the specified environment, and trigger providers to clear up any other resources -and reset it. When you then run `garden deploy`, the environment will be reconfigured. +This will delete all services in the specified namespace, and trigger providers to clear up any other resources +and reset it. When you then run `garden deploy`, the namespace will be reconfigured. -This can be useful if you find the environment to be in an inconsistent state, or need/want to free up -resources. +This can be useful if you find the namespace to be in an inconsistent state, or need/want to free up resources. #### Usage - garden cleanup environment [options] + garden cleanup namespace [options] #### Options | Argument | Alias | Type | Description | | -------- | ----- | ---- | ----------- | - | `--dependants-first` | | boolean | Delete services in reverse dependency order. That is, if service-a has a dependency on service-b, service-a will be deleted before service-b when calling `garden cleanup environment service-a,service-b --dependants-first`. When this flag is not used, all services in the project are deleted simultaneously. + | `--dependants-first` | | boolean | Delete services in reverse dependency order. That is, if service-a has a dependency on service-b, service-a will be deleted before service-b when calling `garden cleanup namespace service-a,service-b --dependants-first`. When this flag is not used, all services in the project are deleted simultaneously. #### Outputs ```yaml -# The status of each provider in the environment. +# The status of each provider in the namespace. providerStatuses: # Description of an environment's status for a provider. : @@ -445,7 +444,7 @@ providerStatuses: # Set to true to disable caching of the status. disableCache: -# The status of each service in the environment. +# The status of each service in the namespace. serviceStatuses: : # When the service was first deployed by the provider.