Documentation
¶
Index ¶
- Constants
- Variables
- func DbSyncJob(instance *glancev1.Glance, labels map[string]string, ...) *batchv1.Job
- func GetConfigSecretVolumes(secretNames []string) ([]corev1.Volume, []corev1.VolumeMount)
- func GetEnabledBackends(customServiceConfig string) []string
- func GetOwningGlanceName(instance client.Object) string
- func GetVolumeMounts(secretNames []string, hasCinder bool, extraVol []glancev1.GlanceExtraVolMounts, ...) []corev1.VolumeMount
- func GetVolumes(name string, pvcName string, hasCinder bool, secretNames []string, ...) []corev1.Volume
- func InitContainer(init APIDetails) []corev1.Container
- func Pvc(api *glancev1.Glance, labels map[string]string) *corev1.PersistentVolumeClaim
- type APIDetails
Constants ¶
const ( // ServiceName - ServiceName = "glance" // ServiceType - ServiceType = "image" // DatabaseName - DatabaseName = "glance" // GlancePublicPort - GlancePublicPort int32 = 9292 // GlanceInternalPort - GlanceInternalPort int32 = 9292 // KollaConfig - KollaConfig = "/var/lib/config-data/merged/glance-api-config.json" // GlanceExtraVolTypeUndefined can be used to label an extraMount which // is not associated with a specific backend GlanceExtraVolTypeUndefined storage.ExtraVolType = "Undefined" // GlanceExtraVolTypeCeph can be used to label an extraMount which // is associated to a Ceph backend GlanceExtraVolTypeCeph storage.ExtraVolType = "Ceph" // GlanceAPI defines the glance-api group GlanceAPI storage.PropagationType = "GlanceAPI" // Glance is the global ServiceType that refers to all the components deployed // by the glance operator Glance storage.PropagationType = "Glance" // CinderName - Cinder CR Name Glance expects to find in the namespace CinderName = "cinder" )
const (
// DBSyncCommand -
DBSyncCommand = "/usr/local/bin/kolla_set_configs && su -s /bin/sh -c \"glance-manage db sync\" glance && glance-manage db_load_metadefs"
)
const (
// InitContainerCommand -
InitContainerCommand = "/usr/local/bin/container-scripts/init.sh"
)
Variables ¶
var DbsyncPropagation = []storage.PropagationType{storage.DBSync}
DbsyncPropagation keeps track of the DBSync Service Propagation Type
var GlanceAPIPropagation = []storage.PropagationType{Glance, GlanceAPI}
GlanceAPIPropagation is the definition of the GlanceAPI propagation group It allows the GlanceAPI pod to mount volumes destined to Glance related ServiceTypes
Functions ¶
func DbSyncJob ¶
func DbSyncJob( instance *glancev1.Glance, labels map[string]string, annotations map[string]string, ) *batchv1.Job
DbSyncJob func
func GetConfigSecretVolumes ¶
func GetConfigSecretVolumes(secretNames []string) ([]corev1.Volume, []corev1.VolumeMount)
GetConfigSecretVolumes - Returns a list of volumes associated with a list of Secret names
func GetEnabledBackends ¶
GetEnabledBackends - Given a instance.Spec.CustomServiceConfig object, return a list of available stores in form of 'store_id':'backend'
func GetOwningGlanceName ¶
GetOwningGlanceName - Given a GlanceAPI (both internal and external) object, return the parent Glance object that created it (if any)
func GetVolumeMounts ¶
func GetVolumeMounts(secretNames []string, hasCinder bool, extraVol []glancev1.GlanceExtraVolMounts, svc []storage.PropagationType) []corev1.VolumeMount
GetVolumeMounts - general VolumeMounts
func GetVolumes ¶
func GetVolumes(name string, pvcName string, hasCinder bool, secretNames []string, extraVol []glancev1.GlanceExtraVolMounts, svc []storage.PropagationType) []corev1.Volume
GetVolumes - service volumes
func InitContainer ¶
func InitContainer(init APIDetails) []corev1.Container
InitContainer - init container for glance api pods
Types ¶
type APIDetails ¶
type APIDetails struct {
ContainerImage string
DatabaseHost string
DatabaseUser string
DatabaseName string
TransportURL string
OSPSecret string
DBPasswordSelector string
UserPasswordSelector string
VolumeMounts []corev1.VolumeMount
QuotaEnabled bool
Privileged bool
}
APIDetails information