Remove aliases

pull/302/head
Philip Laine 4 years ago
parent 55cee488bc
commit d32e8c6e98

@ -33,10 +33,9 @@ import (
)
var createAlertCmd = &cobra.Command{
Use: "alert [name]",
Aliases: []string{},
Short: "Create or update a Alert resource",
Long: "The create alert command generates a Alert resource.",
Use: "alert [name]",
Short: "Create or update a Alert resource",
Long: "The create alert command generates a Alert resource.",
Example: ` # Create an Alert for kustomization events
gotk create alert \
--event-severity info \

@ -33,19 +33,18 @@ import (
)
var createAlertProviderCmd = &cobra.Command{
Use: "alert-provider [name]",
Aliases: []string{"ap"},
Short: "Create or update a Provider resource",
Long: "The create alert-provider command generates a Provider resource.",
Use: "alert-provider [name]",
Short: "Create or update a Provider resource",
Long: "The create alert-provider command generates a Provider resource.",
Example: ` # Create a Provider for a Slack channel
gotk create ap slack \
gotk create alert-provider slack \
--type slack \
--channel general \
--address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
--secret-ref webhook-url
# Create a Provider for a Github repository
gotk create ap github-podinfo \
gotk create alert-provider github-podinfo \
--type github \
--address https://github.com/stefanprodan/podinfo \
--secret-ref github-token

@ -33,12 +33,11 @@ import (
)
var createReceiverCmd = &cobra.Command{
Use: "receiver [name]",
Aliases: []string{"rcv"},
Short: "Create or update a Receiver resource",
Long: "The create receiver command generates a Receiver resource.",
Use: "receiver [name]",
Short: "Create or update a Receiver resource",
Long: "The create receiver command generates a Receiver resource.",
Example: ` # Create a Receiver
gotk create rcv github-receiver \
gotk create receiver github-receiver \
--type github \
--event ping \
--event push \

@ -28,10 +28,9 @@ import (
)
var deleteAlertCmd = &cobra.Command{
Use: "alert [name]",
Aliases: []string{},
Short: "Delete a Alert resource",
Long: "The delete alert command removes the given Alert from the cluster.",
Use: "alert [name]",
Short: "Delete a Alert resource",
Long: "The delete alert command removes the given Alert from the cluster.",
Example: ` # Delete an Alert and the Kubernetes resources created by it
gotk delete alert main
`,

@ -28,12 +28,11 @@ import (
)
var deleteAlertProviderCmd = &cobra.Command{
Use: "alert-provider [name]",
Aliases: []string{"ap"},
Short: "Delete a Provider resource",
Long: "The delete alert-provider command removes the given Provider from the cluster.",
Use: "alert-provider [name]",
Short: "Delete a Provider resource",
Long: "The delete alert-provider command removes the given Provider from the cluster.",
Example: ` # Delete a Provider and the Kubernetes resources created by it
gotk delete ap slack
gotk delete alert-provider slack
`,
RunE: deleteAlertProviderCmdRun,
}

@ -28,10 +28,9 @@ import (
)
var deleteReceiverCmd = &cobra.Command{
Use: "receiver [name]",
Aliases: []string{"rcv"},
Short: "Delete a Receiver resource",
Long: "The delete receiver command removes the given Receiver from the cluster.",
Use: "receiver [name]",
Short: "Delete a Receiver resource",
Long: "The delete receiver command removes the given Receiver from the cluster.",
Example: ` # Delete an Receiver and the Kubernetes resources created by it
gotk delete receiver main
`,

@ -30,10 +30,9 @@ import (
)
var exportAlertCmd = &cobra.Command{
Use: "alert [name]",
Aliases: []string{},
Short: "Export Alert resources in YAML format",
Long: "The export alert command exports one or all Alert resources in YAML format.",
Use: "alert [name]",
Short: "Export Alert resources in YAML format",
Long: "The export alert command exports one or all Alert resources in YAML format.",
Example: ` # Export all Alert resources
gotk export alert --all > alerts.yaml

@ -30,15 +30,14 @@ import (
)
var exportAlertProviderCmd = &cobra.Command{
Use: "alert-provider [name]",
Aliases: []string{"ap"},
Short: "Export Provider resources in YAML format",
Long: "The export alert-provider command exports one or all Provider resources in YAML format.",
Use: "alert-provider [name]",
Short: "Export Provider resources in YAML format",
Long: "The export alert-provider command exports one or all Provider resources in YAML format.",
Example: ` # Export all Provider resources
gotk export ap --all > alert-providers.yaml
gotk export alert-provider --all > alert-providers.yaml
# Export a Provider
gotk export ap slack > slack.yaml
gotk export alert-provider slack > slack.yaml
`,
RunE: exportAlertProviderCmdRun,
}

@ -30,15 +30,14 @@ import (
)
var exportReceiverCmd = &cobra.Command{
Use: "receiver [name]",
Aliases: []string{"rcv"},
Short: "Export Receiver resources in YAML format",
Long: "The export receiver command exports one or all Receiver resources in YAML format.",
Use: "receiver [name]",
Short: "Export Receiver resources in YAML format",
Long: "The export receiver command exports one or all Receiver resources in YAML format.",
Example: ` # Export all Receiver resources
gotk export rcv --all > receivers.yaml
gotk export receiver --all > receivers.yaml
# Export a Receiver
gotk export rcv main > main.yaml
gotk export receiver main > main.yaml
`,
RunE: exportReceiverCmdRun,
}

@ -31,10 +31,9 @@ import (
)
var getAlertCmd = &cobra.Command{
Use: "alerts",
Aliases: []string{},
Short: "Get Alert statuses",
Long: "The get alert command prints the statuses of the resources.",
Use: "alerts",
Short: "Get Alert statuses",
Long: "The get alert command prints the statuses of the resources.",
Example: ` # List all Alerts and their status
gotk get alerts
`,

@ -29,10 +29,9 @@ import (
)
var getAlertProviderCmd = &cobra.Command{
Use: "alert-providers",
Aliases: []string{"ap"},
Short: "Get Provider statuses",
Long: "The get alert-provider command prints the statuses of the resources.",
Use: "alert-providers",
Short: "Get Provider statuses",
Long: "The get alert-provider command prints the statuses of the resources.",
Example: ` # List all Providers and their status
gotk get alert-providers
`,

@ -31,10 +31,9 @@ import (
)
var getReceiverCmd = &cobra.Command{
Use: "receivers",
Aliases: []string{"rcv"},
Short: "Get Receiver statuses",
Long: "The get receiver command prints the statuses of the resources.",
Use: "receivers",
Short: "Get Receiver statuses",
Long: "The get receiver command prints the statuses of the resources.",
Example: ` # List all Receiver and their status
gotk get receivers
`,

@ -31,9 +31,8 @@ import (
)
var resumeAlertCmd = &cobra.Command{
Use: "alert [name]",
Aliases: []string{},
Short: "Resume a suspended Alert",
Use: "alert [name]",
Short: "Resume a suspended Alert",
Long: `The resume command marks a previously suspended Alert resource for reconciliation and waits for it to
finish the apply.`,
Example: ` # Resume reconciliation for an existing Alert

@ -31,13 +31,12 @@ import (
)
var resumeReceiverCmd = &cobra.Command{
Use: "receiver [name]",
Aliases: []string{"rcv"},
Short: "Resume a suspended Receiver",
Use: "receiver [name]",
Short: "Resume a suspended Receiver",
Long: `The resume command marks a previously suspended Receiver resource for reconciliation and waits for it to
finish the apply.`,
Example: ` # Resume reconciliation for an existing Receiver
gotk resume rcv main
gotk resume receiver main
`,
RunE: resumeReceiverCmdRun,
}

@ -27,10 +27,9 @@ import (
)
var suspendAlertCmd = &cobra.Command{
Use: "alert [name]",
Aliases: []string{},
Short: "Suspend reconciliation of Alert",
Long: "The suspend command disables the reconciliation of a Alert resource.",
Use: "alert [name]",
Short: "Suspend reconciliation of Alert",
Long: "The suspend command disables the reconciliation of a Alert resource.",
Example: ` # Suspend reconciliation for an existing Alert
gotk suspend alert main
`,

@ -27,10 +27,9 @@ import (
)
var suspendReceiverCmd = &cobra.Command{
Use: "receiver [name]",
Aliases: []string{"rcv"},
Short: "Suspend reconciliation of Receiver",
Long: "The suspend command disables the reconciliation of a Receiver resource.",
Use: "receiver [name]",
Short: "Suspend reconciliation of Receiver",
Long: "The suspend command disables the reconciliation of a Receiver resource.",
Example: ` # Suspend reconciliation for an existing Receiver
gotk suspend receiver main
`,

@ -14,14 +14,14 @@ gotk create alert-provider [name] [flags]
```
# Create a Provider for a Slack channel
gotk create ap slack \
gotk create alert-provider slack \
--type slack \
--channel general \
--address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
--secret-ref webhook-url
# Create a Provider for a Github repository
gotk create ap github-podinfo \
gotk create alert-provider github-podinfo \
--type github \
--address https://github.com/stefanprodan/podinfo \
--secret-ref github-token

@ -14,7 +14,7 @@ gotk create receiver [name] [flags]
```
# Create a Receiver
gotk create rcv github-receiver \
gotk create receiver github-receiver \
--type github \
--event ping \
--event push \

@ -14,7 +14,7 @@ gotk delete alert-provider [name] [flags]
```
# Delete a Provider and the Kubernetes resources created by it
gotk delete ap slack
gotk delete alert-provider slack
```

@ -14,10 +14,10 @@ gotk export alert-provider [name] [flags]
```
# Export all Provider resources
gotk export ap --all > alert-providers.yaml
gotk export alert-provider --all > alert-providers.yaml
# Export a Provider
gotk export ap slack > slack.yaml
gotk export alert-provider slack > slack.yaml
```

@ -14,10 +14,10 @@ gotk export receiver [name] [flags]
```
# Export all Receiver resources
gotk export rcv --all > receivers.yaml
gotk export receiver --all > receivers.yaml
# Export a Receiver
gotk export rcv main > main.yaml
gotk export receiver main > main.yaml
```

@ -15,7 +15,7 @@ gotk resume receiver [name] [flags]
```
# Resume reconciliation for an existing Receiver
gotk resume rcv main
gotk resume receiver main
```

Loading…
Cancel
Save