github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/site/reference/cli/live/init/README.md (about) 1 --- 2 title: "`init`" 3 linkTitle: "init" 4 type: docs 5 description: > 6 Initialize a package with the information needed for inventory tracking. 7 --- 8 9 <!--mdtogo:Short 10 Initialize a package with the information needed for inventory tracking. 11 --> 12 13 `init` initializes the package with the name, namespace and id of the resource 14 that will keep track of the package inventory. 15 16 ### Synopsis 17 18 <!--mdtogo:Long--> 19 20 ``` 21 kpt live init [PKG_PATH] [flags] 22 ``` 23 24 #### Args 25 26 ``` 27 PKG_PATH: 28 Path to the local package which should be updated with inventory information. 29 It must contain a Kptfile. Defaults to the current working directory. 30 ``` 31 32 #### Flags 33 34 ``` 35 --force: 36 Forces the inventory values to be updated, even if they are already set. 37 Defaults to false. 38 39 --inventory-id: 40 Inventory identifier for the package. This is used to detect overlap between 41 packages that might use the same name and namespace for the inventory object. 42 Defaults to an auto-generated value. 43 44 --name: 45 The name for the ResourceGroup resource that contains the inventory 46 for the package. Defaults to the name of the package. 47 48 --namespace: 49 The namespace for the ResourceGroup resource that contains the inventory 50 for the package. If not provided, kpt will check if all the resources 51 in the package belong in the same namespace. If they do, that namespace will 52 be used. If they do not, the namespace in the user's context will be chosen. 53 54 --rg-file: 55 The name used for the file created for the ResourceGroup CR. Defaults to 56 'resourcegroup.yaml'. 57 ``` 58 59 <!--mdtogo--> 60 61 ### Examples 62 63 <!--mdtogo:Examples--> 64 65 ```shell 66 # initialize a package in the current directory. 67 $ kpt live init 68 ``` 69 70 ```shell 71 # initialize a package with explicit namespace for the ResourceGroup. 72 $ kpt live init --namespace=test my-dir 73 ``` 74 75 <!--mdtogo-->