Documentation ¶
Index ¶
- Constants
- func AppConfigDefaultName(backstageName string) string
- func BackstageContainerIndex(bsd *appsv1.Deployment) int
- func DbSecretDefaultName(backstageName string) string
- func DbServiceName(backstageName string) string
- func DbStatefulSetName(backstageName string) string
- func DeploymentName(backstageName string) string
- func DynamicPluginsDefaultName(backstageName string) string
- func DynamicPluginsInitContainer(initContainers []corev1.Container) (int, *corev1.Container)
- func PvcsName(backstageName, originalName string) string
- func RouteName(backstageName string) string
- func ServiceName(backstageName string) string
- type AppConfig
- type AppConfigFactory
- type BackstageDeployment
- type BackstageDeploymentFactory
- type BackstageModel
- type BackstagePvcs
- type BackstagePvcsFactory
- type BackstageRoute
- type BackstageRouteFactory
- type BackstageService
- type BackstageServiceFactory
- type ConfigMapEnvs
- type ConfigMapEnvsFactory
- type ConfigMapFiles
- type ConfigMapFilesFactory
- type DataObjectKeys
- type DbSecret
- type DbSecretFactory
- type DbService
- type DbServiceFactory
- type DbStatefulSet
- type DbStatefulSetFactory
- type DynamicPlugins
- type DynamicPluginsFactory
- type ExternalConfig
- type ObjectConfig
- type ObjectFactory
- type RuntimeObject
- type SecretEnvs
- type SecretEnvsFactory
- type SecretFiles
- type SecretFilesFactory
Constants ¶
const BackstageAppLabel = "rhdh.redhat.com/app"
const BackstageImageEnvVar = "RELATED_IMAGE_backstage"
const BackstageNameAnnotation = "rhdh.redhat.com/backstage-name"
const ConfiguredNameAnnotation = "rhdh.redhat.com/configured-name"
const DefaultMountDir = "/opt/app-root/src"
const DefaultMountPathAnnotation = "rhdh.redhat.com/mount-path"
const DynamicPluginsFile = "dynamic-plugins.yaml"
const ExtConfigHashAnnotation = "rhdh.redhat.com/ext-config-hash"
const ExtConfigSyncLabel = "rhdh.redhat.com/ext-config-sync"
const LocalDbImageEnvVar = "RELATED_IMAGE_postgresql"
Variables ¶
This section is empty.
Functions ¶
func AppConfigDefaultName ¶
func BackstageContainerIndex ¶
func BackstageContainerIndex(bsd *appsv1.Deployment) int
BackstageContainerIndex returns the index of backstage container in from deployment.spec.template.spec.containers array
func DbSecretDefaultName ¶
func DbServiceName ¶
func DbStatefulSetName ¶
func DeploymentName ¶
func DynamicPluginsInitContainer ¶
returns initContainer supposed to initialize DynamicPlugins TODO consider to use a label to identify instead
func ServiceName ¶
Types ¶
type AppConfig ¶
structure containing ConfigMap where keys are Backstage ConfigApp file names and vaues are contents of the files Mount path is a patch to the follder to place the files to
func (*AppConfig) EmptyObject ¶
implementation of RuntimeObject interface
type AppConfigFactory ¶
type AppConfigFactory struct{}
type BackstageDeployment ¶
type BackstageDeployment struct {
// contains filtered or unexported fields
}
func (*BackstageDeployment) EmptyObject ¶
func (b *BackstageDeployment) EmptyObject() client.Object
implementation of RuntimeObject interface
func (*BackstageDeployment) Object ¶
func (b *BackstageDeployment) Object() runtime.Object
implementation of RuntimeObject interface
type BackstageDeploymentFactory ¶
type BackstageDeploymentFactory struct{}
type BackstageModel ¶
type BackstageModel struct { LocalDbService *DbService LocalDbSecret *DbSecret RuntimeObjects []RuntimeObject ExternalConfig ExternalConfig // contains filtered or unexported fields }
BackstageModel represents internal object model
func InitObjects ¶
func InitObjects(ctx context.Context, backstage bsv1.Backstage, externalConfig ExternalConfig, isOpenshift bool, scheme *runtime.Scheme) (*BackstageModel, error)
InitObjects performs a main loop for configuring and making the array of objects to reconcile
type BackstagePvcs ¶
type BackstagePvcs struct {
// contains filtered or unexported fields
}
func (*BackstagePvcs) EmptyObject ¶
func (b *BackstagePvcs) EmptyObject() client.Object
func (*BackstagePvcs) Object ¶
func (b *BackstagePvcs) Object() runtime.Object
type BackstagePvcsFactory ¶
type BackstagePvcsFactory struct{}
type BackstageRoute ¶
type BackstageRoute struct {
// contains filtered or unexported fields
}
func (*BackstageRoute) EmptyObject ¶
func (b *BackstageRoute) EmptyObject() client.Object
implementation of RuntimeObject interface
func (*BackstageRoute) Object ¶
func (b *BackstageRoute) Object() runtime.Object
implementation of RuntimeObject interface
type BackstageRouteFactory ¶
type BackstageRouteFactory struct{}
type BackstageService ¶
type BackstageService struct {
// contains filtered or unexported fields
}
func (*BackstageService) EmptyObject ¶
func (b *BackstageService) EmptyObject() client.Object
implementation of RuntimeObject interface
func (*BackstageService) Object ¶
func (b *BackstageService) Object() runtime.Object
implementation of RuntimeObject interface
type BackstageServiceFactory ¶
type BackstageServiceFactory struct{}
type ConfigMapEnvs ¶
func (*ConfigMapEnvs) EmptyObject ¶
func (p *ConfigMapEnvs) EmptyObject() client.Object
EmptyObject implements RuntimeObject interface
func (*ConfigMapEnvs) Object ¶
func (p *ConfigMapEnvs) Object() runtime.Object
Object implements RuntimeObject interface
type ConfigMapEnvsFactory ¶
type ConfigMapEnvsFactory struct{}
type ConfigMapFiles ¶
func (*ConfigMapFiles) EmptyObject ¶
func (p *ConfigMapFiles) EmptyObject() client.Object
implementation of RuntimeObject interface
func (*ConfigMapFiles) Object ¶
func (p *ConfigMapFiles) Object() runtime.Object
implementation of RuntimeObject interface
type ConfigMapFilesFactory ¶
type ConfigMapFilesFactory struct{}
type DataObjectKeys ¶
func NewDataObjectKeys ¶
func NewDataObjectKeys(stringData map[string]string, binaryData map[string][]byte) DataObjectKeys
func (DataObjectKeys) All ¶
func (k DataObjectKeys) All() []string
type DbSecret ¶
type DbSecret struct {
// contains filtered or unexported fields
}
func (*DbSecret) EmptyObject ¶
implementation of RuntimeObject interface
type DbSecretFactory ¶
type DbSecretFactory struct{}
type DbService ¶
type DbService struct {
// contains filtered or unexported fields
}
func (*DbService) EmptyObject ¶
implementation of RuntimeObject interface
type DbServiceFactory ¶
type DbServiceFactory struct{}
type DbStatefulSet ¶
type DbStatefulSet struct {
// contains filtered or unexported fields
}
func (*DbStatefulSet) EmptyObject ¶
func (b *DbStatefulSet) EmptyObject() client.Object
implementation of RuntimeObject interface
func (*DbStatefulSet) Object ¶
func (b *DbStatefulSet) Object() runtime.Object
implementation of RuntimeObject interface
type DbStatefulSetFactory ¶
type DbStatefulSetFactory struct{}
type DynamicPlugins ¶
func (*DynamicPlugins) EmptyObject ¶
func (p *DynamicPlugins) EmptyObject() client.Object
implementation of RuntimeObject interface
func (*DynamicPlugins) Object ¶
func (p *DynamicPlugins) Object() runtime.Object
implementation of RuntimeObject interface
type DynamicPluginsFactory ¶
type DynamicPluginsFactory struct{}
type ExternalConfig ¶
type ExternalConfig struct { RawConfig map[string]string DynamicPlugins corev1.ConfigMap AppConfigKeys map[string][]string ExtraFileConfigMapKeys map[string]DataObjectKeys ExtraFileSecretKeys map[string]DataObjectKeys ExtraEnvConfigMapKeys map[string]DataObjectKeys ExtraEnvSecretKeys map[string]DataObjectKeys ExtraPvcKeys []string WatchingHash string }
func NewExternalConfig ¶
func NewExternalConfig() ExternalConfig
type ObjectConfig ¶
type ObjectConfig struct { // Factory to create the object ObjectFactory ObjectFactory // Unique key identifying the "kind" of Object which also is the name of config file. // For example: "deployment.yaml" containing configuration of Backstage Deployment Key string // Single or multiple object Multiple bool }
Registered Object configuring Backstage runtime model
type ObjectFactory ¶
type ObjectFactory interface {
// contains filtered or unexported methods
}
Interface for Runtime Objects factory method
type RuntimeObject ¶
type RuntimeObject interface { // Object underlying Kubernetes object Object() runtime.Object // EmptyObject an empty object: the same type as Object if Object is client.Object or Item type of Multiobject EmptyObject() client.Object // contains filtered or unexported methods }
Abstraction for the model Backstage object taking part in deployment
type SecretEnvs ¶
func (*SecretEnvs) EmptyObject ¶
func (p *SecretEnvs) EmptyObject() client.Object
implementation of RuntimeObject interface
func (*SecretEnvs) Object ¶
func (p *SecretEnvs) Object() runtime.Object
implementation of RuntimeObject interface
type SecretEnvsFactory ¶
type SecretEnvsFactory struct{}
type SecretFiles ¶
func (*SecretFiles) EmptyObject ¶
func (p *SecretFiles) EmptyObject() client.Object
implementation of RuntimeObject interface
func (*SecretFiles) Object ¶
func (p *SecretFiles) Object() runtime.Object
implementation of RuntimeObject interface
type SecretFilesFactory ¶
type SecretFilesFactory struct{}