storage

package
v0.0.0-...-1c6c245 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStorageNotConfigured = fmt.Errorf("storage backend not configured")
)

Functions

func GetPlatformStorage

func GetPlatformStorage(listers *regopclient.Listers) (imageregistryv1.ImageRegistryConfigStorage, error)

GetPlatformStorage returns the storage configuration that should be used based on the cloudplatform we are running on, as determined from the infrastructure configuration.

Following rules apply:

  • If it is a known platform for which we have a backend implementation (e.g. AWS) we return a storage configuration that uses that implementation.
  • If it is a known platform and it doesn't provide any backend implementation, we return an empty storage configuration.
  • If it is a unknown platform we return a storage configuration with EmptyDir. This is useful as it easily allows other teams to experiment with OpenShift in new platforms, if it is LibVirt platform we also return EmptyDir for historical reasons.

Types

type Driver

type Driver interface {
	ConfigEnv() ([]corev1.EnvVar, error)
	Volumes() ([]corev1.Volume, []corev1.VolumeMount, error)
	Secrets() (map[string]string, error)
	CreateStorage(*imageregistryv1.Config) error
	StorageExists(*imageregistryv1.Config) (bool, error)
	RemoveStorage(*imageregistryv1.Config) (bool, error)
	StorageChanged(*imageregistryv1.Config) bool
	ID() string
}

func NewDriver

func NewDriver(cfg *imageregistryv1.ImageRegistryConfigStorage, kubeconfig *rest.Config, listers *regopclient.Listers) (Driver, error)

type MultiStoragesError

type MultiStoragesError struct {
	// contains filtered or unexported fields
}

MultiStoragesError is returned when we have multiple storage engines configured and we can't determin which one the user wants to use.

func (*MultiStoragesError) Error

func (m *MultiStoragesError) Error() string

Error return MultiStoragesError as string.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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