Documentation ¶
Index ¶
- Variables
- func AnnProm(port int32) map[string]string
- func ClusterConfigMapName(oc *v1alpha1.OnecloudCluster) string
- func ClustercertSecretName(oc *v1alpha1.OnecloudCluster) string
- func ComponentConfigMapName(oc *v1alpha1.OnecloudCluster, component v1alpha1.ComponentType) string
- func GetAuthURL(oc *v1alpha1.OnecloudCluster) string
- func GetDefaultProxyAgentName() string
- func GetOwnerRef(oc *v1alpha1.OnecloudCluster) metav1.OwnerReference
- func GetServiceType(services []v1alpha1.Service, serviceName string) corev1.ServiceType
- func IsDockerComposeCluster(oc *v1alpha1.OnecloudCluster) bool
- func IsDockerComposeClusterName(name string) bool
- func IsRequeueError(err error) bool
- func KeystoneComponentName(clusterName string) string
- func NewCACertAndKey(certSpec *certutil.Config) (*x509.Certificate, crypto.Signer, error)
- func NewClusterComponentName(clusterName string, componentName v1alpha1.ComponentType) string
- func NewOnecloudClientSession(oc *v1alpha1.OnecloudCluster) (*mcclient.ClientSession, error)
- func NewOnecloudSessionByToken(cli *mcclient.Client, region string, token mcclient.TokenCredential) (*mcclient.ClientSession, error)
- func NewOnecloudSimpleClientSession(oc *v1alpha1.OnecloudCluster) (*mcclient.ClientSession, error)
- func PoliciesPublic(s *mcclient.ClientSession, types []string) error
- func RequeueErrorf(format string, a ...interface{}) error
- func RolesPublic(s *mcclient.ClientSession, roles []string) error
- func RunWithSession(oc *v1alpha1.OnecloudCluster, f func(s *mcclient.ClientSession) error) error
- type CertsStore
- type ClusterControlInterface
- type ComponentManager
- type ConfigMapControlInterface
- type CronJobControlInterface
- type DaemonSetControlInterface
- type DeploymentControlInterface
- type IngressControlInterface
- type Object
- type OnecloudCert
- func NewClusterCACert() *OnecloudCert
- func NewEtcdClientCert(caName string, serviceName string, certName string) *OnecloudCert
- func NewEtcdClusterCACert() *OnecloudCert
- func NewEtcdPeerCert(caName string, serviceName string, certName string) *OnecloudCert
- func NewEtcdServerCert(caName string, serviceName string, certName string) *OnecloudCert
- func NewServiceCert(caName string, serviceName string, certName string) *OnecloudCert
- func (k *OnecloudCert) CreateAsCA(oc *v1alpha1.OnecloudCluster) (*x509.Certificate, crypto.Signer, error)
- func (k *OnecloudCert) CreateFromCA(oc *v1alpha1.OnecloudCluster, caCert *x509.Certificate, caKey crypto.Signer) (*x509.Certificate, crypto.Signer, error)
- func (k *OnecloudCert) GetConfig(oc *v1alpha1.OnecloudCluster) (*certutil.Config, error)
- type OnecloudCertControlInterface
- type OnecloudControl
- type OnecloudRCAdminConfig
- type PVCControlInterface
- type PhaseControl
- func NewCloudproxyPhaseControl(c ComponentManager) PhaseControl
- func NewDevtoolPhaseControl(c ComponentManager) PhaseControl
- func NewGlancePhaseControl(c ComponentManager) PhaseControl
- func NewItsmEndpointComponent(man ComponentManager, ctype v1alpha1.ComponentType, serviceName string, ...) PhaseControl
- func NewKeystonePhaseControl(cm ComponentManager) PhaseControl
- func NewKubeServerPhaseControl(cm ComponentManager, nodeLister corelisters.NodeLister) PhaseControl
- func NewMonitorPhaseControl(c ComponentManager) PhaseControl
- func NewRegionPhaseControl(cm ComponentManager) PhaseControl
- func NewRegisterEndpointComponent(man ComponentManager, ctype v1alpha1.ComponentType, serviceName string, ...) PhaseControl
- func NewRegisterServiceComponent(man ComponentManager, serviceName string, serviceType string) PhaseControl
- func NewTSDBEndpointComponent(man ComponentManager, ctype v1alpha1.ComponentType, serviceName string, ...) PhaseControl
- func NewYunionAgentPhaseControl(cm ComponentManager) PhaseControl
- type RequeueError
- type ServiceControlInterface
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ClusterConfigMapName ¶
func ClusterConfigMapName(oc *v1alpha1.OnecloudCluster) string
ClusterConfigMapName returns the default OnecloudClusterConfig ConfigMap name
func ClustercertSecretName ¶
func ClustercertSecretName(oc *v1alpha1.OnecloudCluster) string
ClusterCertSecretName returns the default cluster certs name
func ComponentConfigMapName ¶
func ComponentConfigMapName(oc *v1alpha1.OnecloudCluster, component v1alpha1.ComponentType) string
ComponentConfigMapName returns the default ConfigMap name of the specified component type
func GetAuthURL ¶
func GetAuthURL(oc *v1alpha1.OnecloudCluster) string
func GetDefaultProxyAgentName ¶
func GetDefaultProxyAgentName() string
func GetOwnerRef ¶
func GetOwnerRef(oc *v1alpha1.OnecloudCluster) metav1.OwnerReference
GetOwnerRef returns OnecloudCluster's OwnerReference
func GetServiceType ¶
func GetServiceType(services []v1alpha1.Service, serviceName string) corev1.ServiceType
GetServiceType returns component's service type
func IsDockerComposeCluster ¶
func IsDockerComposeCluster(oc *v1alpha1.OnecloudCluster) bool
func IsRequeueError ¶
IsRequeueError returns whether err is a RequeueError
func KeystoneComponentName ¶
KeystoneComponentName return keystone component name
func NewCACertAndKey ¶
NewCACertAndKey will generate a self signed CA.
func NewClusterComponentName ¶
func NewClusterComponentName(clusterName string, componentName v1alpha1.ComponentType) string
func NewOnecloudClientSession ¶
func NewOnecloudClientSession(oc *v1alpha1.OnecloudCluster) (*mcclient.ClientSession, error)
func NewOnecloudSessionByToken ¶
func NewOnecloudSessionByToken(cli *mcclient.Client, region string, token mcclient.TokenCredential) (*mcclient.ClientSession, error)
func NewOnecloudSimpleClientSession ¶
func NewOnecloudSimpleClientSession(oc *v1alpha1.OnecloudCluster) (*mcclient.ClientSession, error)
func PoliciesPublic ¶
func PoliciesPublic(s *mcclient.ClientSession, types []string) error
func RequeueErrorf ¶
RequeueErrorf returns a RequeueError
func RolesPublic ¶
func RolesPublic(s *mcclient.ClientSession, roles []string) error
func RunWithSession ¶
func RunWithSession(oc *v1alpha1.OnecloudCluster, f func(s *mcclient.ClientSession) error) error
Types ¶
type CertsStore ¶
func CreateCertPair ¶
func CreateCertPair(oc *v1alpha1.OnecloudCluster) (CertsStore, error)
func (CertsStore) WriteCert ¶
func (s CertsStore) WriteCert(name string, cert *x509.Certificate) error
func (CertsStore) WriteCertAndKey ¶
func (s CertsStore) WriteCertAndKey(name string, cert *x509.Certificate, key crypto.Signer) error
type ClusterControlInterface ¶
type ClusterControlInterface interface { UpdateCluster(cluster *v1alpha1.OnecloudCluster, newStatus *v1alpha1.OnecloudClusterStatus, oldStatus *v1alpha1.OnecloudClusterStatus) (*v1alpha1.OnecloudCluster, error) GetCluster(namespace, name string) (*v1alpha1.OnecloudCluster, error) }
ClusterControlInterface manages Onecloud clusters
func NewClusterControl ¶
func NewClusterControl( cli versioned.Interface, ocLister listers.OnecloudClusterLister, recorder record.EventRecorder) ClusterControlInterface
NewClusterControl creates a new ClsuterControlInterface
type ComponentManager ¶
type ComponentManager interface { RunWithSession(oc *v1alpha1.OnecloudCluster, f func(s *mcclient.ClientSession) error) error // RunWithSessionNoEndpoints(oc *v1alpha1.OnecloudCluster, f func(s *mcclient.ClientSession) error) error GetController() *OnecloudControl GetCluster() *v1alpha1.OnecloudCluster Keystone() PhaseControl KubeServer(nodeLister corelisters.NodeLister) PhaseControl Region() PhaseControl Glance() PhaseControl YunionAgent() PhaseControl Devtool() PhaseControl Monitor() PhaseControl Cloudproxy() PhaseControl EChartsSSR() PhaseControl }
type ConfigMapControlInterface ¶
type ConfigMapControlInterface interface { CreateConfigMap(*v1alpha1.OnecloudCluster, *corev1.ConfigMap) error UpdateConfigMap(*v1alpha1.OnecloudCluster, *corev1.ConfigMap) (*corev1.ConfigMap, error) DeleteConfigMap(*v1alpha1.OnecloudCluster, *corev1.ConfigMap) error }
func NewConfigMapControl ¶
func NewConfigMapControl(kubeCli kubernetes.Interface, cfgLister corelisters.ConfigMapLister, recorder record.EventRecorder) ConfigMapControlInterface
type CronJobControlInterface ¶
type CronJobControlInterface interface { CreateCronJob(*v1alpha1.OnecloudCluster, *batchv1.CronJob) error UpdateCronJob(*v1alpha1.OnecloudCluster, *batchv1.CronJob) (*batchv1.CronJob, error) DeleteCronJob(*v1alpha1.OnecloudCluster, string) error }
func NewCronJobControl ¶
func NewCronJobControl( kubeCli kubernetes.Interface, cronJobLister v1beta1.CronJobLister, recorder record.EventRecorder, ) CronJobControlInterface
type DaemonSetControlInterface ¶
type DaemonSetControlInterface interface { CreateDaemonSet(*v1alpha1.OnecloudCluster, *apps.DaemonSet) error UpdateDaemonSet(*v1alpha1.OnecloudCluster, *apps.DaemonSet) (*apps.DaemonSet, error) DeleteDaemonSet(*v1alpha1.OnecloudCluster, *apps.DaemonSet) error }
func NewDaemonSetControl ¶
func NewDaemonSetControl( kubeCli kubernetes.Interface, daemonSetLister appslisters.DaemonSetLister, recorder record.EventRecorder, ) DaemonSetControlInterface
type DeploymentControlInterface ¶
type DeploymentControlInterface interface { // CreateDeployment creates deployment in a OnecloudCluster. CreateDeployment(*v1alpha1.OnecloudCluster, *apps.Deployment) error // UpdateDeployment updates a deployment in a OnecloudCluster. UpdateDeployment(*v1alpha1.OnecloudCluster, *apps.Deployment) (*apps.Deployment, error) // DeleteDeployment deletes a deployment in a OnecloudCluster. DeleteDeployment(*v1alpha1.OnecloudCluster, string) error }
DeploymentControlInterface defines the interface that uses to create, update, and delete Deployment
func NewDeploymentControl ¶
func NewDeploymentControl(kubeCli kubernetes.Interface, deployLister appslisters.DeploymentLister, recorder record.EventRecorder) DeploymentControlInterface
NewDeploymentControl returns a DeploymentControlInterface
type IngressControlInterface ¶
type IngressControlInterface interface { CreateIngress(*v1alpha1.OnecloudCluster, *unstructured.Unstructured) error UpdateIngress(*v1alpha1.OnecloudCluster, *unstructured.Unstructured) (*unstructured.Unstructured, error) DeleteIngress(*v1alpha1.OnecloudCluster, *unstructured.Unstructured) error }
IngressControlInterface defines the interface that uses to create, update and delete Ingress
func NewIngressControl ¶
func NewIngressControl( dCli dynamic.Interface, ingressLister cache.GenericLister, recorder record.EventRecorder, cv k8sutil.ClusterVersion, ) IngressControlInterface
type OnecloudCert ¶
type OnecloudCert struct { Name string LongName string BaseName string CAName string // contains filtered or unexported fields }
func NewClusterCACert ¶
func NewClusterCACert() *OnecloudCert
func NewEtcdClientCert ¶
func NewEtcdClientCert(caName string, serviceName string, certName string) *OnecloudCert
func NewEtcdClusterCACert ¶
func NewEtcdClusterCACert() *OnecloudCert
func NewEtcdPeerCert ¶
func NewEtcdPeerCert(caName string, serviceName string, certName string) *OnecloudCert
func NewEtcdServerCert ¶
func NewEtcdServerCert(caName string, serviceName string, certName string) *OnecloudCert
func NewServiceCert ¶
func NewServiceCert(caName string, serviceName string, certName string) *OnecloudCert
func (*OnecloudCert) CreateAsCA ¶
func (k *OnecloudCert) CreateAsCA(oc *v1alpha1.OnecloudCluster) (*x509.Certificate, crypto.Signer, error)
func (*OnecloudCert) CreateFromCA ¶
func (k *OnecloudCert) CreateFromCA(oc *v1alpha1.OnecloudCluster, caCert *x509.Certificate, caKey crypto.Signer) (*x509.Certificate, crypto.Signer, error)
CreateFromCA makes and writes a certificate using the given CA cert and key.
func (*OnecloudCert) GetConfig ¶
func (k *OnecloudCert) GetConfig(oc *v1alpha1.OnecloudCluster) (*certutil.Config, error)
type OnecloudCertControlInterface ¶
type OnecloudCertControlInterface interface { // CreateCert CreateCert(oc *v1alpha1.OnecloudCluster) error // GetCertSecret return certs secret // GetCertSecret(oc *v1alpha1.OnecloudCluster) (*corev1.Secret, error) CreateEtcdCert(oc *v1alpha1.OnecloudCluster) error }
func NewOnecloudCertControl ¶
func NewOnecloudCertControl(kubeCli kubernetes.Interface, secretLister corelisters.SecretLister, recorder record.EventRecorder) OnecloudCertControlInterface
type OnecloudControl ¶
type OnecloudControl struct {
// contains filtered or unexported fields
}
func NewOnecloudControl ¶
func NewOnecloudControl(kubeCli clientset.Interface) *OnecloudControl
func (*OnecloudControl) Components ¶
func (w *OnecloudControl) Components(oc *v1alpha1.OnecloudCluster) ComponentManager
func (*OnecloudControl) NewWaiter ¶
func (w *OnecloudControl) NewWaiter(oc *v1alpha1.OnecloudCluster) onecloud.Waiter
func (*OnecloudControl) RunWithSession ¶
func (w *OnecloudControl) RunWithSession(oc *v1alpha1.OnecloudCluster, f func(s *mcclient.ClientSession) error) error
type OnecloudRCAdminConfig ¶
type OnecloudRCAdminConfig struct { AuthURL string Region string Username string Password string DomainName string ProjectName string ProjectDomain string Insecure bool Debug bool Timeout int CertFile string KeyFile string }
func NewOnecloudRCAdminConfig ¶
func NewOnecloudRCAdminConfig(oc *v1alpha1.OnecloudCluster, debug bool) *OnecloudRCAdminConfig
func (*OnecloudRCAdminConfig) ToAuthInfo ¶
func (config *OnecloudRCAdminConfig) ToAuthInfo() *auth.AuthInfo
type PVCControlInterface ¶
type PVCControlInterface interface { CreatePVC(*v1alpha1.OnecloudCluster, *corev1.PersistentVolumeClaim) error UpdatePVC(*v1alpha1.OnecloudCluster, *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) DeletePVC(*v1alpha1.OnecloudCluster, *corev1.PersistentVolumeClaim) error }
func NewPVCControl ¶
func NewPVCControl(kubeCli kubernetes.Interface, pvcLister corelisters.PersistentVolumeClaimLister, recorder record.EventRecorder) PVCControlInterface
type PhaseControl ¶
type PhaseControl interface { Setup() error SystemInit(oc *v1alpha1.OnecloudCluster) error }
func NewCloudproxyPhaseControl ¶
func NewCloudproxyPhaseControl(c ComponentManager) PhaseControl
func NewDevtoolPhaseControl ¶
func NewDevtoolPhaseControl(c ComponentManager) PhaseControl
func NewGlancePhaseControl ¶
func NewGlancePhaseControl(c ComponentManager) PhaseControl
func NewItsmEndpointComponent ¶
func NewItsmEndpointComponent(man ComponentManager, ctype v1alpha1.ComponentType, serviceName string, serviceType string, port int, prefix string) PhaseControl
func NewKeystonePhaseControl ¶
func NewKeystonePhaseControl(cm ComponentManager) PhaseControl
func NewKubeServerPhaseControl ¶
func NewKubeServerPhaseControl(cm ComponentManager, nodeLister corelisters.NodeLister) PhaseControl
func NewMonitorPhaseControl ¶
func NewMonitorPhaseControl(c ComponentManager) PhaseControl
func NewRegionPhaseControl ¶
func NewRegionPhaseControl(cm ComponentManager) PhaseControl
func NewRegisterEndpointComponent ¶
func NewRegisterEndpointComponent( man ComponentManager, ctype v1alpha1.ComponentType, serviceName string, serviceType string, port int, prefix string, ) PhaseControl
func NewRegisterServiceComponent ¶
func NewRegisterServiceComponent( man ComponentManager, serviceName string, serviceType string, ) PhaseControl
func NewTSDBEndpointComponent ¶
func NewTSDBEndpointComponent( man ComponentManager, ctype v1alpha1.ComponentType, serviceName string, serviceType string, port int, prefix string, ) PhaseControl
func NewYunionAgentPhaseControl ¶
func NewYunionAgentPhaseControl(cm ComponentManager) PhaseControl
type RequeueError ¶
type RequeueError struct {
// contains filtered or unexported fields
}
RequeueError is used to requeue the item, this error type should't be considered as a real error
func (*RequeueError) Error ¶
func (re *RequeueError) Error() string
type ServiceControlInterface ¶
type ServiceControlInterface interface { CreateService(*v1alpha1.OnecloudCluster, *corev1.Service) error UpdateService(*v1alpha1.OnecloudCluster, *corev1.Service) (*corev1.Service, error) DeleteService(*v1alpha1.OnecloudCluster, *corev1.Service) error }
ServiceControlInterface manages Services used in OnecloudCluster
func NewServiceControl ¶
func NewServiceControl(kubeCli kubernetes.Interface, svcLister corelisters.ServiceLister, recorder record.EventRecorder) ServiceControlInterface
NewServiceControl creates a new ServiceControlInterface