{"modulePath":"github.com/GoogleContainerTools/kpt","version":"v0.39.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package pkgdocs\n\nCode generated by \"mdtogo\"; DO NOT EDIT.\n\n## Variables\n\n```go\nvar DescExamples = `\n  # display description for the local hello-world package\n  kpt pkg desc hello-world/\n`\n```\n\n```go\nvar DescLong = `\n  kpt pkg desc DIR\n  \n  DIR:\n    Path to a package directory\n`\n```\n\n```go\nvar DescShort = `Display upstream package metadata`\n```\n\n```go\nvar DiffExamples = `\n  # Show changes in current package relative to upstream source package\n  kpt pkg diff\n\n  # Show changes in current package relative to upstream source package\n  # using meld tool with auto compare option.\n  kpt pkg diff --diff-tool meld --diff-tool-opts \"-a\"\n\n  # Show changes in upstream source package between current version and\n  # target version\n  kpt pkg diff @v4.0.0 --diff-type remote\n\n  # Show changes in current package relative to target version\n  kpt pkg diff @v4.0.0 --diff-type combined\n\n  # Show 3way changes between the local package, upstream package at original\n  # version and upstream package at target version using meld\n  kpt pkg diff @v4.0.0 --diff-type 3way --diff-tool meld --diff-tool-opts \"-a\"\n`\n```\n\n```go\nvar DiffLong = `\n  kpt pkg diff [DIR@VERSION]\n\nArgs:\n\n  DIR:\n    Local package to compare. Command will fail if the directory doesn't exist, or does not\n    contain a Kptfile.  Defaults to the current working directory.\n  \n  VERSION:\n    A git tag, branch, ref or commit. Specified after the local_package with @ -- pkg_dir@version.\n    Defaults to the local package version that was last fetched.\n\nFlags:\n\n  --diff-type:\n    The type of changes to view (local by default). Following types are\n    supported:\n  \n    local: shows changes in local package relative to upstream source package\n           at original version\n    remote: shows changes in upstream source package at target version\n            relative to original version\n    combined: shows changes in local package relative to upstream source\n              package at target version\n    3way: shows changes in local package and source package at target version\n          relative to original version side by side\n  \n  --diff-tool:\n    Commandline tool (diff by default) for showing the changes.\n    Note that it overrides the KPT_EXTERNAL_DIFF environment variable.\n    \n    # Show changes using 'meld' commandline tool\n    kpt pkg diff @master --diff-tool meld\n  \n  --diff-tool-opts:\n    Commandline options to use with the diffing tool.\n    Note that it overrides the KPT_EXTERNAL_DIFF_OPTS environment variable.\n    # Show changes using \"diff\" with recurive options\n    kpt pkg diff @master --diff-tool meld --diff-tool-opts \"-r\"\n\nEnvironment Variables:\n\n  KPT_EXTERNAL_DIFF:\n     Commandline diffing tool (diff by default) that will be used to show\n     changes.\n     # Use meld to show changes\n     KPT_EXTERNAL_DIFF=meld kpt pkg diff\n  \n  KPT_EXTERNAL_DIFF_OPTS:\n     Commandline options to use for the diffing tool. For ex.\n     # Using \"-a\" diff option\n     KPT_EXTERNAL_DIFF_OPTS=\"-a\" kpt pkg diff --diff-tool meld\n`\n```\n\n```go\nvar DiffShort = `Diff a local package against upstream`\n```\n\n```go\nvar FixExamples = `\n  # print the fixes which will be made to the package without actually modifying\n  # resources\n  kpt pkg fix . --dry-run\n\n  # fix the package if it is using deprecated features\n  kpt pkg fix .\n`\n```\n\n```go\nvar FixLong = `\n  kpt pkg fix LOCAL_PKG_DIRECTORY [flags]\n  \n  Args:\n    LOCAL_PKG_DIRECTORY:\n      Local directory with kpt package. Directory must exist and\n      contain a Kptfile.\n  \n  Flags:\n    --dry-run\n      if set, the fix command shall only print the fixes which will be made to the\n      package without actually fixing/modifying the resources.\n  \n`\n```\n\n```go\nvar FixShort = `Fix a local package which is using deprecated features.`\n```\n\n```go\nvar GetExamples = `\n  # fetch package cockroachdb from github.com/kubernetes/examples/staging/cockroachdb\n  # creates directory ./cockroachdb/ containing the package contents\n  kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master ./\n\n  # fetch a cockroachdb\n  # if ./my-package doesn't exist, creates directory ./my-package/ containing\n  # the package contents\n  kpt pkg get https://github.com/kubernetes/examples.git/staging/cockroachdb@master ./my-package/\n\n  # fetch package examples from github.com/kubernetes/examples\n  # creates directory ./examples fetched from the provided commit\n  kpt pkg get https://github.com/kubernetes/examples.git/@[COMMIT_HASH] ./\n`\n```\n\n```go\nvar GetLong = `\n  kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] LOCAL_DEST_DIRECTORY [flags]\n  \n  REPO_URI:\n    URI of a git repository containing 1 or more packages as subdirectories.\n    In most cases the .git suffix should be specified to delimit the REPO_URI\n    from the PKG_PATH, but this is not required for widely recognized repo\n    prefixes.  If get cannot parse the repo for the directory and version,\n    then it will print an error asking for '.git' to be specified as part of\n    the argument.\n    e.g. https://github.com/kubernetes/examples.git\n    Specify - to read Resources from stdin and write to a LOCAL_DEST_DIRECTORY\n  \n  PKG_PATH:\n    Path to remote subdirectory containing Kubernetes resource configuration\n    files or directories. Defaults to the root directory.\n    Uses '/' as the path separator (regardless of OS).\n    e.g. staging/cockroachdb\n  \n  VERSION:\n    A git tag, branch, ref or commit for the remote version of the package\n    to fetch.  Defaults to the repository master branch.\n    e.g. @master\n  \n  LOCAL_DEST_DIRECTORY:\n    The local directory to write the package to.\n    e.g. ./my-cockroachdb-copy\n  \n      * If the directory does NOT exist: create the specified directory\n        and write the package contents to it\n      * If the directory DOES exist: create a NEW directory under the\n        specified one, defaulting the name to the Base of REPO/PKG_PATH\n      * If the directory DOES exist and already contains a directory with\n        the same name of the one that would be created: fail\n`\n```\n\n```go\nvar GetShort = `Fetch a package from a git repo.`\n```\n\n```go\nvar InitExamples = `\n  # writes Kptfile package meta if not found\n  mkdir my-pkg\n  kpt pkg init my-pkg --tag kpt.dev/app=cockroachdb \\\n      --description \"my cockroachdb implementation\"\n`\n```\n\n```go\nvar InitLong = `\n  kpt pkg init DIR [flags]\n\nArgs:\n\n  DIR:\n    Init fails if DIR does not already exist\n\nFlags:\n\n  --description\n    short description of the package. (default \"sample description\")\n  \n  --name\n    package name.  defaults to the directory base name.\n  \n  --tag\n    list of tags for the package.\n  \n  --url\n    link to page with information about the package.\n`\n```\n\n```go\nvar InitShort = `Initialize an empty package`\n```\n\n```go\nvar PkgExamples = `\n  # create your workspace\n  $ mkdir hello-world-workspace\n  $ cd hello-world-workspace\n  $ git init\n  \n  # get the package\n  $ export SRC_REPO=https://github.com/GoogleContainerTools/kpt.git\n  $ kpt pkg get $SRC_REPO/package-examples/helloworld-set@v0.3.0 helloworld\n  \n  # add helloworld to your workspace\n  $ git add .\n  $ git commit -am \"Add hello world to my workspace.\"\n  \n  # pull in upstream updates by merging Resources\n  $ kpt pkg update helloworld@v0.5.0 --strategy=resource-merge\n`\n```\n\n```go\nvar PkgLong = `\n|              Reads From | Writes To                |\n|-------------------------|--------------------------|\n| git repository          | local directory          |\n\nThe ` + \"`\" + `pkg` + \"`\" + ` command group contains subcommands which read remote upstream\ngit repositories, and write local directories.  They are focused on\nproviding porcelain on top of workflows which would otherwise require\nwrapping git to pull clone subdirectories and perform updates by merging\nresources rather than files.\n`\n```\n\n```go\nvar PkgShort = `Fetch, update, and sync configuration files using git`\n```\n\n```go\nvar SetExamples = `\nCreate a new package and add a dependency to it:\n\n  # init a package so it can be synced\n  kpt pkg init\n  \n  # add a dependency to the package\n  kpt pkg sync set https://github.com/GoogleContainerTools/kpt.git/package-examples/helloworld-set \\\n      hello-world\n  \n  # sync the dependencies\n  kpt pkg sync .\n\nUpdate an existing package dependency:\n\n  # add a dependency to an existing package\n  kpt pkg sync set https://github.com/GoogleContainerTools/kpt.git/package-examples/helloworld-set@v0.2.0 \\\n      hello-world --strategy=resource-merge\n`\n```\n\n```go\nvar SetLong = `\n  kpt pkg set REPO_URI[.git]/PKG_PATH[@VERSION] LOCAL_DEST_DIRECTORY [flags]\n  \n  REPO_URI:\n    URI of a git repository containing 1 or more packages as subdirectories.\n    In most cases the .git suffix should be specified to delimit the REPO_URI\n    from the PKG_PATH, but this is not required for widely recognized repo\n    prefixes.  If get cannot parse the repo for the directory and version,\n    then it will print an error asking for '.git' to be specified as part of\n    the argument.\n    e.g. https://github.com/kubernetes/examples.git\n    Specify - to read Resources from stdin and write to a LOCAL_DEST_DIRECTORY\n  \n  PKG_PATH:\n    Path to remote subdirectory containing Kubernetes Resource configuration\n    files or directories.  Defaults to the root directory.\n    Uses '/' as the path separator (regardless of OS).\n    e.g. staging/cockroachdb\n  \n  VERSION:\n    A git tag, branch, ref or commit for the remote version of the package to\n    fetch.  Defaults to the repository master branch.\n    e.g. @master\n  \n  LOCAL_DEST_DIRECTORY:\n    The local directory to write the package to. e.g. ./my-cockroachdb-copy\n  \n      * If the directory does NOT exist: create the specified directory and write\n        the package contents to it\n      * If the directory DOES exist: create a NEW directory under the specified one,\n        defaulting the name to the Base of REPO/PKG_PATH\n      * If the directory DOES exist and already contains a directory with the same name\n        of the one that would be created: fail\n\nFlags:\n\n  --strategy:\n    Controls how changes to the local package are handled.\n    Defaults to fast-forward.\n  \n      * resource-merge: perform a structural comparison of the original /\n        updated Resources, and merge the changes into the local package.\n        See ` + \"`\" + `kpt help apis merge3` + \"`\" + ` for details on merge.\n      * fast-forward: fail without updating if the local package was modified\n        since it was fetched.\n      * alpha-git-patch: use 'git format-patch' and 'git am' to apply a\n        patch of the changes between the source version and destination\n        version.\n        REQUIRES THE LOCAL PACKAGE TO HAVE BEEN COMMITTED TO A LOCAL GIT REPO.\n      * force-delete-replace: THIS WILL WIPE ALL LOCAL CHANGES TO\n        THE PACKAGE.  DELETE the local package at local_pkg_dir/ and replace\n        it with the remote version.\n`\n```\n\n```go\nvar SetShort = `Add a sync dependency to a Kptfile`\n```\n\n```go\nvar SyncExamples = `\n  # print the dependencies that would be modified\n  kpt pkg sync . --dry-run\n\n  # sync the dependencies\n  kpt pkg sync .\n`\n```\n\n```go\nvar SyncLong = `\n  kpt pkg sync LOCAL_PKG_DIR [flags]\n  \n  LOCAL_PKG_DIR:\n    Local package with dependencies to sync.  Directory must exist and\n    contain a Kptfile.\n\nEnv Vars:\n\n  KPT_CACHE_DIR:\n    Controls where to cache remote packages during updates.\n    Defaults to ~/.kpt/repos/\n`\n```\n\n```go\nvar SyncShort = `Fetch and update packages declaratively`\n```\n\n```go\nvar UpdateExamples = `\n  # update my-package-dir/\n  git add . \u0026\u0026 git commit -m 'some message'\n  kpt pkg update my-package-dir/\n\n  # update my-package-dir/ to match the v1.3 branch or tag\n  git add . \u0026\u0026 git commit -m 'some message'\n  kpt pkg update my-package-dir/@v1.3\n\n  # update applying a git patch\n  git add . \u0026\u0026 git commit -m \"package updates\"\n  kpt pkg  update my-package-dir/@master --strategy alpha-git-patch\n`\n```\n\n```go\nvar UpdateLong = `\n  kpt pkg update LOCAL_PKG_DIR[@VERSION] [flags]\n\nArgs:\n\n  LOCAL_PKG_DIR:\n    Local package to update.  Directory must exist and contain a Kptfile\n    to be updated.\n  \n  VERSION:\n    A git tag, branch, ref or commit.  Specified after the local_package\n    with @ -- pkg@version.\n    Defaults the local package version that was last fetched.\n  \n    Version types:\n      * branch: update the local contents to the tip of the remote branch\n      * tag: update the local contents to the remote tag\n      * commit: update the local contents to the remote commit\n\nFlags:\n\n  --strategy:\n    Controls how changes to the local package are handled.  Defaults to fast-forward.\n  \n      * resource-merge: perform a structural comparison of the original /\n        updated Resources, and merge the changes into the local package.\n      * fast-forward: fail without updating if the local package was modified\n        since it was fetched.\n      * alpha-git-patch: use 'git format-patch' and 'git am' to apply a\n        patch of the changes between the source version and destination\n        version.\n      * force-delete-replace: WIPE ALL LOCAL CHANGES TO THE PACKAGE.\n        DELETE the local package at local_pkg_dir/ and replace it\n        with the remote version.\n  \n  -r, --repo:\n    Git repo url for updating contents.  Defaults to the repo the package\n    was fetched from.\n  \n  --dry-run\n    Print the 'alpha-git-patch' strategy patch rather than merging it.\n\nEnv Vars:\n\n  KPT_CACHE_DIR:\n    Controls where to cache remote packages when fetching them to update\n    local packages.\n    Defaults to ~/.kpt/repos/\n`\n```\n\n```go\nvar UpdateShort = `Apply upstream package updates`\n```\n\n","path":"github.com/GoogleContainerTools/kpt/internal/docs/generated/pkgdocs","name":"pkgdocs","synopsis":"Code generated by \"mdtogo\"; DO NOT EDIT.","isRedistributable":true}
