Documentation ¶
Index ¶
- Constants
- func BuildBackup(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent, ...) *dpv1alpha1.Backup
- func BuildCfgManagerContainer(sidecarRenderedParam *cfgcm.CfgManagerBuildParams, ...) (*corev1.Container, error)
- func BuildCfgManagerToolsContainer(sidecarRenderedParam *cfgcm.CfgManagerBuildParams, ...) ([]corev1.Container, error)
- func BuildClusterRoleBinding(cluster *appsv1alpha1.Cluster, saName string) *rbacv1.ClusterRoleBinding
- func BuildConfigMapWithTemplate(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent, ...) *corev1.ConfigMap
- func BuildConnCredential(clusterDefinition *appsv1alpha1.ClusterDefinition, ...) *corev1.Secret
- func BuildConnCredential4Cluster(cluster *appsv1alpha1.Cluster, name string, data map[string][]byte) *corev1.Secret
- func BuildConnCredential4Component(comp *component.SynthesizedComponent, name string, data map[string][]byte) *corev1.Secret
- func BuildPDB(synthesizedComp *component.SynthesizedComponent) *policyv1.PodDisruptionBudget
- func BuildPVC(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent, ...) *corev1.PersistentVolumeClaim
- func BuildPersistentVolumeClaimLabels(component *component.SynthesizedComponent, pvc *corev1.PersistentVolumeClaim, ...)
- func BuildRSM(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent) (*workloads.ReplicatedStateMachine, error)
- func BuildRSMFromConvertor(cluster *appsv1alpha1.Cluster, synthesizeComp *component.SynthesizedComponent) (*workloads.ReplicatedStateMachine, error)
- func BuildRSMWrapper(cluster *appsv1alpha1.Cluster, synthesizeComp *component.SynthesizedComponent) (*workloads.ReplicatedStateMachine, error)
- func BuildRestoreJob(cluster *appsv1alpha1.Cluster, ...) (*batchv1.Job, error)
- func BuildRoleBinding(cluster *appsv1alpha1.Cluster, saName string) *rbacv1.RoleBinding
- func BuildServiceAccount(cluster *appsv1alpha1.Cluster, saName string) *corev1.ServiceAccount
- func BuildSts(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent) (*appsv1.StatefulSet, error)
- func BuildVolumeSnapshotClass(name string, driver string) *snapshotv1.VolumeSnapshotClass
Constants ¶
const ( VolumeName = "tls" CAName = "ca.crt" CertName = "tls.crt" KeyName = "tls.key" MountPath = "/etc/pki/tls" )
Variables ¶
This section is empty.
Functions ¶
func BuildBackup ¶
func BuildBackup(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent, backupPolicyName string, backupKey types.NamespacedName, backupMethod string) *dpv1alpha1.Backup
func BuildCfgManagerContainer ¶
func BuildCfgManagerContainer(sidecarRenderedParam *cfgcm.CfgManagerBuildParams, component *component.SynthesizedComponent) (*corev1.Container, error)
func BuildCfgManagerToolsContainer ¶
func BuildCfgManagerToolsContainer(sidecarRenderedParam *cfgcm.CfgManagerBuildParams, component *component.SynthesizedComponent, toolsMetas []appsv1alpha1.ToolConfig, toolsMap map[string]cfgcm.ConfigSpecMeta) ([]corev1.Container, error)
func BuildClusterRoleBinding ¶
func BuildClusterRoleBinding(cluster *appsv1alpha1.Cluster, saName string) *rbacv1.ClusterRoleBinding
func BuildConfigMapWithTemplate ¶
func BuildConfigMapWithTemplate(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent, configs map[string]string, cmName string, configTemplateSpec appsv1alpha1.ComponentTemplateSpec) *corev1.ConfigMap
func BuildConnCredential ¶
func BuildConnCredential(clusterDefinition *appsv1alpha1.ClusterDefinition, cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent) *corev1.Secret
func BuildPDB ¶
func BuildPDB(synthesizedComp *component.SynthesizedComponent) *policyv1.PodDisruptionBudget
func BuildPVC ¶
func BuildPVC(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent, vct *corev1.PersistentVolumeClaimTemplate, pvcKey types.NamespacedName, snapshotName string) *corev1.PersistentVolumeClaim
func BuildPersistentVolumeClaimLabels ¶
func BuildPersistentVolumeClaimLabels(component *component.SynthesizedComponent, pvc *corev1.PersistentVolumeClaim, pvcTplName string)
BuildPersistentVolumeClaimLabels builds a pvc name label, and synchronize the labels from sts to pvc.
func BuildRSM ¶
func BuildRSM(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent) (*workloads.ReplicatedStateMachine, error)
BuildRSM builds a ReplicatedStateMachine object based on the old CLusterDefinition API, and depends on the the deprecated fields in the SynthesizedComponent. TODO(xingran): This function will be deprecated in the future, and the BuildRSMFromConvertor function will be used instead, do not add new features to this function.
func BuildRSMFromConvertor ¶
func BuildRSMFromConvertor(cluster *appsv1alpha1.Cluster, synthesizeComp *component.SynthesizedComponent) (*workloads.ReplicatedStateMachine, error)
BuildRSMFromConvertor builds a ReplicatedStateMachine object based on the new ComponentDefinition and Component API, and does not depend on the deprecated fields in the SynthesizedComponent.
func BuildRSMWrapper ¶
func BuildRSMWrapper(cluster *appsv1alpha1.Cluster, synthesizeComp *component.SynthesizedComponent) (*workloads.ReplicatedStateMachine, error)
BuildRSMWrapper builds a ReplicatedStateMachine object based on Cluster, SynthesizedComponent.
func BuildRestoreJob ¶
func BuildRestoreJob(cluster *appsv1alpha1.Cluster, synthesizedComponent *component.SynthesizedComponent, name, image string, command []string, volumes []corev1.Volume, volumeMounts []corev1.VolumeMount, env []corev1.EnvVar, resources *corev1.ResourceRequirements) (*batchv1.Job, error)
func BuildRoleBinding ¶
func BuildRoleBinding(cluster *appsv1alpha1.Cluster, saName string) *rbacv1.RoleBinding
func BuildServiceAccount ¶
func BuildServiceAccount(cluster *appsv1alpha1.Cluster, saName string) *corev1.ServiceAccount
func BuildSts ¶
func BuildSts(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent) (*appsv1.StatefulSet, error)
func BuildVolumeSnapshotClass ¶
func BuildVolumeSnapshotClass(name string, driver string) *snapshotv1.VolumeSnapshotClass
Types ¶
This section is empty.