common

package
v0.0.0-...-c5dff7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const BackupRegistryHostname string = "openshift.io/backup-registry-hostname"
View Source
const BackupServerVersion string = "openshift.io/backup-server-version"
View Source
const RestoreRegistryHostname string = "openshift.io/restore-registry-hostname"
View Source
const RestoreServerVersion string = "openshift.io/restore-server-version"

Variables

This section is empty.

Functions

func GetOwnerReferences

func GetOwnerReferences(item runtime.Unstructured) ([]metav1.OwnerReference, error)

GetOwnerReferences returns the array of OwnerReferences associated with the resource

func GetRegistryInfo

func GetRegistryInfo(major, minor string, log logrus.FieldLogger) (string, error)

func GetServerVersion

func GetServerVersion() (*version.Info, error)

func GetSrcAndDestRegistryInfo

func GetSrcAndDestRegistryInfo(item runtime.Unstructured) (string, string, error)

GetSrcAndDestRegistryInfo returns the Registry hostname for both src and dest clusters

func HasImageRefPrefix

func HasImageRefPrefix(s, prefix string) bool

HasImageRefPrefix returns true if the input image reference begins with the input prefix followed by "/"

func ReplaceImageRefPrefix

func ReplaceImageRefPrefix(s, oldPrefix, newPrefix string, namespaceMapping map[string]string) (string, error)

ReplaceImageRefPrefix replaces an image reference prefix with newPrefix. If the input image reference does not start with oldPrefix, an error is returned

func SwapContainerImageRefs

func SwapContainerImageRefs(containers []corev1API.Container, oldRegistry, newRegistry string, log logrus.FieldLogger, namespaceMapping map[string]string)

SwapContainerImageRefs updates internal image references from backup registry to restore registry pathnames

Types

type APIServerConfig

type APIServerConfig struct {
	ImagePolicyConfig imagePolicyConfig `json:"imagePolicyConfig"`
	RoutingConfig     routingConfig     `json:"routingConfig"`
}

APIServerConfig stores configuration information about the current cluster

type BackupPlugin

type BackupPlugin struct {
	Log logrus.FieldLogger
}

BackupPlugin is a backup item action plugin for Heptio Ark.

func (*BackupPlugin) AppliesTo

func (p *BackupPlugin) AppliesTo() (velero.ResourceSelector, error)

AppliesTo returns a velero.ResourceSelector that applies to everything.

func (*BackupPlugin) Execute

Execute sets a custom annotation on the item being backed up.

type LocalImageReference

type LocalImageReference struct {
	Registry  string
	Namespace string
	Name      string
	Tag       string
	Digest    string
}

LocalImageReference describes an image in the internal openshift registry

func ParseLocalImageReference

func ParseLocalImageReference(s, prefix string) (*LocalImageReference, error)

ParseLocalImageReference

type RestorePlugin

type RestorePlugin struct {
	Log logrus.FieldLogger
}

RestorePlugin is a restore item action plugin for Heptio Ark.

func (*RestorePlugin) AppliesTo

func (p *RestorePlugin) AppliesTo() (velero.ResourceSelector, error)

AppliesTo returns a velero.ResourceSelector that applies to everything.

func (*RestorePlugin) Execute

Execute sets a custom annotation on the item being restored.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL