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.
Click to show internal directories.
Click to hide internal directories.