builder

package
v0.5.3-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: AGPL-3.0 Imports: 25 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 BuildConnCredential

func BuildConnCredential(params BuilderParams) (*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 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 BuildHeadlessSvc

func BuildHeadlessSvc(params BuilderParams) (*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 BuildSvcList

func BuildSvcList(params BuilderParams) ([]*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