The file promoter copies files from source GCS buckets to one or more
destination buckets, by reading a Manifest
file (in YAML).
The Manifest
lists the files and their hashes that should be copied from src to
dest.
Example Manifest
for files:
filestores:
- base: gs://staging/
src: true
- base: gs://prod/subdir
service-account: foo@google-containers.iam.gserviceaccount.com
files:
- name: vegetables/artichoke
sha256: 2d4f26491e0e470236f73a0b8d6828db017eab988cd102fc19afe31f1f56aff7
- name: vegetables/beetroot
sha256: 160b98e27ec99f77efe01e2996fa386f2b2aec552599f8bd861be0a857e7f29f
filestores
is the equivalent of the container manifest registries
, and lists
the buckets from which the promoter should read or write files. files
is the
equivalent of images
, and lists the files that should be promoted.
filestores
supports service-account
, and it also supports relative paths -
note that the source files in the example above are in the root of the bucket,
but they are copied into a subdirectory of the target bucket.
files
is a list of files to be copied. The name
is appended to the base of
the filestore, and then the files are copied. If the source file does not have
the matching sha256, it will not be copied.
When errors are encountered building the list of files to be copied, no files will be copied. When errors are encountered while copying files, we will still attempt to copy remaining files, but the process will report the error.
Currently only Google Cloud Storage (GCS) buckets supported, with a prefix of
gs://
$ kpromo run files --help
Promote files from a staging object store to production
Usage:
kpromo run files [flags]
Flags:
--confirm initiate a PRODUCTION artifact promotion
--files files path to the files manifest
--filestores filestores path to the filestores promoter manifest
-h, --help help for files
--manifests string path to manifests for multiple projects
--use-service-account allow service account usage with gcloud calls
Global Flags:
--log-level string the logging verbosity, either 'panic', 'fatal', 'error', 'warning', 'info', 'debug', 'trace' (default "info")
This tool will generate a manifest fragment for uploading a set of files, located in the specified path.
It takes a single argument --src
, which is the base of the directory
tree; all files under that directory (recursively) are hashed and
output into the files
section of a manifest.
The manifest is written to stdout.
$ kpromo manifest files --help
Promote files from a staging object store to production
Usage:
kpromo manifest files [flags]
Flags:
-h, --help help for files
--prefix string only export files starting with the provided prefix
--src string the base directory to copy from
Global Flags:
--log-level string the logging verbosity, either 'panic', 'fatal', 'error', 'warning', 'info', 'debug', 'trace' (default "info")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。