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 ChannelRef
- type ChannelTypeFlags
- type PodSpecFlags
- type ResourceFlags
- 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 ChannelRef ¶ added in v0.17.1
type ChannelRef struct {
Cref string
}
func (*ChannelRef) Add ¶ added in v0.17.1
func (i *ChannelRef) Add(f *pflag.FlagSet)
Add sets channel reference flag definition to given flagset
func (*ChannelRef) Parse ¶ added in v0.17.1
func (i *ChannelRef) Parse() (*corev1.ObjectReference, error)
Parse parses the CLI value for channel ref flag and populates object reference or return error
type ChannelTypeFlags ¶ added in v0.17.0
type ChannelTypeFlags struct {
// contains filtered or unexported fields
}
func (*ChannelTypeFlags) Add ¶ added in v0.17.0
func (i *ChannelTypeFlags) Add(f *pflag.FlagSet)
Add sets channel type flag definition to given flagset
func (*ChannelTypeFlags) Parse ¶ added in v0.17.0
func (i *ChannelTypeFlags) Parse() (*schema.GroupVersionKind, error)
Parse parses the CLI value for channel type flag and populates GVK or returns error
type PodSpecFlags ¶ added in v0.17.0
type PodSpecFlags struct { // Direct field manipulation Image uniqueStringArg Env []string EnvFrom []string Mount []string Volume []string Command string Arg []string RequestsFlags, LimitsFlags ResourceFlags // TODO: Flag marked deprecated in release v0.15.0, remove in release v0.18.0 Resources ResourceOptions Port string ServiceAccountName string ImagePullSecrets string User int64 }
PodSpecFlags to hold the container resource requirements values
type ResourceFlags ¶ added in v0.17.0
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