component

package
v0.0.0-...-6c4e8d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 70 Imported by: 0

Documentation

Index

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 ClientServiceName(clusterName string) string

func CombineAnnotations

func CombineAnnotations(a, b map[string]string) map[string]string

CombineAnnotations merges two annotations maps

func CreateClientService

func CreateClientService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference, nodePort int) error

func CreateOrUpdateConfigMap

func CreateOrUpdateConfigMap(client clientset.Interface, cm *corev1.ConfigMap) error

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 IsPathIngressRule(path string, paths []interface{}) bool

func NewServiceNodePort

func NewServiceNodePort(name string, nodePort int32, targetPort int32) corev1.ServicePort

func SetConfigMapLastAppliedConfigAnnotation

func SetConfigMapLastAppliedConfigAnnotation(cfg *corev1.ConfigMap) error

func SetCronJobLastAppliedConfigAnnotation

func SetCronJobLastAppliedConfigAnnotation(cronJob *batchv1.CronJob) error

func SetDaemonSetLastAppliedConfigAnnotation

func SetDaemonSetLastAppliedConfigAnnotation(ds *apps.DaemonSet) error

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 SetJavaConfigVolumes

func SetJavaConfigVolumes(vols []corev1.Volume) []corev1.Volume

func SetServiceLastAppliedConfigAnnotation

func SetServiceLastAppliedConfigAnnotation(svc *corev1.Service) error

SetServiceLastAppliedConfigAnnotation set last applied config info to Service's annotation

Types

type ComponentManager

type ComponentManager struct {
	// contains filtered or unexported fields
}

func NewComponentManager

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
}

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 RegionDNSProxy struct {
	From string
	To   string
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL