Remove aliases
This commit is contained in:
@@ -33,10 +33,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var createAlertCmd = &cobra.Command{
|
var createAlertCmd = &cobra.Command{
|
||||||
Use: "alert [name]",
|
Use: "alert [name]",
|
||||||
Aliases: []string{},
|
Short: "Create or update a Alert resource",
|
||||||
Short: "Create or update a Alert resource",
|
Long: "The create alert command generates a Alert resource.",
|
||||||
Long: "The create alert command generates a Alert resource.",
|
|
||||||
Example: ` # Create an Alert for kustomization events
|
Example: ` # Create an Alert for kustomization events
|
||||||
gotk create alert \
|
gotk create alert \
|
||||||
--event-severity info \
|
--event-severity info \
|
||||||
|
|||||||
@@ -33,19 +33,18 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var createAlertProviderCmd = &cobra.Command{
|
var createAlertProviderCmd = &cobra.Command{
|
||||||
Use: "alert-provider [name]",
|
Use: "alert-provider [name]",
|
||||||
Aliases: []string{"ap"},
|
Short: "Create or update a Provider resource",
|
||||||
Short: "Create or update a Provider resource",
|
Long: "The create alert-provider command generates a Provider resource.",
|
||||||
Long: "The create alert-provider command generates a Provider resource.",
|
|
||||||
Example: ` # Create a Provider for a Slack channel
|
Example: ` # Create a Provider for a Slack channel
|
||||||
gotk create ap slack \
|
gotk create alert-provider slack \
|
||||||
--type slack \
|
--type slack \
|
||||||
--channel general \
|
--channel general \
|
||||||
--address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
|
--address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
|
||||||
--secret-ref webhook-url
|
--secret-ref webhook-url
|
||||||
|
|
||||||
# Create a Provider for a Github repository
|
# Create a Provider for a Github repository
|
||||||
gotk create ap github-podinfo \
|
gotk create alert-provider github-podinfo \
|
||||||
--type github \
|
--type github \
|
||||||
--address https://github.com/stefanprodan/podinfo \
|
--address https://github.com/stefanprodan/podinfo \
|
||||||
--secret-ref github-token
|
--secret-ref github-token
|
||||||
|
|||||||
@@ -33,12 +33,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var createReceiverCmd = &cobra.Command{
|
var createReceiverCmd = &cobra.Command{
|
||||||
Use: "receiver [name]",
|
Use: "receiver [name]",
|
||||||
Aliases: []string{"rcv"},
|
Short: "Create or update a Receiver resource",
|
||||||
Short: "Create or update a Receiver resource",
|
Long: "The create receiver command generates a Receiver resource.",
|
||||||
Long: "The create receiver command generates a Receiver resource.",
|
|
||||||
Example: ` # Create a Receiver
|
Example: ` # Create a Receiver
|
||||||
gotk create rcv github-receiver \
|
gotk create receiver github-receiver \
|
||||||
--type github \
|
--type github \
|
||||||
--event ping \
|
--event ping \
|
||||||
--event push \
|
--event push \
|
||||||
|
|||||||
@@ -28,10 +28,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var deleteAlertCmd = &cobra.Command{
|
var deleteAlertCmd = &cobra.Command{
|
||||||
Use: "alert [name]",
|
Use: "alert [name]",
|
||||||
Aliases: []string{},
|
Short: "Delete a Alert resource",
|
||||||
Short: "Delete a Alert resource",
|
Long: "The delete alert command removes the given Alert from the cluster.",
|
||||||
Long: "The delete alert command removes the given Alert from the cluster.",
|
|
||||||
Example: ` # Delete an Alert and the Kubernetes resources created by it
|
Example: ` # Delete an Alert and the Kubernetes resources created by it
|
||||||
gotk delete alert main
|
gotk delete alert main
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -28,12 +28,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var deleteAlertProviderCmd = &cobra.Command{
|
var deleteAlertProviderCmd = &cobra.Command{
|
||||||
Use: "alert-provider [name]",
|
Use: "alert-provider [name]",
|
||||||
Aliases: []string{"ap"},
|
Short: "Delete a Provider resource",
|
||||||
Short: "Delete a Provider resource",
|
Long: "The delete alert-provider command removes the given Provider from the cluster.",
|
||||||
Long: "The delete alert-provider command removes the given Provider from the cluster.",
|
|
||||||
Example: ` # Delete a Provider and the Kubernetes resources created by it
|
Example: ` # Delete a Provider and the Kubernetes resources created by it
|
||||||
gotk delete ap slack
|
gotk delete alert-provider slack
|
||||||
`,
|
`,
|
||||||
RunE: deleteAlertProviderCmdRun,
|
RunE: deleteAlertProviderCmdRun,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,10 +28,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var deleteReceiverCmd = &cobra.Command{
|
var deleteReceiverCmd = &cobra.Command{
|
||||||
Use: "receiver [name]",
|
Use: "receiver [name]",
|
||||||
Aliases: []string{"rcv"},
|
Short: "Delete a Receiver resource",
|
||||||
Short: "Delete a Receiver resource",
|
Long: "The delete receiver command removes the given Receiver from the cluster.",
|
||||||
Long: "The delete receiver command removes the given Receiver from the cluster.",
|
|
||||||
Example: ` # Delete an Receiver and the Kubernetes resources created by it
|
Example: ` # Delete an Receiver and the Kubernetes resources created by it
|
||||||
gotk delete receiver main
|
gotk delete receiver main
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -30,10 +30,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var exportAlertCmd = &cobra.Command{
|
var exportAlertCmd = &cobra.Command{
|
||||||
Use: "alert [name]",
|
Use: "alert [name]",
|
||||||
Aliases: []string{},
|
Short: "Export Alert resources in YAML format",
|
||||||
Short: "Export Alert resources in YAML format",
|
Long: "The export alert command exports one or all Alert resources in YAML format.",
|
||||||
Long: "The export alert command exports one or all Alert resources in YAML format.",
|
|
||||||
Example: ` # Export all Alert resources
|
Example: ` # Export all Alert resources
|
||||||
gotk export alert --all > alerts.yaml
|
gotk export alert --all > alerts.yaml
|
||||||
|
|
||||||
|
|||||||
@@ -30,15 +30,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var exportAlertProviderCmd = &cobra.Command{
|
var exportAlertProviderCmd = &cobra.Command{
|
||||||
Use: "alert-provider [name]",
|
Use: "alert-provider [name]",
|
||||||
Aliases: []string{"ap"},
|
Short: "Export Provider resources in YAML format",
|
||||||
Short: "Export Provider resources in YAML format",
|
Long: "The export alert-provider command exports one or all 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
|
Example: ` # Export all Provider resources
|
||||||
gotk export ap --all > alert-providers.yaml
|
gotk export alert-provider --all > alert-providers.yaml
|
||||||
|
|
||||||
# Export a Provider
|
# Export a Provider
|
||||||
gotk export ap slack > slack.yaml
|
gotk export alert-provider slack > slack.yaml
|
||||||
`,
|
`,
|
||||||
RunE: exportAlertProviderCmdRun,
|
RunE: exportAlertProviderCmdRun,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,15 +30,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var exportReceiverCmd = &cobra.Command{
|
var exportReceiverCmd = &cobra.Command{
|
||||||
Use: "receiver [name]",
|
Use: "receiver [name]",
|
||||||
Aliases: []string{"rcv"},
|
Short: "Export Receiver resources in YAML format",
|
||||||
Short: "Export Receiver resources in YAML format",
|
Long: "The export receiver command exports one or all Receiver resources in YAML format.",
|
||||||
Long: "The export receiver command exports one or all Receiver resources in YAML format.",
|
|
||||||
Example: ` # Export all Receiver resources
|
Example: ` # Export all Receiver resources
|
||||||
gotk export rcv --all > receivers.yaml
|
gotk export receiver --all > receivers.yaml
|
||||||
|
|
||||||
# Export a Receiver
|
# Export a Receiver
|
||||||
gotk export rcv main > main.yaml
|
gotk export receiver main > main.yaml
|
||||||
`,
|
`,
|
||||||
RunE: exportReceiverCmdRun,
|
RunE: exportReceiverCmdRun,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,10 +31,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var getAlertCmd = &cobra.Command{
|
var getAlertCmd = &cobra.Command{
|
||||||
Use: "alerts",
|
Use: "alerts",
|
||||||
Aliases: []string{},
|
Short: "Get Alert statuses",
|
||||||
Short: "Get Alert statuses",
|
Long: "The get alert command prints the statuses of the resources.",
|
||||||
Long: "The get alert command prints the statuses of the resources.",
|
|
||||||
Example: ` # List all Alerts and their status
|
Example: ` # List all Alerts and their status
|
||||||
gotk get alerts
|
gotk get alerts
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -29,10 +29,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var getAlertProviderCmd = &cobra.Command{
|
var getAlertProviderCmd = &cobra.Command{
|
||||||
Use: "alert-providers",
|
Use: "alert-providers",
|
||||||
Aliases: []string{"ap"},
|
Short: "Get Provider statuses",
|
||||||
Short: "Get Provider statuses",
|
Long: "The get alert-provider command prints the statuses of the resources.",
|
||||||
Long: "The get alert-provider command prints the statuses of the resources.",
|
|
||||||
Example: ` # List all Providers and their status
|
Example: ` # List all Providers and their status
|
||||||
gotk get alert-providers
|
gotk get alert-providers
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -31,10 +31,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var getReceiverCmd = &cobra.Command{
|
var getReceiverCmd = &cobra.Command{
|
||||||
Use: "receivers",
|
Use: "receivers",
|
||||||
Aliases: []string{"rcv"},
|
Short: "Get Receiver statuses",
|
||||||
Short: "Get Receiver statuses",
|
Long: "The get receiver command prints the statuses of the resources.",
|
||||||
Long: "The get receiver command prints the statuses of the resources.",
|
|
||||||
Example: ` # List all Receiver and their status
|
Example: ` # List all Receiver and their status
|
||||||
gotk get receivers
|
gotk get receivers
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -31,9 +31,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var resumeAlertCmd = &cobra.Command{
|
var resumeAlertCmd = &cobra.Command{
|
||||||
Use: "alert [name]",
|
Use: "alert [name]",
|
||||||
Aliases: []string{},
|
Short: "Resume a suspended Alert",
|
||||||
Short: "Resume a suspended Alert",
|
|
||||||
Long: `The resume command marks a previously suspended Alert resource for reconciliation and waits for it to
|
Long: `The resume command marks a previously suspended Alert resource for reconciliation and waits for it to
|
||||||
finish the apply.`,
|
finish the apply.`,
|
||||||
Example: ` # Resume reconciliation for an existing Alert
|
Example: ` # Resume reconciliation for an existing Alert
|
||||||
|
|||||||
@@ -31,13 +31,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var resumeReceiverCmd = &cobra.Command{
|
var resumeReceiverCmd = &cobra.Command{
|
||||||
Use: "receiver [name]",
|
Use: "receiver [name]",
|
||||||
Aliases: []string{"rcv"},
|
Short: "Resume a suspended Receiver",
|
||||||
Short: "Resume a suspended Receiver",
|
|
||||||
Long: `The resume command marks a previously suspended Receiver resource for reconciliation and waits for it to
|
Long: `The resume command marks a previously suspended Receiver resource for reconciliation and waits for it to
|
||||||
finish the apply.`,
|
finish the apply.`,
|
||||||
Example: ` # Resume reconciliation for an existing Receiver
|
Example: ` # Resume reconciliation for an existing Receiver
|
||||||
gotk resume rcv main
|
gotk resume receiver main
|
||||||
`,
|
`,
|
||||||
RunE: resumeReceiverCmdRun,
|
RunE: resumeReceiverCmdRun,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,10 +27,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var suspendAlertCmd = &cobra.Command{
|
var suspendAlertCmd = &cobra.Command{
|
||||||
Use: "alert [name]",
|
Use: "alert [name]",
|
||||||
Aliases: []string{},
|
Short: "Suspend reconciliation of Alert",
|
||||||
Short: "Suspend reconciliation of Alert",
|
Long: "The suspend command disables the reconciliation of a Alert resource.",
|
||||||
Long: "The suspend command disables the reconciliation of a Alert resource.",
|
|
||||||
Example: ` # Suspend reconciliation for an existing Alert
|
Example: ` # Suspend reconciliation for an existing Alert
|
||||||
gotk suspend alert main
|
gotk suspend alert main
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -27,10 +27,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var suspendReceiverCmd = &cobra.Command{
|
var suspendReceiverCmd = &cobra.Command{
|
||||||
Use: "receiver [name]",
|
Use: "receiver [name]",
|
||||||
Aliases: []string{"rcv"},
|
Short: "Suspend reconciliation of Receiver",
|
||||||
Short: "Suspend reconciliation of Receiver",
|
Long: "The suspend command disables the reconciliation of a Receiver resource.",
|
||||||
Long: "The suspend command disables the reconciliation of a Receiver resource.",
|
|
||||||
Example: ` # Suspend reconciliation for an existing Receiver
|
Example: ` # Suspend reconciliation for an existing Receiver
|
||||||
gotk suspend receiver main
|
gotk suspend receiver main
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ gotk create alert-provider [name] [flags]
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Create a Provider for a Slack channel
|
# Create a Provider for a Slack channel
|
||||||
gotk create ap slack \
|
gotk create alert-provider slack \
|
||||||
--type slack \
|
--type slack \
|
||||||
--channel general \
|
--channel general \
|
||||||
--address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
|
--address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
|
||||||
--secret-ref webhook-url
|
--secret-ref webhook-url
|
||||||
|
|
||||||
# Create a Provider for a Github repository
|
# Create a Provider for a Github repository
|
||||||
gotk create ap github-podinfo \
|
gotk create alert-provider github-podinfo \
|
||||||
--type github \
|
--type github \
|
||||||
--address https://github.com/stefanprodan/podinfo \
|
--address https://github.com/stefanprodan/podinfo \
|
||||||
--secret-ref github-token
|
--secret-ref github-token
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ gotk create receiver [name] [flags]
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Create a Receiver
|
# Create a Receiver
|
||||||
gotk create rcv github-receiver \
|
gotk create receiver github-receiver \
|
||||||
--type github \
|
--type github \
|
||||||
--event ping \
|
--event ping \
|
||||||
--event push \
|
--event push \
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ gotk delete alert-provider [name] [flags]
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Delete a Provider and the Kubernetes resources created by it
|
# 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
|
# Export all Provider resources
|
||||||
gotk export ap --all > alert-providers.yaml
|
gotk export alert-provider --all > alert-providers.yaml
|
||||||
|
|
||||||
# Export a Provider
|
# 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
|
# Export all Receiver resources
|
||||||
gotk export rcv --all > receivers.yaml
|
gotk export receiver --all > receivers.yaml
|
||||||
|
|
||||||
# Export a Receiver
|
# 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
|
# Resume reconciliation for an existing Receiver
|
||||||
gotk resume rcv main
|
gotk resume receiver main
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user