Documentation
¶
Index ¶
- func AddBothBoolFlags(f *pflag.FlagSet, p *bool, name, short string, value bool, usage string)
- func AddBothBoolFlagsUnhidden(f *pflag.FlagSet, p *bool, name, short string, value bool, usage string)
- func FirstCharToLower(s string) string
- func InvertUsage(usage string) string
- func ReconcileBoolFlags(f *pflag.FlagSet) error
- type ResourceOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBothBoolFlags ¶
AddBothBoolFlags adds the given flag in both `--foo` and `--no-foo` variants. If you do this, make sure you call ReconcileBoolFlags later to catch errors and set the relationship between the flag values. Only the flag that does the non-default behavior is visible; the other is hidden.
func AddBothBoolFlagsUnhidden ¶
func AddBothBoolFlagsUnhidden(f *pflag.FlagSet, p *bool, name, short string, value bool, usage string)
AddBothBoolFlagsUnhidden is just like AddBothBoolFlags but shows both flags.
func FirstCharToLower ¶ added in v0.13.2
FirstCharToLower converts first char in given string to lowercase
func InvertUsage ¶ added in v0.13.2
InvertUsage inverts the usage string with prefix "Do not"
func ReconcileBoolFlags ¶
ReconcileBoolFlags sets the value of the all the "--foo" flags based on "--no-foo" if provided, and returns an error if both were provided or an explicit value of false was provided to either (as that's confusing).
Types ¶
type ResourceOptions ¶ added in v0.15.0
type ResourceOptions struct { Requests string Limits string ResourceRequirements corev1.ResourceRequirements }
ResourceOptions to hold the container resource requirements values
func (*ResourceOptions) Validate ¶ added in v0.15.0
func (o *ResourceOptions) Validate() (err error)
Validate parses the limits and requests parameters if specified and sets ResourceRequirements for ResourceOptions or returns error if any