Skip to content

myks migrate

Seed a KCL configuration tree from the legacy ytt data-values files.
The converter writes kcl.mod, main.k, one env.k per environment-tree level and
one file per application per level: plain-YAML data-values files are converted in
place on the level structure, the application roster is generated from the resolved
environment data, and values produced by ytt logic are frozen as literals in
leaf-level patches marked with TODO comments.
The legacy files are left untouched; with kcl.mod present, myks switches to the
KCL path and ignores them. Re-running needs --force, which reads the legacy files
again and overwrites the generated ones; hand-written KCL is lost, so keep the
conversion under version control. Verify the conversion by rendering and diffing the
rendered/ output, hand-finish following the migration guide, then delete the legacy
data-values files: https://mykso.github.io/myks/guides/migration/
Usage:
myks migrate [flags]
Flags:
--force re-run the conversion over an already converted repo, overwriting the generated KCL files
-h, --help help for migrate
--schema-package string myks KCL schema package to depend on: an oci:// reference or a local path (default "oci://ghcr.io/mykso/myks")
Global Flags:
-a, --async int sets the number of applications to be processed in parallel
the default (0) is no limit
--buffer-plugin-output buffer plugin output instead of streaming (useful for parallel execution)
--config string config file (default is the first .myks.yaml up the directory tree)
-l, --log-level string set the logging level (default "info")
--print-stats print tool resource statistics directly to stdout
--smart-mode.base-revision string base revision to compare against in Smart Mode
if not provided, only local changes will be considered
--smart-mode.only-print string[="text"] only print the list of environments and applications that would be rendered in Smart Mode
accepted values: "text" (default), "json"
legacy boolean values (true, 1, yes) are treated as "text" for backward compatibility
legacy falsey values (false, 0, no) disable Smart Mode only-print (same as leaving it empty)
when used without a value (--smart-mode.only-print), defaults to "text"