Skip to content

Commit

Permalink
feat: renamed delete environment to delete namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
vvagaytsev committed Jul 20, 2022
1 parent 143b189 commit 6cec321
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions core/src/commands/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type DeleteSecretArgs = typeof deleteSecretArgs

export class DeleteSecretCommand extends Command<typeof deleteSecretArgs> {
name = "secret"
help = "Delete a secret from the environment."
help = "Delete a secret from the namespace."
protected = true

description = dedent`
Expand Down Expand Up @@ -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.
`,
}),
Expand All @@ -98,35 +98,34 @@ 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

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({
Expand Down

0 comments on commit 6cec321

Please sign in to comment.