Documentation ¶
Index ¶
- func AddDryRunFlag(cmd *cobra.Command)
- func FlagString(cmd *cobra.Command, flag string) string
- func FlagStringArray(cmd *cobra.Command, flag string) []string
- func PrintFlagsWithDryRunStrategy(printFlags *genericclioptions.PrintFlags, dryRunStrategy DryRunStrategy) error
- type ClientGetter
- type DryRunStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDryRunFlag ¶
AddDryRunFlag adds dry-run flag to a command.
func PrintFlagsWithDryRunStrategy ¶
func PrintFlagsWithDryRunStrategy(printFlags *genericclioptions.PrintFlags, dryRunStrategy DryRunStrategy) error
PrintFlagsWithDryRunStrategy sets a success message at print time for the dry run strategy
Types ¶
type ClientGetter ¶
type ClientGetter interface { genericclioptions.RESTClientGetter KueueClientSet() (versioned.Interface, error) K8sClientSet() (k8s.Interface, error) NewResourceBuilder() *resource.Builder }
func NewClientGetter ¶
func NewClientGetter(clientGetter genericclioptions.RESTClientGetter) ClientGetter
type DryRunStrategy ¶
type DryRunStrategy int
const ( // DryRunNone indicates the client will make all mutating calls DryRunNone DryRunStrategy = iota // DryRunClient or client-side dry-run, indicates the client will prevent // making mutating calls such as CREATE, PATCH, and DELETE DryRunClient // DryRunServer or server-side dry-run, indicates the client will send // mutating calls to the APIServer with the dry-run parameter to prevent // persisting changes. // // Note that clients sending server-side dry-run calls should verify that // the APIServer and the resource supports server-side dry-run, and otherwise // clients should fail early. // // If a client sends a server-side dry-run call to an APIServer that doesn't // support server-side dry-run, then the APIServer will persist changes inadvertently. DryRunServer )
func GetDryRunStrategy ¶
func GetDryRunStrategy(cmd *cobra.Command) (DryRunStrategy, error)
Click to show internal directories.
Click to hide internal directories.