Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdMigrate ¶
NewCmdMigrate returns a cobra command for updating resources in an apiserver to force a new storage version to be used.
Types ¶
type Migrator ¶
type Migrator struct { // Client used for API interactions Client client.Client // If true, skip checking the 'status.storedVersion' before running the migration. // By default, migration will only be run if the CRD contains storedVersions other // than the desired target version. SkipStoredVersionCheck bool // Writers to write informational & error messages to Out, ErrOut io.Writer }
func NewMigrator ¶
func NewMigrator(client client.Client, skipStoredVersionCheck bool, out, errOut io.Writer) *Migrator
NewMigrator creates a new migrator with the given API client. If either of out or errOut are nil, log messages will be discarded.
func (*Migrator) Run ¶
Run begins the migration of all the named CRDs. It will attempt to migrate all resources defined as part of these CRDs to the given 'targetVersion', and after completion will update the `status.storedVersions` field on the corresponding CRD version to only contain the given targetVersion. Returns 'true' if a migration was actually performed, and false if migration was not required.
type Options ¶
type Options struct { genericclioptions.IOStreams *factory.Factory // contains filtered or unexported fields }
Options is a struct to support renew command
func NewOptions ¶
func NewOptions(ioStreams genericclioptions.IOStreams) *Options
NewOptions returns initialized Options
func (*Options) Complete ¶
Complete takes the command arguments and factory and infers any remaining options.