Documentation ¶
Index ¶
- Constants
- Variables
- func CombineAnnotations(a, b map[string]string) map[string]string
- func CompileTemplateFromMap(tmplt string, configMap interface{}) (string, error)
- func CreateOrUpdateConfigMap(client clientset.Interface, cm *corev1.ConfigMap) error
- func EnsureClusterDBUser(oc *v1alpha1.OnecloudCluster, dbConfig v1alpha1.DBConfig) error
- func EnsureDBUser(conn *mysql.Connection, dbName string, username string, password string) error
- func EnsureServiceAccount(s *mcclient.ClientSession, account v1alpha1.CloudUser) error
- func GetConfigVolumeMount(volMounts []corev1.VolumeMount) *corev1.VolumeMount
- func GetDBConnectionByCluster(oc *v1alpha1.OnecloudCluster) (*mysql.Connection, error)
- func GetRCAdminEnv(oc *v1alpha1.OnecloudCluster) []corev1.EnvVar
- func LoginByServiceAccount(s *mcclient.ClientSession, account v1alpha1.CloudUser) (mcclient.TokenCredential, error)
- func NewServiceNodePort(name string, port int32) corev1.ServicePort
- func SetConfigMapLastAppliedConfigAnnotation(cfg *corev1.ConfigMap) error
- func SetCronJobLastAppliedConfigAnnotation(cronJob *batchv1.CronJob) error
- func SetDBOptions(opt *options.DBOptions, mysql v1alpha1.Mysql, input v1alpha1.DBConfig)
- func SetDaemonSetLastAppliedConfigAnnotation(ds *apps.DaemonSet) error
- func SetDeploymentLastAppliedConfigAnnotation(deploy *apps.Deployment) error
- func SetIngressLastAppliedConfigAnnotation(ing *extensions.Ingress) error
- func SetOptionsDefault(opt interface{}, serviceType string) error
- func SetOptionsServiceTLS(config *options.BaseOptions)
- func SetServiceBaseOptions(opt *options.BaseOptions, region string, input v1alpha1.ServiceBaseConfig)
- func SetServiceCommonOptions(opt *options.CommonOptions, oc *v1alpha1.OnecloudCluster, ...)
- func SetServiceLastAppliedConfigAnnotation(svc *corev1.Service) error
- type ComponentManager
- func (m *ComponentManager) APIGateway() manager.Manager
- func (m *ComponentManager) AnsibleServer() manager.Manager
- func (m *ComponentManager) AutoUpdate() manager.Manager
- func (m *ComponentManager) Baremetal() manager.Manager
- func (m *ComponentManager) Climc() manager.Manager
- func (m *ComponentManager) Cloudevent() manager.Manager
- func (m *ComponentManager) CloudmonPing() manager.Manager
- func (m *ComponentManager) CloudmonReportUsage() manager.Manager
- func (m *ComponentManager) Cloudnet() manager.Manager
- func (m *ComponentManager) Devtool() manager.Manager
- func (m *ComponentManager) EsxiAgent() manager.Manager
- func (m *ComponentManager) Glance() manager.Manager
- func (m *ComponentManager) Host() manager.Manager
- func (m *ComponentManager) HostDeployer() manager.Manager
- func (m *ComponentManager) Influxdb() manager.Manager
- func (m *ComponentManager) Kapacitor() manager.Manager
- func (m *ComponentManager) Keystone() manager.Manager
- func (m *ComponentManager) KubeServer() manager.Manager
- func (m *ComponentManager) Logger() manager.Manager
- func (m *ComponentManager) Meter() manager.Manager
- func (m *ComponentManager) Notify() manager.Manager
- func (m *ComponentManager) Region() manager.Manager
- func (m *ComponentManager) S3gateway() manager.Manager
- func (m *ComponentManager) Scheduler() manager.Manager
- func (m *ComponentManager) Web() manager.Manager
- func (m *ComponentManager) Webconsole() manager.Manager
- func (m *ComponentManager) Yunionagent() manager.Manager
- func (m *ComponentManager) Yunionconf() manager.Manager
- type Configer
- type InfluxdbConfig
- type KapacitorConfig
- type NotifyPluginBaseConfig
- type NotifyPluginEmailConfig
- type NotifyPluginWebsocketConfig
- type PVCVolumePair
- type VolumeHelper
- type WebNginxConfig
Constants ¶
View Source
const ( NotifySocketFileDir = "/etc/yunion/socket" NotifyTemplateDir = "/etc/yunion/template" NotifyPluginDingtalk = "dingtalk" NotifyPluginConfig = "plugin-config" NotifyPluginEmail = "email" NotifyPluginSmsAliyun = "smsaliyun" NotifyPluginWebsocket = "websocket" )
View Source
const ( // LastAppliedConfigAnnotation is annotation key of last applied configuration LastAppliedConfigAnnotation = "onecloud.yunion.io/last-applied-configuration" // ImagePullBackOff is the pod state of image pull failed ImagePullBackOff = "ImagePullBackOff" // ErrImagePull is the pod state of image pull failed ErrImagePull = "ErrImagePull" )
View Source
const ( CEConfig = `` /* 216-byte string literal not displayed */ EEConfig = `` /* 352-byte string literal not displayed */ WebNginxConfigTemplate = `` /* 5025-byte string literal not displayed */ )
View Source
const (
InfluxDBConfigTemplate = `` /* 759-byte string literal not displayed */
)
View Source
const (
KapacitorConfigTemplate = `` /* 715-byte string literal not displayed */
)
documentation: check https://hub.docker.com/_/kapacitor
View Source
const (
RegionDNSConfigTemplate = `` /* 443-byte string literal not displayed */
)
Variables ¶
View Source
var ( GetEdition = v1alpha1.GetEdition IsEnterpriseEdition = v1alpha1.IsEnterpriseEdition )
Functions ¶
func CombineAnnotations ¶
CombineAnnotations merges two annotations maps
func CompileTemplateFromMap ¶
func CreateOrUpdateConfigMap ¶
func EnsureClusterDBUser ¶
func EnsureClusterDBUser(oc *v1alpha1.OnecloudCluster, dbConfig v1alpha1.DBConfig) error
func EnsureDBUser ¶
func EnsureServiceAccount ¶
func EnsureServiceAccount(s *mcclient.ClientSession, account v1alpha1.CloudUser) error
func GetConfigVolumeMount ¶
func GetConfigVolumeMount(volMounts []corev1.VolumeMount) *corev1.VolumeMount
func GetDBConnectionByCluster ¶
func GetDBConnectionByCluster(oc *v1alpha1.OnecloudCluster) (*mysql.Connection, error)
func GetRCAdminEnv ¶
func GetRCAdminEnv(oc *v1alpha1.OnecloudCluster) []corev1.EnvVar
func LoginByServiceAccount ¶
func LoginByServiceAccount(s *mcclient.ClientSession, account v1alpha1.CloudUser) (mcclient.TokenCredential, error)
func NewServiceNodePort ¶
func NewServiceNodePort(name string, port int32) corev1.ServicePort
func SetDBOptions ¶
func SetDeploymentLastAppliedConfigAnnotation ¶
func SetDeploymentLastAppliedConfigAnnotation(deploy *apps.Deployment) error
func SetIngressLastAppliedConfigAnnotation ¶
func SetIngressLastAppliedConfigAnnotation(ing *extensions.Ingress) error
func SetOptionsDefault ¶
func SetOptionsServiceTLS ¶
func SetOptionsServiceTLS(config *options.BaseOptions)
func SetServiceBaseOptions ¶
func SetServiceBaseOptions(opt *options.BaseOptions, region string, input v1alpha1.ServiceBaseConfig)
func SetServiceCommonOptions ¶
func SetServiceCommonOptions(opt *options.CommonOptions, oc *v1alpha1.OnecloudCluster, input v1alpha1.ServiceCommonOptions)
func SetServiceLastAppliedConfigAnnotation ¶
SetServiceLastAppliedConfigAnnotation set last applied config info to Service's annotation
Types ¶
type ComponentManager ¶
type ComponentManager struct {
// contains filtered or unexported fields
}
func NewComponentManager ¶
func NewComponentManager( kubeCli kubernetes.Interface, deployCtrol controller.DeploymentControlInterface, deployLister appv1.DeploymentLister, svcControl controller.ServiceControlInterface, svcLister corelisters.ServiceLister, pvcControl controller.PVCControlInterface, pvcLister corelisters.PersistentVolumeClaimLister, ingControl controller.IngressControlInterface, ingLister extensionlisters.IngressLister, dsControl controller.DaemonSetControlInterface, dsLister appv1.DaemonSetLister, cronControl controller.CronJobControlInterface, cronLister batchlisters.CronJobLister, nodeLister corelisters.NodeLister, configer Configer, onecloudControl *controller.OnecloudControl, ) *ComponentManager
NewComponentManager return *BaseComponentManager
func (*ComponentManager) APIGateway ¶
func (m *ComponentManager) APIGateway() manager.Manager
func (*ComponentManager) AnsibleServer ¶
func (m *ComponentManager) AnsibleServer() manager.Manager
func (*ComponentManager) AutoUpdate ¶
func (m *ComponentManager) AutoUpdate() manager.Manager
func (*ComponentManager) Baremetal ¶
func (m *ComponentManager) Baremetal() manager.Manager
func (*ComponentManager) Climc ¶
func (m *ComponentManager) Climc() manager.Manager
func (*ComponentManager) Cloudevent ¶
func (m *ComponentManager) Cloudevent() manager.Manager
func (*ComponentManager) CloudmonPing ¶
func (m *ComponentManager) CloudmonPing() manager.Manager
func (*ComponentManager) CloudmonReportUsage ¶
func (m *ComponentManager) CloudmonReportUsage() manager.Manager
func (*ComponentManager) Cloudnet ¶
func (m *ComponentManager) Cloudnet() manager.Manager
func (*ComponentManager) Devtool ¶
func (m *ComponentManager) Devtool() manager.Manager
func (*ComponentManager) EsxiAgent ¶
func (m *ComponentManager) EsxiAgent() manager.Manager
func (*ComponentManager) Glance ¶
func (m *ComponentManager) Glance() manager.Manager
func (*ComponentManager) Host ¶
func (m *ComponentManager) Host() manager.Manager
func (*ComponentManager) HostDeployer ¶
func (m *ComponentManager) HostDeployer() manager.Manager
func (*ComponentManager) Influxdb ¶
func (m *ComponentManager) Influxdb() manager.Manager
func (*ComponentManager) Kapacitor ¶
func (m *ComponentManager) Kapacitor() manager.Manager
func (*ComponentManager) Keystone ¶
func (m *ComponentManager) Keystone() manager.Manager
func (*ComponentManager) KubeServer ¶
func (m *ComponentManager) KubeServer() manager.Manager
func (*ComponentManager) Logger ¶
func (m *ComponentManager) Logger() manager.Manager
func (*ComponentManager) Meter ¶
func (m *ComponentManager) Meter() manager.Manager
func (*ComponentManager) Notify ¶
func (m *ComponentManager) Notify() manager.Manager
func (*ComponentManager) Region ¶
func (m *ComponentManager) Region() manager.Manager
func (*ComponentManager) S3gateway ¶
func (m *ComponentManager) S3gateway() manager.Manager
func (*ComponentManager) Scheduler ¶
func (m *ComponentManager) Scheduler() manager.Manager
func (*ComponentManager) Web ¶
func (m *ComponentManager) Web() manager.Manager
func (*ComponentManager) Webconsole ¶
func (m *ComponentManager) Webconsole() manager.Manager
func (*ComponentManager) Yunionagent ¶
func (m *ComponentManager) Yunionagent() manager.Manager
func (*ComponentManager) Yunionconf ¶
func (m *ComponentManager) Yunionconf() manager.Manager
type Configer ¶
type Configer interface { GetClusterConfig(cluster *v1alpha1.OnecloudCluster) (*v1alpha1.OnecloudClusterConfig, error) CreateOrUpdateConfigMap(cluster *v1alpha1.OnecloudCluster, newCfgMap *corev1.ConfigMap) error Lister() corelisters.ConfigMapLister }
Configer implements the logic to get cluster config.
type InfluxdbConfig ¶
func (InfluxdbConfig) GetContent ¶
func (c InfluxdbConfig) GetContent() (string, error)
type KapacitorConfig ¶
func (KapacitorConfig) GetContent ¶
func (c KapacitorConfig) GetContent() (string, error)
type NotifyPluginBaseConfig ¶
type NotifyPluginEmailConfig ¶
type NotifyPluginEmailConfig struct { NotifyPluginBaseConfig ChannelSize int `default:"100"` }
type NotifyPluginWebsocketConfig ¶
type NotifyPluginWebsocketConfig struct { NotifyPluginBaseConfig Region string }
type PVCVolumePair ¶
type PVCVolumePair struct {
// contains filtered or unexported fields
}
func NewPVCVolumePair ¶
func NewPVCVolumePair(name, mountPath string, oc *v1alpha1.OnecloudCluster, comp v1alpha1.ComponentType) *PVCVolumePair
func (PVCVolumePair) GetVolume ¶
func (p PVCVolumePair) GetVolume() corev1.Volume
func (PVCVolumePair) GetVolumeMount ¶
func (p PVCVolumePair) GetVolumeMount() corev1.VolumeMount
type VolumeHelper ¶
type VolumeHelper struct {
// contains filtered or unexported fields
}
func NewHostVolume ¶
func NewHostVolume( cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster, configMap string, ) *VolumeHelper
func NewVolumeHelper ¶
func NewVolumeHelper(oc *v1alpha1.OnecloudCluster, optCfgMap string, component v1alpha1.ComponentType) *VolumeHelper
func (*VolumeHelper) GetVolumeMounts ¶
func (h *VolumeHelper) GetVolumeMounts() []corev1.VolumeMount
func (*VolumeHelper) GetVolumes ¶
func (h *VolumeHelper) GetVolumes() []corev1.Volume
type WebNginxConfig ¶
type WebNginxConfig struct { EditionConfig string WebconsoleURL string APIGatewayWsURL string APIGatewayURL string }
func (WebNginxConfig) GetContent ¶
func (c WebNginxConfig) GetContent() (string, error)
Source Files ¶
- ansibleserver.go
- apigateway.go
- autoupdate.go
- baremetal.go
- climc.go
- cloudevent.go
- cloudmon-ping.go
- cloudmon-report-usage.go
- cloudnetserver.go
- component.go
- configer.go
- devtool.go
- esxi.go
- glance.go
- host-deployer.go
- host.go
- influxdb.go
- kapacitor.go
- keystone.go
- kubeserver.go
- logger.go
- meter.go
- notify.go
- region.go
- regiondns.go
- s3gateway.go
- scheduler.go
- sync.go
- utils.go
- web.go
- webconsole.go
- yunionagent.go
- yunionconf.go
Click to show internal directories.
Click to hide internal directories.