Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCopyCommand ¶
NewCopyCommand creates a new definition command to push definitions
func NewGetCommand ¶
NewGetCommand shows definitions and their configuration.
func NewPushCommand ¶
NewPushCommand creates a new definition command to push definitions
Types ¶
type Copier ¶
type Copier struct {
SrcRepoCtx, TargetRepoCtx cdv2.Repository
Cache cache.Cache
OciClient ociclient.Client
CompResolver ctf.ComponentResolver
// Recursive specifies if all component references should also be copied.
Recursive bool
// Force forces an overwrite in the target registry if the component descriptor is already uploaded.
Force bool
// CopyByValue defines if all oci images and artifacts should be copied by value or reference.
// LocalBlobs are still copied by value.
CopyByValue bool
// KeepSourceRepository specifies if the source repository should be kept during the copy.
// This value is only relevant if the artifacts are copied by value.
KeepSourceRepository bool
// SourceArtifactRepository is the source repository for oci artifacts.
// This value is only relevant if the artifacts are copied by value.
SourceArtifactRepository string
// TargetArtifactRepository is the target repository for oci artifacts.
// This value is only relevant if the artifacts are copied by value.
TargetArtifactRepository string
// ConvertToRelativeOCIReferences configures the cli to write copied artifacts back with a relative reference
ConvertToRelativeOCIReferences bool
// ReplaceOCIRefs contains replace expressions for manipulating upload refs of resources with accessType == ociRegistry
ReplaceOCIRefs map[string]string
MaxRetries uint64
BackoffFactor time.Duration
}
Copier copies a component descriptor from a target repo to another.
type CopyOptions ¶
type CopyOptions struct {
ComponentName string
ComponentVersion string
SourceRepository string
TargetRepository string
// Recursive specifies if all component references should also be copied.
Recursive bool
// Force forces an overwrite in the target registry if the component descriptor is already uploaded.
Force bool
// CopyByValue defines if all oci images and artifacts should be copied by value or reference.
// LocalBlobs are still copied by value.
CopyByValue bool
// KeepSourceRepository specifies if the source repository should be kept during the copy.
// This value is only relevant if the artifacts are copied by value.
KeepSourceRepository bool
// TargetArtifactRepository is the target repository for oci artifacts.
// This value is only relevant if the artifacts are copied by value.
// +optional
TargetArtifactRepository string
// SourceArtifactRepository is the source repository for relative oci artifacts.
// This value is only relevant if the artifacts are copied by value and if relative oci artifacts are copied.
// The repository is defaulted to the "SourceRepository".
// +optional
SourceArtifactRepository string
// ConvertToRelativeOCIReferences configures the cli to write copied artifacts back with a relative reference
ConvertToRelativeOCIReferences bool
// ReplaceOCIRefs contains replace expressions for manipulating upload refs of resources with accessType == ociRegistry
ReplaceOCIRefs []string
// OciOptions contains all exposed options to configure the oci client.
OciOptions ociopts.Options
MaxRetries uint64
BackoffFactor time.Duration
}
CopyOptions contains all options to copy a component descriptor.
func (*CopyOptions) AddFlags ¶
func (o *CopyOptions) AddFlags(fs *pflag.FlagSet)
func (*CopyOptions) Complete ¶
func (o *CopyOptions) Complete(args []string) error
func (*CopyOptions) Run ¶
func (o *CopyOptions) Run(ctx context.Context, log logr.Logger, fs vfs.FileSystem) error
func (*CopyOptions) Validate ¶
func (o *CopyOptions) Validate() error
Validate validates push options
type PushOptions ¶
type PushOptions struct {
// AdditionalTags defines additional tags that the oci artifact should be tagged with.
AdditionalTags []string
// OciOptions contains all exposed options to configure the oci client.
OciOptions ociopts.Options
// BuilderOptions for the component archive builder
componentarchive.BuilderOptions
}
PushOptions contains all options to upload a component archive.
func (*PushOptions) AddFlags ¶
func (o *PushOptions) AddFlags(fs *pflag.FlagSet)
func (*PushOptions) Complete ¶
func (o *PushOptions) Complete(args []string) error
func (*PushOptions) Run ¶
func (o *PushOptions) Run(ctx context.Context, log logr.Logger, fs vfs.FileSystem) error
func (*PushOptions) Validate ¶
func (o *PushOptions) Validate() error
Validate validates push options
type ShowOptions ¶
type ShowOptions struct {
// BaseUrl is the oci registry where the component is stored.
BaseUrl string
// ComponentName is the unique name of the component in the registry.
ComponentName string
// Version is the component Version in the oci registry.
Version string
ComponentNameMapping string
// OciOptions contains all exposed options to configure the oci client.
OciOptions ociopts.Options
}
func (*ShowOptions) AddFlags ¶
func (o *ShowOptions) AddFlags(fs *pflag.FlagSet)
func (*ShowOptions) Complete ¶
func (o *ShowOptions) Complete(args []string) error
func (*ShowOptions) Run ¶
func (o *ShowOptions) Run(ctx context.Context, log logr.Logger, fs vfs.FileSystem) error
Click to show internal directories.
Click to hide internal directories.