Documentation
¶
Overview ¶
Package airgapped provides helper functions to download and upload plugin bundles
Index ¶
Constants ¶
const PluginBundleDirName = "plugin_bundle"
const PluginMigrationManifestFile = "plugin_migration_manifest.yaml"
Variables ¶
This section is empty.
Functions ¶
func GetImageRelativePath ¶
GetImageRelativePath returns the relative path of the image with respect to `basePath` E.g. If the image is `fake.repo.com/plugin/database/plugin-inventory:latest` with basePath as `fake.repo.com/plugin` it should return `database/plugin-inventory:latest` if withTag is true and `database/plugin-inventory` if withTag is false This function also supports tags in the form of digests (SHAs), e.g., fake.repo.com/plugin/database/vmware/tkg/darwin/amd64/mission-control/account@sha256:69dc17b84e77d0844c36c11f1191f47bb3cec4ca61e06950a3884e34b3ecb6eb
func GetPluginInventoryMetadataImage ¶
GetPluginInventoryMetadataImage returns the plugin inventory metadata image based on plugin inventory image. E.g. if plugin inventory image is `fake.repo.com/plugin/plugin-inventory:latest` it returns metadata image as `fake.repo.com/plugin/plugin-inventory-metadata:latest`
Types ¶
type DownloadPluginBundleOptions ¶
type DownloadPluginBundleOptions struct {
PluginInventoryImage string
ToTar string
Groups []string
Plugins []string
RefreshConfigOnly bool
DryRun bool
ImageProcessor carvelhelpers.ImageOperationsImpl
}
DownloadPluginBundleOptions defines options for downloading plugin bundle
func (*DownloadPluginBundleOptions) DownloadPluginBundle ¶
func (o *DownloadPluginBundleOptions) DownloadPluginBundle() error
DownloadPluginBundle download the plugin bundle based on provided plugin inventory image and save it as tar file
type ImageCopyInfo ¶
type ImageCopyInfo struct {
SourceTarFilePath string `yaml:"sourceTarFilePath"`
RelativeImagePath string `yaml:"relativeImagePath"`
}
ImageCopyInfo maps the relative image path and local relative file path
type ImagePublishInfo ¶
type ImagePublishInfo struct {
SourceFilePath string `yaml:"sourceFilePath"`
RelativeImagePathWithTag string `yaml:"relativeImagePathWithTag"`
}
ImagePublishInfo maps the relative image path and local relative file path
type PluginMigrationManifest ¶
type PluginMigrationManifest struct {
RelativeInventoryImagePathWithTag string `yaml:"relativeInventoryImagePathWithTag"`
InventoryMetadataImage *ImagePublishInfo `yaml:"inventoryMetadataImage"`
ImagesToCopy []*ImageCopyInfo `yaml:"imagesToCopy"`
}
PluginMigrationManifest defines struct for plugin bundle manifest
type UploadPluginBundleOptions ¶
type UploadPluginBundleOptions struct {
Tar string
DestinationRepo string
ImageProcessor carvelhelpers.ImageOperationsImpl
}
UploadPluginBundleOptions defines options for uploading plugin bundle
func (*UploadPluginBundleOptions) UploadPluginBundle ¶
func (o *UploadPluginBundleOptions) UploadPluginBundle() error
UploadPluginBundle uploads the given plugin bundle to the specified remote repository