github.com/SamarSidharth/kpt@v0.0.0-20231122062228-c7d747ae3ace/site/reference/cli/live/migrate/README.md (about)

     1  ---
     2  title: "`migrate`"
     3  linkTitle: "migrate"
     4  type: docs
     5  description: >
     6  Migrate a package and the inventory object to use the ResourceGroup CRD.
     7  ---
     8  
     9  <!--mdtogo:Short
    10      Migrate a package and the inventory object to use the ResourceGroup CRD.
    11  -->
    12  
    13  `migrate` moves the inventory list, which contains the Group, Kind, Name and
    14  Namespace for every resource in the cluster that belongs to a package, into a
    15  `ResourceGroup` CR and moves the inventory information into the a `ResourceGroup`
    16  manifest on local disk.
    17  
    18  0.39.x or earlier versions of `kpt` stored the inventory metadata in a
    19  `ConfigMap` manifest in the package, and stored the inventory list in a
    20  `ConfigMap` resource in the cluster. Running this command will move the
    21  metadata into a `ResourceGroup` manifest in the `resourcegroup.yaml` file
    22  and move the inventory list into a `ResourceGroup` CR.
    23  
    24  Previous 1.0.0-alpha or 1.0.0-beta versions of kpt would store the inventory
    25  metadata in the `Kptfile`. Running this command will move the metadata from
    26  the `Kptfile` in a `ResourceGroup` manifest in the `resourcegroup.yaml` file.
    27  
    28  
    29  ### Synopsis
    30  
    31  <!--mdtogo:Long-->
    32  
    33  ```
    34  kpt live migrate [PKG_PATH] [flags]
    35  ```
    36  
    37  #### Args
    38  
    39  ```
    40  PKG_PATH:
    41    Path to the local package. It must have a Kptfile and inventory metadata
    42    in the package in either the ConfigMap, Kptfile or ResourceGroup format.
    43    It defaults to the current directory.
    44  ```
    45  
    46  #### Flags
    47  
    48  ```
    49  --dry-run:
    50    Go through the steps of migration, but don't make any changes.
    51  
    52  --force:
    53    Forces the inventory values in the ResourceGroup manfiest to be updated,
    54    even if they are already set. Defaults to false.
    55  
    56  --name:
    57    The name for the ResourceGroup resource that contains the inventory
    58    for the package. Defaults to the same name as the existing inventory
    59    object.
    60  
    61  --namespace:
    62    The namespace for the ResourceGroup resource that contains the inventory
    63    for the package. If not provided, it defaults to the same namespace as the
    64    existing inventory object.
    65  ```
    66  
    67  <!--mdtogo-->
    68  
    69  ### Examples
    70  
    71  <!--mdtogo:Examples-->
    72  
    73  ```shell
    74  # Migrate the package in the current directory.
    75  $ kpt live migrate
    76  ```
    77  
    78  <!--mdtogo-->