factory

package
v0.7.2-beta.20 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: AGPL-3.0 Imports: 29 Imported by: 1

Documentation

Index

Constants

View Source
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) *rbacv1.ClusterRoleBinding

func BuildCommonLabels

func BuildCommonLabels(cluster *appsv1alpha1.Cluster,
	component *component.SynthesizedComponent) map[string]string

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 BuildEnvConfig

func BuildEnvConfig(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent) *corev1.ConfigMap

BuildEnvConfig builds cluster component context ConfigMap object, which is to be used in workload container's envFrom.configMapRef with name of "$(cluster.metadata.name)-$(component.name)-env" pattern.

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(reqCtx intctrlutil.RequestCtx, cluster *appsv1alpha1.Cluster,
	component *component.SynthesizedComponent, envConfigName string) (*workloads.ReplicatedStateMachine, error)

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) *rbacv1.RoleBinding

func BuildServiceAccount

func BuildServiceAccount(cluster *appsv1alpha1.Cluster) *corev1.ServiceAccount

func BuildSts

func BuildSts(reqCtx intctrlutil.RequestCtx, cluster *appsv1alpha1.Cluster,
	component *component.SynthesizedComponent, envConfigName string) (*appsv1.StatefulSet, error)

func BuildVolumeSnapshotClass

func BuildVolumeSnapshotClass(name string, driver string) *snapshotv1.VolumeSnapshotClass

Types

This section is empty.

Jump to

Keyboard shortcuts

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