Documentation
¶
Index ¶
- Constants
- Variables
- func ClientServiceName(clusterName string) string
- func CombineAnnotations(a, b map[string]string) map[string]string
- func CreateClientService(kubecli kubernetes.Interface, clusterName, ns string, ...) error
- func CreateOrUpdateConfigMap(client clientset.Interface, cm *corev1.ConfigMap) error
- func CreatePeerService(kubecli kubernetes.Interface, clusterName, ns string, ...) error
- func GetConfigVolumeMount(volMounts []corev1.VolumeMount) *corev1.VolumeMount
- func GetDeploymentCondition(status apps.DeploymentStatus, condType apps.DeploymentConditionType) *apps.DeploymentCondition
- func IsPathIngressRule(path string, paths []interface{}) bool
- func NewServiceNodePort(name string, nodePort int32, targetPort int32) corev1.ServicePort
- func SetConfigMapLastAppliedConfigAnnotation(cfg *corev1.ConfigMap) error
- func SetCronJobLastAppliedConfigAnnotation(cronJob *batchv1.CronJob) error
- func SetDaemonSetLastAppliedConfigAnnotation(ds *apps.DaemonSet) error
- func SetDeploymentLastAppliedConfigAnnotation(deploy *apps.Deployment) error
- func SetIngressLastAppliedConfigAnnotation(ing *unstructured.Unstructured) error
- func SetJavaConfigVolumeMounts(volMounts []corev1.VolumeMount) []corev1.VolumeMount
- func SetJavaConfigVolumes(vols []corev1.Volume) []corev1.Volume
- func SetServiceLastAppliedConfigAnnotation(svc *corev1.Service) error
- type ComponentManager
- func (m *ComponentManager) APIGateway() manager.Manager
- func (m *ComponentManager) APIMap() manager.Manager
- func (m *ComponentManager) AnsibleServer() manager.Manager
- func (m *ComponentManager) AutoUpdate() manager.Manager
- func (m *ComponentManager) Baremetal() manager.Manager
- func (m *ComponentManager) BastionHost() manager.Manager
- func (m *ComponentManager) Climc() manager.Manager
- func (m *ComponentManager) CloudId() manager.Manager
- func (m *ComponentManager) Cloudevent() manager.Manager
- func (m *ComponentManager) Cloudmon() manager.Manager
- func (m *ComponentManager) Cloudmux() manager.Manager
- func (m *ComponentManager) Cloudnet() manager.Manager
- func (m *ComponentManager) Cloudproxy() manager.Manager
- func (m *ComponentManager) Devtool() manager.Manager
- func (m *ComponentManager) EChartsSSR() manager.Manager
- func (m *ComponentManager) EsxiAgent() manager.Manager
- func (m *ComponentManager) Etcd() manager.Manager
- func (m *ComponentManager) Extdb() manager.Manager
- func (m *ComponentManager) Glance() manager.Manager
- func (m *ComponentManager) Host() manager.Manager
- func (m *ComponentManager) HostDeployer() manager.Manager
- func (m *ComponentManager) HostHealth() manager.Manager
- func (m *ComponentManager) HostImage() manager.Manager
- func (m *ComponentManager) Influxdb() manager.Manager
- func (m *ComponentManager) Itsm() manager.Manager
- func (m *ComponentManager) Keystone() manager.Manager
- func (m *ComponentManager) KubeServer() manager.Manager
- func (m *ComponentManager) Lbgent() manager.Manager
- func (m *ComponentManager) Logger() manager.Manager
- func (m *ComponentManager) Meter() manager.Manager
- func (m *ComponentManager) Monitor() manager.Manager
- func (m *ComponentManager) MonitorStack() manager.Manager
- func (m *ComponentManager) Notify() manager.Manager
- func (m *ComponentManager) OvnNorth() manager.Manager
- func (m *ComponentManager) Region() manager.Manager
- func (m *ComponentManager) RegionDNS() manager.Manager
- func (m *ComponentManager) Report() manager.Manager
- func (m *ComponentManager) RunWithSession(oc *v1alpha1.OnecloudCluster, f func(s *mcclient.ClientSession) error) error
- func (m *ComponentManager) S3gateway() manager.Manager
- func (m *ComponentManager) Scheduledtask() manager.Manager
- func (m *ComponentManager) Scheduler() manager.Manager
- func (m *ComponentManager) ServiceOperator() manager.Manager
- func (m *ComponentManager) SetComponentAffinity(spec *v1alpha1.DeploymentSpec)
- func (m *ComponentManager) Suggestion() manager.Manager
- func (m *ComponentManager) Telegraf() manager.Manager
- func (m *ComponentManager) VictoriaMetrics() manager.Manager
- func (m *ComponentManager) VpcAgent() 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 ItsmConfigOption
- type JavaBaseConfig
- type JavaDBConfig
- type OnecloudResourceOperatorOption
- type PVCVolumePair
- type RegionDNSConfig
- type RegionDNSProxy
- type VolumeHelper
- func NewHostDeployerVolume(cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster, configMap string) *VolumeHelper
- func NewHostImageVolumeHelper(cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster, configMap string) *VolumeHelper
- func NewHostVolume(cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster, configMap string) *VolumeHelper
- func NewOvsVolumeHelper(cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster, configMap string) *VolumeHelper
- func NewTelegrafVolume(cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster) *VolumeHelper
- func NewVolumeHelper(oc *v1alpha1.OnecloudCluster, optCfgMap string, ...) *VolumeHelper
- func NewVolumeHelperWithEtcdTLS(oc *v1alpha1.OnecloudCluster, optCfgMap string, ...) *VolumeHelper
Constants ¶
View Source
const ( JAVA_APP_JAR = "JAVA_APP_JAR" JAVA_APP_WORKING_DIR = "/deployments" JAVA_OPTIONS = "JAVA_OPTIONS" )
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 (
ItsmTemplate = `` /* 2900-byte string literal not displayed */
)
View Source
const (
RegionDNSConfigTemplate = `` /* 376-byte string literal not displayed */
)
View Source
const ( // TimedOutReason is added in a deployment when its newest replica set fails to show any progress // within the given deadline (progressDeadlineSeconds). TimedOutReason = "ProgressDeadlineExceeded" )
View Source
const YUNION_HOST_ROOT = "/yunion-host-root"
Variables ¶
View Source
var ( GetEdition = v1alpha1.GetEdition IsEnterpriseEdition = v1alpha1.IsEnterpriseEdition )
View Source
var (
ErrLostQuorum = errors.Error("lost quorum")
)
View Source
var (
GetOwnerRef = controller.GetOwnerRef
)
Functions ¶
func ClientServiceName ¶
func CombineAnnotations ¶
CombineAnnotations merges two annotations maps
func CreateClientService ¶
func CreateClientService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference, nodePort int) error
func CreateOrUpdateConfigMap ¶
func CreatePeerService ¶
func CreatePeerService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference) error
func GetConfigVolumeMount ¶
func GetConfigVolumeMount(volMounts []corev1.VolumeMount) *corev1.VolumeMount
func GetDeploymentCondition ¶
func GetDeploymentCondition(status apps.DeploymentStatus, condType apps.DeploymentConditionType) *apps.DeploymentCondition
GetDeploymentCondition returns the condition with the provided type.
func IsPathIngressRule ¶
func NewServiceNodePort ¶
func NewServiceNodePort(name string, nodePort int32, targetPort int32) corev1.ServicePort
func SetDeploymentLastAppliedConfigAnnotation ¶
func SetDeploymentLastAppliedConfigAnnotation(deploy *apps.Deployment) error
func SetIngressLastAppliedConfigAnnotation ¶
func SetIngressLastAppliedConfigAnnotation(ing *unstructured.Unstructured) error
func SetJavaConfigVolumeMounts ¶
func SetJavaConfigVolumeMounts(volMounts []corev1.VolumeMount) []corev1.VolumeMount
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 cache.GenericLister, dsControl controller.DaemonSetControlInterface, dsLister appv1.DaemonSetLister, cronControl controller.CronJobControlInterface, cronLister batchlisters.CronJobLister, nodeLister corelisters.NodeLister, configer Configer, onecloudControl *controller.OnecloudControl, onecloudClusterControl controller.ClusterControlInterface, clusterVersion k8sutil.ClusterVersion, ) *ComponentManager
NewComponentManager return *BaseComponentManager
func (*ComponentManager) APIGateway ¶
func (m *ComponentManager) APIGateway() manager.Manager
func (*ComponentManager) APIMap ¶
func (m *ComponentManager) APIMap() 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) BastionHost ¶
func (m *ComponentManager) BastionHost() manager.Manager
func (*ComponentManager) Climc ¶
func (m *ComponentManager) Climc() manager.Manager
func (*ComponentManager) CloudId ¶
func (m *ComponentManager) CloudId() manager.Manager
func (*ComponentManager) Cloudevent ¶
func (m *ComponentManager) Cloudevent() manager.Manager
func (*ComponentManager) Cloudmon ¶
func (m *ComponentManager) Cloudmon() manager.Manager
func (*ComponentManager) Cloudmux ¶
func (m *ComponentManager) Cloudmux() manager.Manager
func (*ComponentManager) Cloudnet ¶
func (m *ComponentManager) Cloudnet() manager.Manager
func (*ComponentManager) Cloudproxy ¶
func (m *ComponentManager) Cloudproxy() manager.Manager
func (*ComponentManager) Devtool ¶
func (m *ComponentManager) Devtool() manager.Manager
func (*ComponentManager) EChartsSSR ¶
func (m *ComponentManager) EChartsSSR() manager.Manager
func (*ComponentManager) EsxiAgent ¶
func (m *ComponentManager) EsxiAgent() manager.Manager
func (*ComponentManager) Etcd ¶
func (m *ComponentManager) Etcd() manager.Manager
func (*ComponentManager) Extdb ¶
func (m *ComponentManager) Extdb() 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) HostHealth ¶
func (m *ComponentManager) HostHealth() manager.Manager
func (*ComponentManager) HostImage ¶
func (m *ComponentManager) HostImage() manager.Manager
func (*ComponentManager) Influxdb ¶
func (m *ComponentManager) Influxdb() manager.Manager
func (*ComponentManager) Itsm ¶
func (m *ComponentManager) Itsm() manager.Manager
func (*ComponentManager) Keystone ¶
func (m *ComponentManager) Keystone() manager.Manager
func (*ComponentManager) KubeServer ¶
func (m *ComponentManager) KubeServer() manager.Manager
func (*ComponentManager) Lbgent ¶
func (m *ComponentManager) Lbgent() manager.Manager
func (*ComponentManager) Logger ¶
func (m *ComponentManager) Logger() manager.Manager
func (*ComponentManager) Meter ¶
func (m *ComponentManager) Meter() manager.Manager
func (*ComponentManager) Monitor ¶
func (m *ComponentManager) Monitor() manager.Manager
func (*ComponentManager) MonitorStack ¶
func (m *ComponentManager) MonitorStack() manager.Manager
func (*ComponentManager) Notify ¶
func (m *ComponentManager) Notify() manager.Manager
func (*ComponentManager) OvnNorth ¶
func (m *ComponentManager) OvnNorth() manager.Manager
func (*ComponentManager) Region ¶
func (m *ComponentManager) Region() manager.Manager
func (*ComponentManager) RegionDNS ¶
func (m *ComponentManager) RegionDNS() manager.Manager
func (*ComponentManager) Report ¶
func (m *ComponentManager) Report() manager.Manager
func (*ComponentManager) RunWithSession ¶
func (m *ComponentManager) RunWithSession(oc *v1alpha1.OnecloudCluster, f func(s *mcclient.ClientSession) error) error
func (*ComponentManager) S3gateway ¶
func (m *ComponentManager) S3gateway() manager.Manager
func (*ComponentManager) Scheduledtask ¶
func (m *ComponentManager) Scheduledtask() manager.Manager
func (*ComponentManager) Scheduler ¶
func (m *ComponentManager) Scheduler() manager.Manager
func (*ComponentManager) ServiceOperator ¶
func (m *ComponentManager) ServiceOperator() manager.Manager
func (*ComponentManager) SetComponentAffinity ¶
func (m *ComponentManager) SetComponentAffinity(spec *v1alpha1.DeploymentSpec)
func (*ComponentManager) Suggestion ¶
func (m *ComponentManager) Suggestion() manager.Manager
func (*ComponentManager) Telegraf ¶
func (m *ComponentManager) Telegraf() manager.Manager
func (*ComponentManager) VictoriaMetrics ¶
func (m *ComponentManager) VictoriaMetrics() manager.Manager
func (*ComponentManager) VpcAgent ¶
func (m *ComponentManager) VpcAgent() 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 ItsmConfigOption ¶
type ItsmConfigOption struct { JavaDBConfig DB2nd string EncryptionKey string }
type JavaBaseConfig ¶
type JavaBaseConfig struct { Port int AuthURL string AuthDomain string AuthUsername string AuthPassword string AuthProject string Region string }
func NewJavaBaseConfig ¶
func NewJavaBaseConfig(oc *v1alpha1.OnecloudCluster, port int, user, passwd string) *JavaBaseConfig
type JavaDBConfig ¶
type JavaDBConfig struct { JavaBaseConfig DBHost string DBPort int32 DB string DBUser string DBPassowrd string }
func NewJavaDBConfig ¶
func NewJavaDBConfig(oc *v1alpha1.OnecloudCluster, cfg v1alpha1.ServiceDBCommonOptions) *JavaDBConfig
type OnecloudResourceOperatorOption ¶
type OnecloudResourceOperatorOption struct { WebhookPort int EnableLeaderElection bool EnableWebhooks bool SyncPeriod int Region string AuthURL string AdminUsername string AdminPassword string AdminDomain string AdminProject string APIntervalPending *int `json:"ap_interval_pending"` APIntervalWaiting *int `json:"ap_interval_waiting"` APDense bool `json:"ap_dense"` VMIntervalPending *int `json:"vm_interval_pending"` }
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 RegionDNSConfig ¶
type RegionDNSConfig struct { DBUser string DBPassword string DBHost string DBPort int32 DBName string DNSDomain string Region string Proxies []RegionDNSProxy }
func (RegionDNSConfig) GetContent ¶
func (c RegionDNSConfig) GetContent() (string, error)
type RegionDNSProxy ¶
type VolumeHelper ¶
type VolumeHelper struct {
// contains filtered or unexported fields
}
func NewHostDeployerVolume ¶
func NewHostDeployerVolume( cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster, configMap string, ) *VolumeHelper
func NewHostImageVolumeHelper ¶
func NewHostImageVolumeHelper( cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster, configMap string, ) *VolumeHelper
func NewHostVolume ¶
func NewHostVolume( cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster, configMap string, ) *VolumeHelper
func NewOvsVolumeHelper ¶
func NewOvsVolumeHelper( cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster, configMap string, ) *VolumeHelper
func NewTelegrafVolume ¶
func NewTelegrafVolume( cType v1alpha1.ComponentType, oc *v1alpha1.OnecloudCluster, ) *VolumeHelper
func NewVolumeHelper ¶
func NewVolumeHelper(oc *v1alpha1.OnecloudCluster, optCfgMap string, component v1alpha1.ComponentType) *VolumeHelper
func NewVolumeHelperWithEtcdTLS ¶
func NewVolumeHelperWithEtcdTLS( 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
Source Files
¶
- ansibleserver.go
- apigateway.go
- apimap.go
- autoupdate.go
- baremetal.go
- bastionhost.go
- climc.go
- cloudevent.go
- cloudid.go
- cloudmon.go
- cloudmux.go
- cloudnetserver.go
- cloudproxyserver.go
- component.go
- configer.go
- devtool.go
- echarts-ssr.go
- esxi.go
- etcd.go
- extdb.go
- glance.go
- host-deployer.go
- host-image.go
- host.go
- influxdb.go
- itsm.go
- keystone.go
- kubeserver.go
- lbagent.go
- logger.go
- meter.go
- monitor.go
- monitor_stack.go
- notify.go
- ovn-north.go
- region.go
- regiondns.go
- report.go
- s3gateway.go
- scheduledtask.go
- scheduler.go
- service_operator.go
- suggestion.go
- sync.go
- telegraf.go
- utils.go
- victoriametrics.go
- vpcagent.go
- web.go
- webconsole.go
- yunionagent.go
- yunionconf.go
Click to show internal directories.
Click to hide internal directories.