Documentation
¶
Overview ¶
pkg/migrate/generator.go
Generates the Orkestra scaffolding files that accompany a migrated reconciler: katalog.yaml, simulate.yaml, e2e.yaml, and go.mod.
All generated files are stubs with TODO markers. The user fills in CRD details (group, kind, location) and resource assertions.
pkg/migrate/migrate.go
Rewrites a controller-runtime Reconcile method to the Orkestra constructor signature. It is intentionally a starting point — the output compiles but still requires review for status updates, event recording, and informer cache lookups.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Files ¶
type Files struct {
Katalog string
Simulate string
E2E string
GoMod string
Makefile string
Dockerfile string
README string
}
Files holds all generated file contents keyed by filename.
type Options ¶
type Options struct {
// ModulePath is the Go module path of the migrated operator (e.g. github.com/myorg/my-operator).
// Used in go.mod and as a hint in katalog.yaml location fields.
ModulePath string
// OperatorName is the kebab-case name for the operator (e.g. webapp-operator).
// Derived from ReceiverType if not set.
OperatorName string
// OrkVersion is the Orkestra CLI version (from pkg/version.Short()).
// Written into go.mod as the orkestra require version.
OrkVersion string
}
Options controls what the generator emits.
type Result ¶
type Result struct {
// Source is the rewritten Go source, gofmt-formatted.
Source []byte
// ReceiverType is the struct name from the Reconcile receiver (e.g. "WebAppReconciler").
ReceiverType string
// PkgName is the Go package name of the source file.
PkgName string
// Warnings are patterns flagged but not automatically rewritten.
Warnings []string
}
Result holds the output of a migration rewrite.