github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/internal/docs/generated/pkgdocs/docs.go (about) 1 // Code generated by "mdtogo"; DO NOT EDIT. 2 package pkgdocs 3 4 var PkgShort = `Get, update, and describe packages with resources` 5 var PkgLong = ` 6 The ` + "`" + `pkg` + "`" + ` command group contains subcommands for fetching, updating and describing ` + "`" + `kpt` + "`" + ` packages 7 from git repositories. 8 ` 9 10 var CatShort = `Print the resources in a file/directory` 11 var CatLong = ` 12 kpt pkg cat [FILE | DIR] 13 14 Args: 15 16 FILE | DIR: 17 Path to a directory either a directory containing files with KRM resources, or 18 a file with KRM resource(s). Defaults to the current directory. 19 ` 20 var CatExamples = ` 21 # Print resource from a file. 22 $ kpt pkg cat path/to/deployment.yaml 23 24 # Print resources from current directory. 25 $ kpt pkg cat 26 ` 27 28 var DiffShort = `Show differences between a local package and upstream.` 29 var DiffLong = ` 30 kpt pkg diff [PKG_PATH@VERSION] [flags] 31 32 Args: 33 34 PKG_PATH: 35 Local package path to compare. diff will fail if the directory doesn't exist, or does not 36 contain a Kptfile. Defaults to the current working directory. 37 38 VERSION: 39 A git tag, branch, or commit. Specified after the local_package with @, for 40 example my-package@master. 41 Defaults to the local package version that was last fetched. 42 43 Flags: 44 45 --diff-type: 46 The type of changes to view (local by default). Following types are 47 supported: 48 49 local: Shows changes in local package relative to upstream source package 50 at original version. 51 remote: Shows changes in upstream source package at target version 52 relative to original version. 53 combined: Shows changes in local package relative to upstream source 54 package at target version. 55 3way: Shows changes in local package and source package at target version 56 relative to original version side by side. 57 58 --diff-tool: 59 Command line diffing tool ('diff' by default) for showing the changes. 60 Note that it overrides the KPT_EXTERNAL_DIFF environment variable. 61 62 # Show changes using 'meld' commandline tool. 63 kpt pkg diff @master --diff-tool meld 64 65 --diff-tool-opts: 66 Commandline options to use with the command line diffing tool. 67 Note that it overrides the KPT_EXTERNAL_DIFF_OPTS environment variable. 68 69 # Show changes using the diff command with recursive options. 70 kpt pkg diff @master --diff-tool meld --diff-tool-opts "-r" 71 72 Environment Variables: 73 74 KPT_EXTERNAL_DIFF: 75 Commandline diffing tool ('diff; by default) that will be used to show 76 changes. 77 78 # Use meld to show changes 79 KPT_EXTERNAL_DIFF=meld kpt pkg diff 80 81 KPT_EXTERNAL_DIFF_OPTS: 82 Commandline options to use for the diffing tool. For ex. 83 # Using "-a" diff option 84 KPT_EXTERNAL_DIFF_OPTS="-a" kpt pkg diff --diff-tool meld 85 86 KPT_CACHE_DIR: 87 Controls where to cache remote packages when fetching them. 88 Defaults to <HOME>/.kpt/repos/ 89 On macOS and Linux <HOME> is determined by the $HOME env variable, while on 90 Windows it is given by the %USERPROFILE% env variable. 91 ` 92 var DiffExamples = ` 93 94 # Show changes in current package relative to upstream source package. 95 $ kpt pkg diff 96 ` 97 98 var GetShort = `Fetch a package from a git repo.` 99 var GetLong = ` 100 kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] [LOCAL_DEST_DIRECTORY] [flags] 101 102 Args: 103 104 REPO_URI: 105 URI of a git repository containing 1 or more packages as subdirectories. 106 In most cases the .git suffix should be specified to delimit the REPO_URI 107 from the PKG_PATH, but this is not required for widely recognized repo 108 prefixes. If get cannot parse the repo for the directory and version, 109 then it will print an error asking for '.git' to be specified as part of 110 the argument. 111 112 PKG_PATH: 113 Path to remote subdirectory containing Kubernetes resource configuration 114 files or directories. Defaults to the root directory. 115 Uses '/' as the path separator (regardless of OS). 116 e.g. staging/cockroachdb 117 118 VERSION: 119 A git tag, branch, ref or commit for the remote version of the package 120 to fetch. Defaults to the default branch of the repository. 121 122 LOCAL_DEST_DIRECTORY: 123 The local directory to write the package to. Defaults to a subdirectory of the 124 current working directory named after the upstream package. 125 126 Flags: 127 128 --strategy: 129 Defines which strategy should be used to update the package. It defaults to 130 'resource-merge'. 131 132 * resource-merge: Perform a structural comparison of the original / 133 updated resources, and merge the changes into the local package. 134 * fast-forward: Fail without updating if the local package was modified 135 since it was fetched. 136 * force-delete-replace: Wipe all the local changes to the package and replace 137 it with the remote version. 138 139 --for-deployment: 140 (Experimental) indicates if the fetched package is a deployable instance that 141 will be deployed to a cluster. 142 It is ` + "`" + `false` + "`" + ` by default. 143 144 Env Vars: 145 146 KPT_CACHE_DIR: 147 Controls where to cache remote packages when fetching them. 148 Defaults to <HOME>/.kpt/repos/ 149 On macOS and Linux <HOME> is determined by the $HOME env variable, while on 150 Windows it is given by the %USERPROFILE% env variable. 151 ` 152 var GetExamples = ` 153 154 # Fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb 155 # This creates a new subdirectory 'cockroachdb' for the downloaded package. 156 $ kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master 157 158 159 # Fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb 160 # This will create a new directory 'my-package' for the downloaded package if it 161 # doesn't already exist. 162 $ kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master ./my-package/ 163 164 165 # Fetch package examples from github.com/kubernetes/examples at the specified 166 # git hash. 167 # This will create a new directory 'examples' for the package. 168 $ kpt pkg get https://github.com/kubernetes/examples.git/@6fe2792 169 170 171 # Create a deployable instance of examples package from github.com/kubernetes/examples 172 # This will create a new directory 'examples' for the package. 173 $ kpt pkg get https://github.com/kubernetes/examples.git/@6fe2792 --for-deployment 174 ` 175 176 var InitShort = `Initialize an empty package.` 177 var InitLong = ` 178 kpt pkg init [DIR] [flags] 179 180 Args: 181 182 DIR: 183 init fails if DIR does not already exist. Defaults to the current working directory. 184 185 Flags: 186 187 --description 188 Short description of the package. (default "sample description") 189 190 --keywords 191 A list of keywords describing the package. 192 193 --site 194 Link to page with information about the package. 195 ` 196 var InitExamples = ` 197 198 # Creates a new Kptfile with metadata in the cockroachdb directory. 199 $ mkdir cockroachdb; kpt pkg init cockroachdb --keywords "cockroachdb,nosql,db" \ 200 --description "my cockroachdb implementation" 201 202 # Creates a new Kptfile without metadata in the current directory. 203 $ kpt pkg init 204 ` 205 206 var TreeShort = `Display resources, files and packages in a tree structure.` 207 var TreeLong = ` 208 kpt pkg tree [DIR] 209 ` 210 var TreeExamples = ` 211 # Show resources in the current directory. 212 $ kpt pkg tree 213 ` 214 215 var UpdateShort = `Apply upstream package updates.` 216 var UpdateLong = ` 217 kpt pkg update [PKG_PATH][@VERSION] [flags] 218 219 Args: 220 221 PKG_PATH: 222 Local package path to update. Directory must exist and contain a Kptfile 223 to be updated. Defaults to the current working directory. 224 225 VERSION: 226 A git tag, branch, ref or commit. Specified after the local_package 227 with @ -- pkg@version. 228 Defaults the ref specified in the Upstream section of the package Kptfile. 229 230 Version types: 231 * branch: update the local contents to the tip of the remote branch 232 * tag: update the local contents to the remote tag 233 * commit: update the local contents to the remote commit 234 235 Flags: 236 237 --strategy: 238 Defines which strategy should be used to update the package. This will change 239 the update strategy for the current kpt package for the current and future 240 updates. If a strategy is not provided, the strategy specified in the package 241 Kptfile will be used. 242 243 * resource-merge: Perform a structural comparison of the original / 244 updated resources, and merge the changes into the local package. 245 * fast-forward: Fail without updating if the local package was modified 246 since it was fetched. 247 * force-delete-replace: Wipe all the local changes to the package and replace 248 it with the remote version. 249 250 Env Vars: 251 252 KPT_CACHE_DIR: 253 Controls where to cache remote packages when fetching them. 254 Defaults to <HOME>/.kpt/repos/ 255 On macOS and Linux <HOME> is determined by the $HOME env variable, while on 256 Windows it is given by the %USERPROFILE% env variable. 257 ` 258 var UpdateExamples = ` 259 # Update package in the current directory. 260 # git add . && git commit -m 'some message' 261 $ kpt pkg update 262 263 # Update my-package-dir/ to match the v1.3 branch or tag. 264 # git add . && git commit -m 'some message' 265 $ kpt pkg update my-package-dir/@v1.3 266 267 # Update with the fast-forward strategy. 268 # git add . && git commit -m "some message" 269 $ kpt pkg update my-package-dir/@master --strategy fast-forward 270 `