builder

package
v0.6.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: AGPL-3.0 Imports: 24 Imported by: 0

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(sts *appsv1.StatefulSet,
	backupPolicyName string,
	backupKey types.NamespacedName) (*dataprotectionv1alpha1.Backup, error)

func BuildBackupManifestsJob

func BuildBackupManifestsJob(key types.NamespacedName, backup *dataprotectionv1alpha1.Backup, podSpec *corev1.PodSpec) (*batchv1.Job, error)

func BuildCfgManagerContainer

func BuildCfgManagerContainer(sidecarRenderedParam *cfgcm.CfgManagerBuildParams) (*corev1.Container, error)

func BuildConfigMapWithTemplate

func BuildConfigMapWithTemplate(configs map[string]string,
	params BuilderParams,
	cmName string,
	configConstraintName string,
	tplCfg appsv1alpha1.ComponentTemplateSpec) (*corev1.ConfigMap, error)

func BuildConfigMapWithTemplateLow

func BuildConfigMapWithTemplateLow(cluster *appsv1alpha1.Cluster,
	component *component.SynthesizedComponent,
	configs map[string]string,
	cmName string,
	configConstraintName string,
	tplCfg appsv1alpha1.ComponentTemplateSpec) (*corev1.ConfigMap, error)

func BuildConnCredential

func BuildConnCredential(params BuilderParams) (*corev1.Secret, error)

func BuildConnCredentialLow

func BuildConnCredentialLow(clusterDefiniiton *appsv1alpha1.ClusterDefinition, cluster *appsv1alpha1.Cluster,
	component *component.SynthesizedComponent) (*corev1.Secret, error)

func BuildCronJob

func BuildCronJob(pvcKey types.NamespacedName,
	schedule string,
	sts *appsv1.StatefulSet) (*batchv1.CronJob, error)

func BuildDeploy

func BuildDeploy(reqCtx intctrlutil.RequestCtx, params BuilderParams) (*appsv1.Deployment, error)

func BuildDeployLow

func BuildDeployLow(reqCtx intctrlutil.RequestCtx, cluster *appsv1alpha1.Cluster,
	component *component.SynthesizedComponent) (*appsv1.Deployment, error)

func BuildEnvConfig

func BuildEnvConfig(params BuilderParams, reqCtx intctrlutil.RequestCtx, cli client.Client) (*corev1.ConfigMap, error)

BuildEnvConfig build 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 BuildEnvConfigLow

func BuildEnvConfigLow(reqCtx intctrlutil.RequestCtx, cli client.Client, cluster *appsv1alpha1.Cluster,
	component *component.SynthesizedComponent) (*corev1.ConfigMap, error)

func BuildHeadlessSvc

func BuildHeadlessSvc(params BuilderParams) (*corev1.Service, error)

func BuildHeadlessSvcLow

func BuildHeadlessSvcLow(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent) (*corev1.Service, error)

func BuildPDB

func BuildPDB(params BuilderParams) (*policyv1.PodDisruptionBudget, error)

func BuildPITRJob

func BuildPITRJob(name string, cluster *appsv1alpha1.Cluster, image string, command []string, args []string,
	volumes []corev1.Volume, volumeMounts []corev1.VolumeMount, env []corev1.EnvVar) (*batchv1.Job, error)

func BuildPersistentVolumeClaimLabels

func BuildPersistentVolumeClaimLabels(sts *appsv1.StatefulSet, pvc *corev1.PersistentVolumeClaim,
	component *component.SynthesizedComponent, pvcTplName string)

BuildPersistentVolumeClaimLabels builds a pvc name label, and synchronize the labels on the sts to the pvc labels.

func BuildSts

func BuildSts(reqCtx intctrlutil.RequestCtx, params BuilderParams, envConfigName string) (*appsv1.StatefulSet, error)

func BuildStsLow

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

func BuildSvcListLow

func BuildSvcListLow(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent) ([]*corev1.Service, error)

func BuildSvcListWithCustomAttributes added in v0.6.0

func BuildSvcListWithCustomAttributes(cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent,
	customAttributeSetter func(*corev1.Service)) ([]*corev1.Service, error)

func BuildTLSSecret

func BuildTLSSecret(namespace, clusterName, componentName string) (*corev1.Secret, error)

func BuildVolumeSnapshot

func BuildVolumeSnapshot(snapshotKey types.NamespacedName,
	pvcName string,
	sts *appsv1.StatefulSet) (*snapshotv1.VolumeSnapshot, error)

Types

type BuilderParams

type BuilderParams struct {
	ClusterDefinition *appsv1alpha1.ClusterDefinition
	ClusterVersion    *appsv1alpha1.ClusterVersion
	Cluster           *appsv1alpha1.Cluster
	Component         *component.SynthesizedComponent
}

Jump to

Keyboard shortcuts

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