delete

package
v2.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: "Delete Aperture Policies",
	Long: `
Use this command to delete the Aperture Policies.`,
	SilenceErrors: true,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		if policyName == "" {
			return errors.New("policy name is required")
		}

		var err error
		err = controller.PreRunE(cmd, args)
		if err != nil {
			return fmt.Errorf("failed to run controller pre-run: %w", err)
		}

		controllerNs = utils.GetControllerNs()

		client, err = controller.PolicyClient()
		if err != nil {
			return fmt.Errorf("failed to get controller client: %w", err)
		}
		return nil
	},
	PersistentPostRun: controller.PostRun,
}

DeleteCmd is the command to delete a policy from the cluster.

View Source
var DeletePolicyCmd = &cobra.Command{
	Use:           "policy",
	Short:         "Delete Aperture Policy from the cluster",
	Long:          `Use this command to delete the Aperture Policy from the cluster.`,
	SilenceErrors: true,
	Example:       `aperturectl delete policy --policy=rate-limiting`,
	RunE: func(_ *cobra.Command, _ []string) error {
		return deletePolicy()
	},
}

DeletePolicyCmd is the command to delete a policy from the cluster.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL