Documentation
¶
Index ¶
- Constants
- func GetAuthOptionsFromEnv() (gophercloud.AuthOptions, error)
- func GetAuthOptionsFromSecret(endpointSecret *v1.Secret) (gophercloud.AuthOptions, error)
- func NewManagerError(msg string) error
- func ReadConfig() (err error)
- func ReconcilerConfigPath(name ReconcilerName) string
- func ReconcilerOptionPath(name ReconcilerName, option OptionName) string
- func ReconcilerStatePath(name ReconcilerName) string
- type Error
- type OptionName
- type PlatformManager
- func (m *PlatformManager) BuildPlatformClient(namespace string) (*gophercloud.ServiceClient, error)
- func (m *PlatformManager) GetPlatformClient(namespace string) *gophercloud.ServiceClient
- func (m *PlatformManager) GetReconcilerOption(name ReconcilerName, option OptionName) interface{}
- func (m *PlatformManager) GetSystemReady(namespace string) bool
- func (m *PlatformManager) GetSystemType(namespace string) SystemType
- func (m *PlatformManager) IsReconcilerEnabled(name ReconcilerName) bool
- func (m *PlatformManager) NotifySystemController(namespace string) error
- func (m *PlatformManager) NotifySystemDependencies(namespace string) error
- func (m *PlatformManager) ResetPlatformClient(namespace string) error
- func (m *PlatformManager) SetSystemReady(namespace string, value bool)
- func (m *PlatformManager) SetSystemType(namespace string, value SystemType)
- type ReconcilerName
- type SystemMode
- type SystemNamespace
- type SystemType
- type TitaniumManager
Constants ¶
const ( // Expected Secret data and string data keys AuthUrlKey = "OS_AUTH_URL" UsernameKey = "OS_USERNAME" UserIDKey = "OS_USERID" PasswordKey = "OS_PASSWORD" TenantIDKey = "OS_TENANT_ID" TenantNameKey = "OS_TENANT_NAME" DomainIDKey = "OS_PROJECT_DOMAIN_ID" DomainNameKey = "OS_PROJECT_DOMAIN_NAME" RegionNameKey = "OS_REGION_NAME" KeystoneRegionNameKey = "OS_KEYSTONE_REGION_NAME" ApplicationCredentialIDKey = "OS_APPLICATION_CREDENTIAL_ID" ApplicationCredentialNameKey = "OS_APPLICATION_CREDENTIAL_NAME" ApplicationCredentialSecretKey = "OS_APPLICATION_CREDENTIAL_SECRET" ProjectIDKey = "OS_PROJECT_ID" ProjectNameKey = "OS_PROJECT_NAME" InterfaceKey = "OS_INTERFACE" )
const ( // Well-known openstack API attribute values for the system API SystemEndpointName = "sysinv" SystemEndpointType = "platform" )
const ( // Defines HTTP and HTTPS URL prefixes. HTTPSPrefix = "https://" HTTPPrefix = "http://" )
const ( // Defines annotation keys for resources. NotificationCountKey = "deployment-manager/notifications" ReconcileAfterInSync = "deployment-manager/reconcile-after-insync" )
const HTTPSNotEnabled = "server gave HTTP response to HTTPS client"
const ReconcilerPrefix = "reconcilers"
ReconcilerPrefix defines the viper configuration prefix for all reconcilers and sub-reconcilers.
const SystemEndpointSecretName = "system-endpoint"
Well-known name of the secret which holds the system API endpoint attributes (e.g., OS_USERNAME, OS_*)
Variables ¶
This section is empty.
Functions ¶
func GetAuthOptionsFromEnv ¶
func GetAuthOptionsFromEnv() (gophercloud.AuthOptions, error)
func GetAuthOptionsFromSecret ¶
func GetAuthOptionsFromSecret(endpointSecret *v1.Secret) (gophercloud.AuthOptions, error)
Builds the client authentication options from a given secret which should contain environment variable like values. For example, OS_AUTH_URL, OS_USERNAME, etc...
func NewManagerError ¶
func ReadConfig ¶
func ReadConfig() (err error)
ReadConfig is a utility which loads the current manager configuration into memory.
func ReconcilerConfigPath ¶
func ReconcilerConfigPath(name ReconcilerName) string
ReconcilerConfigPath returns the config attribute path which represents the top-level path for the specified reconciler.
func ReconcilerOptionPath ¶
func ReconcilerOptionPath(name ReconcilerName, option OptionName) string
ReconcilerOptionPath returns the config attribute path which represents the option value of the specified reconciler option.
func ReconcilerStatePath ¶
func ReconcilerStatePath(name ReconcilerName) string
ReconcilerStatePath returns the config attribute path which represents the current configured state of the reconciler.
Types ¶
type OptionName ¶
type OptionName string
OptionName is the type alias that represents the path for a reconciler or sub-reconciler.
const ( HTTPSRequired OptionName = "httpsRequired" StopAfterInSync OptionName = "stopAfterInSync" )
Defines the current list of supported reconciler options.
type PlatformManager ¶
func GetInstance ¶
func GetInstance(mgr manager.Manager) *PlatformManager
GetInstance returns a singleton instance of the platform manager
func NewPlatformManager ¶
func NewPlatformManager(manager manager.Manager) *PlatformManager
func (*PlatformManager) BuildPlatformClient ¶
func (m *PlatformManager) BuildPlatformClient(namespace string) (*gophercloud.ServiceClient, error)
func (*PlatformManager) GetPlatformClient ¶
func (m *PlatformManager) GetPlatformClient(namespace string) *gophercloud.ServiceClient
GetPlatformClient returns the instance of the platform manager for a given namespace. It is has not been created yet then false is returned in the second return parameter.
func (*PlatformManager) GetReconcilerOption ¶
func (m *PlatformManager) GetReconcilerOption(name ReconcilerName, option OptionName) interface{}
IsReconcilerEnabled returns whether a specific reconciler is enabled or not.
func (*PlatformManager) GetSystemReady ¶
func (m *PlatformManager) GetSystemReady(namespace string) bool
GetSystemReady returns whether the system for the specified namespace is ready for all controllers to reconcile their resources.
func (*PlatformManager) GetSystemType ¶
func (m *PlatformManager) GetSystemType(namespace string) SystemType
GetSystemReady returns whether the system for the specified namespace is ready for all controllers to reconcile their resources.
func (*PlatformManager) IsReconcilerEnabled ¶
func (m *PlatformManager) IsReconcilerEnabled(name ReconcilerName) bool
IsReconcilerEnabled returns whether a specific reconciler is enabled or not.
func (*PlatformManager) NotifySystemController ¶
func (m *PlatformManager) NotifySystemController(namespace string) error
func (*PlatformManager) NotifySystemDependencies ¶
func (m *PlatformManager) NotifySystemDependencies(namespace string) error
func (*PlatformManager) ResetPlatformClient ¶
func (m *PlatformManager) ResetPlatformClient(namespace string) error
ResetPlatformClient deletes the instance of the platform manager for a given namespace.
func (*PlatformManager) SetSystemReady ¶
func (m *PlatformManager) SetSystemReady(namespace string, value bool)
SetSystemReady allows setting the readiness state for a given namespace.
func (*PlatformManager) SetSystemType ¶
func (m *PlatformManager) SetSystemType(namespace string, value SystemType)
SetSystemReady allows setting the readiness state for a given namespace.
type ReconcilerName ¶
type ReconcilerName string
ReconcilerName is the type alias that represents the path for a reconciler or sub-reconciler.
const ( DataNetwork ReconcilerName = "dataNetwork" Host ReconcilerName = "host" BMC ReconcilerName = "host.bmc" Memory ReconcilerName = "host.memory" Processor ReconcilerName = "host.processor" Storage ReconcilerName = "host.storage" Monitor ReconcilerName = "host.storage.monitor" OSD ReconcilerName = "host.storage.osd" Partition ReconcilerName = "host.storage.partition" PhysicalVolume ReconcilerName = "host.storage.physicalVolume" VolumeGroup ReconcilerName = "host.storage.volumeGroup" Networking ReconcilerName = "host.networking" Address ReconcilerName = "host.networking.address" Interface ReconcilerName = "host.networking.interface" Route ReconcilerName = "host.networking.route" HostProfile ReconcilerName = "hostProfile" PlatformNetwork ReconcilerName = "platformNetwork" System ReconcilerName = "system" Certificate ReconcilerName = "system.certificate" DNS ReconcilerName = "system.dns" DRBD ReconcilerName = "system.drbd" NTP ReconcilerName = "system.ntp" PTP ReconcilerName = "system.ptp" SNMP ReconcilerName = "system.snmp" Backends ReconcilerName = "system.storage.backend" )
Defines the current list of supported reconcilers and sub-reconcilers.
type SystemMode ¶
type SystemMode string
const ( SystemModeSimplex SystemMode = "simplex" SystemModeDuplex SystemMode = "duplex" )
Defines the current list of system modes
type SystemNamespace ¶
type SystemNamespace struct {
// contains filtered or unexported fields
}
type SystemType ¶
type SystemType string
const ( SystemTypeAllInOne SystemType = "all-in-one" SystemTypeStandard SystemType = "standard" )
Defines the current list of system types.
type TitaniumManager ¶
type TitaniumManager interface {
ResetPlatformClient(namespace string) error
GetPlatformClient(namespace string) *gophercloud.ServiceClient
BuildPlatformClient(namespace string) (*gophercloud.ServiceClient, error)
NotifySystemDependencies(namespace string) error
SetSystemReady(namespace string, value bool)
GetSystemReady(namespace string) bool
SetSystemType(namespace string, value SystemType)
GetSystemType(namespace string) SystemType
IsReconcilerEnabled(name ReconcilerName) bool
GetReconcilerOption(name ReconcilerName, option OptionName) interface{}
}
TitaniumManager wraps a runtime manager and provides the ability to coordinate certain function across different controllers.