migrate

package
v1.9.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMigratedOverview added in v1.7.1

func CreateMigratedOverview(reportSet *ReportSet) *tview.TreeView

func ProcessOperatorOutput added in v1.7.1

func ProcessOperatorOutput(
	migratedResources *Resources,
	operatorOutput []*pipeline.ObjectChange,
	scheme *runtime.Scheme,
) error

func PromptDiffingChanges added in v1.7.1

func PromptDiffingChanges(
	reports *ReportSet,
	warnings map[string][]*Warning,
	currentOverview *tview.TreeView,
	migratedOverview *tview.TreeView,
	prompter common.Prompter,
) error

func Setup

func Setup(parent *cobra.Command, s *cli.SetupContext)

Types

type CapsuleName added in v1.7.2

type CapsuleName string
const (
	CapsuleNameService    CapsuleName = "service"
	CapsuleNameDeployment CapsuleName = "deployment"
	CapsuleNameInput      CapsuleName = "input"
)

func (*CapsuleName) Set added in v1.7.2

func (c *CapsuleName) Set(v string) error

Set must have pointer receiver so it doesn't change the value of a copy

func (*CapsuleName) String added in v1.7.2

func (c *CapsuleName) String() string

String is used both by fmt.Print and by Cobra in help text

func (*CapsuleName) Type added in v1.7.2

func (c *CapsuleName) Type() string

Type is only used in help text

type Cmd added in v1.7.4

type Cmd struct {
	fx.In

	OperatorClient *base.OperatorClient
	K8s            client.Client
	K8sReader      client.Reader
	Scheme         *runtime.Scheme
	Prompter       common.Prompter
}

type Migration added in v1.8.0

type Migration struct {
	// contains filtered or unexported fields
}

type ReportSet added in v1.7.1

type ReportSet struct {
	// contains filtered or unexported fields
}

func NewReportSet added in v1.7.1

func NewReportSet(scheme *runtime.Scheme) *ReportSet

func (*ReportSet) AddReport added in v1.7.3

func (r *ReportSet) AddReport(original, proposal client.Object, reportName string) error

func (*ReportSet) GetKind added in v1.7.1

func (r *ReportSet) GetKind(kind string) (map[string]*dyff.Report, bool)

func (*ReportSet) GetKinds added in v1.7.1

func (r *ReportSet) GetKinds() []string

type Resources added in v1.7.3

type Resources struct {
	Deployment     *appsv1.Deployment
	ServiceAccount *corev1.ServiceAccount
	Capsule        *v1alpha2.Capsule
	HPA            *autoscalingv2.HorizontalPodAutoscaler
	Service        *corev1.Service
	ConfigMaps     map[string]*corev1.ConfigMap
	Secrets        map[string]*corev1.Secret
	Ingresses      map[string]*netv1.Ingress
	CronJobs       map[string]*batchv1.CronJob
}

func NewResources added in v1.7.3

func NewResources() *Resources

func (*Resources) AddObject added in v1.7.3

func (r *Resources) AddObject(kind, name string, object client.Object) error

func (*Resources) All added in v1.8.2

func (r *Resources) All() []client.Object

func (*Resources) Compare added in v1.7.3

func (r *Resources) Compare(other *Resources, scheme *runtime.Scheme) (*ReportSet, error)

func (*Resources) CreateOverview added in v1.7.3

func (r *Resources) CreateOverview(title string) *tview.TreeView

func (*Resources) ToYAML added in v1.7.3

func (r *Resources) ToYAML(scheme *runtime.Scheme) (map[string]map[string]string, error)

type Warning added in v1.7.1

type Warning struct {
	Kind       string
	Name       string
	Field      string
	Warning    string
	Suggestion string
}

func (*Warning) String added in v1.7.1

func (w *Warning) String() string

Jump to

Keyboard shortcuts

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