Search in sources :

Example 1 with StackGresBaseBackupConfig

use of io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupConfig in project stackgres by ongres.

the class BackupCronJob method createCronJob.

private CronJob createCronJob(StackGresClusterContext context, StackGresBackupConfig backupConfig) {
    String namespace = context.getSource().getMetadata().getNamespace();
    String name = context.getSource().getMetadata().getName();
    final StackGresCluster cluster = context.getSource();
    Map<String, String> labels = labelFactory.scheduledBackupPodLabels(cluster);
    return new CronJobBuilder().withNewMetadata().withNamespace(namespace).withName(backupName(context)).withLabels(labels).endMetadata().withNewSpec().withConcurrencyPolicy("Allow").withFailedJobsHistoryLimit(10).withStartingDeadlineSeconds(5 * 60L).withSchedule(Optional.of(backupConfig).map(StackGresBackupConfig::getSpec).map(StackGresBackupConfigSpec::getBaseBackups).map(StackGresBaseBackupConfig::getCronSchedule).orElse("0 5 * * *")).withJobTemplate(new JobTemplateSpecBuilder().withNewMetadata().withNamespace(namespace).withName(backupName(context)).withLabels(labels).endMetadata().withNewSpec().withBackoffLimit(3).withCompletions(1).withParallelism(1).withNewTemplate().withNewMetadata().withNamespace(namespace).withName(backupName(context)).withLabels(labels).endMetadata().withNewSpec().withSecurityContext(podSecurityFactory.createResource(context)).withRestartPolicy("OnFailure").withServiceAccountName(PatroniRoleGenerator.roleName(context)).withContainers(new ContainerBuilder().withName("create-backup").withImage(StackGresComponent.KUBECTL.findLatestImageName()).withImagePullPolicy("IfNotPresent").withEnv(ImmutableList.<EnvVar>builder().addAll(getClusterEnvVars(context)).add(new EnvVarBuilder().withName("CLUSTER_NAMESPACE").withValue(namespace).build(), new EnvVarBuilder().withName("CLUSTER_NAME").withValue(name).build(), new EnvVarBuilder().withName("CRONJOB_NAME").withValue(backupName(context)).build(), new EnvVarBuilder().withName("BACKUP_CONFIG_CRD_NAME").withValue(CustomResource.getCRDName(StackGresBackupConfig.class)).build(), new EnvVarBuilder().withName("BACKUP_CONFIG").withValue(backupConfig.getMetadata().getName()).build(), new EnvVarBuilder().withName("BACKUP_CRD_KIND").withValue(HasMetadata.getKind(StackGresBackup.class)).build(), new EnvVarBuilder().withName("BACKUP_CRD_NAME").withValue(CustomResource.getCRDName(StackGresBackup.class)).build(), new EnvVarBuilder().withName("BACKUP_CRD_APIVERSION").withValue(HasMetadata.getApiVersion(StackGresBackup.class)).build(), new EnvVarBuilder().withName("BACKUP_PHASE_RUNNING").withValue(BackupPhase.RUNNING.label()).build(), new EnvVarBuilder().withName("BACKUP_PHASE_COMPLETED").withValue(BackupPhase.COMPLETED.label()).build(), new EnvVarBuilder().withName("BACKUP_PHASE_FAILED").withValue(BackupPhase.FAILED.label()).build(), new EnvVarBuilder().withName("PATRONI_ROLE_KEY").withValue(StackGresContext.ROLE_KEY).build(), new EnvVarBuilder().withName("PATRONI_PRIMARY_ROLE").withValue(StackGresContext.PRIMARY_ROLE).build(), new EnvVarBuilder().withName("PATRONI_REPLICA_ROLE").withValue(StackGresContext.REPLICA_ROLE).build(), new EnvVarBuilder().withName("SCHEDULED_BACKUP_KEY").withValue(StackGresContext.SCHEDULED_BACKUP_KEY).build(), new EnvVarBuilder().withName("RIGHT_VALUE").withValue(StackGresContext.RIGHT_VALUE).build(), new EnvVarBuilder().withName("PATRONI_CLUSTER_LABELS").withValue(labelFactory.patroniClusterLabels(cluster).entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.joining(","))).build(), new EnvVarBuilder().withName("PATRONI_CONTAINER_NAME").withValue(StackgresClusterContainers.PATRONI).build(), new EnvVarBuilder().withName("SERVICE_ACCOUNT").withValueFrom(new EnvVarSourceBuilder().withFieldRef(new ObjectFieldSelectorBuilder().withFieldPath("spec.serviceAccountName").build()).build()).build(), new EnvVarBuilder().withName("POD_NAME").withValueFrom(new EnvVarSourceBuilder().withFieldRef(new ObjectFieldSelectorBuilder().withFieldPath("metadata.name").build()).build()).build(), new EnvVarBuilder().withName("RETAIN").withValue(Optional.of(backupConfig).map(StackGresBackupConfig::getSpec).map(StackGresBackupConfigSpec::getBaseBackups).map(StackGresBaseBackupConfig::getRetention).map(String::valueOf).orElse("5")).build(), new EnvVarBuilder().withName("WINDOW").withValue("3600").build()).build()).withCommand("/bin/bash", "-e" + (BACKUP_LOGGER.isTraceEnabled() ? "x" : ""), ClusterStatefulSetPath.LOCAL_BIN_CREATE_BACKUP_SH_PATH.path()).withVolumeMounts(ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(ClusterStatefulSetPath.LOCAL_BIN_CREATE_BACKUP_SH_PATH.filename()).withMountPath(ClusterStatefulSetPath.LOCAL_BIN_CREATE_BACKUP_SH_PATH.path()).withReadOnly(true)), ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(ClusterStatefulSetPath.LOCAL_BIN_SHELL_UTILS_PATH.filename()).withMountPath(ClusterStatefulSetPath.LOCAL_BIN_SHELL_UTILS_PATH.path()).withReadOnly(true))).build()).withVolumes(new VolumeBuilder(ClusterStatefulSetVolumeConfig.TEMPLATES.volume(context)).editConfigMap().withDefaultMode(// NOPMD
    0555).endConfigMap().build()).endSpec().endTemplate().endSpec().build()).endSpec().build();
}
Also used : StackGresContext(io.stackgres.common.StackGresContext) PodSecurityContext(io.fabric8.kubernetes.api.model.PodSecurityContext) EnvVar(io.fabric8.kubernetes.api.model.EnvVar) StackGresBackupConfigSpec(io.stackgres.common.crd.sgbackupconfig.StackGresBackupConfigSpec) StackGresBackup(io.stackgres.common.crd.sgbackup.StackGresBackup) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) StackGresVersion(io.stackgres.operator.common.StackGresVersion) LoggerFactory(org.slf4j.LoggerFactory) Singleton(javax.inject.Singleton) StackgresClusterContainers(io.stackgres.common.StackgresClusterContainers) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ImmutableList(com.google.common.collect.ImmutableList) ClusterStatefulSetPath(io.stackgres.common.ClusterStatefulSetPath) ResourceGenerator(io.stackgres.operator.conciliation.ResourceGenerator) Map(java.util.Map) EnvVarSourceBuilder(io.fabric8.kubernetes.api.model.EnvVarSourceBuilder) ObjectFieldSelectorBuilder(io.fabric8.kubernetes.api.model.ObjectFieldSelectorBuilder) CronJob(io.fabric8.kubernetes.api.model.batch.v1beta1.CronJob) JobTemplateSpecBuilder(io.fabric8.kubernetes.api.model.batch.v1beta1.JobTemplateSpecBuilder) ContainerBuilder(io.fabric8.kubernetes.api.model.ContainerBuilder) StackGresBaseBackupConfig(io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupConfig) ResourceFactory(io.stackgres.operator.conciliation.factory.ResourceFactory) ClusterContext(io.stackgres.common.ClusterContext) StackGresBackupConfig(io.stackgres.common.crd.sgbackupconfig.StackGresBackupConfig) Logger(org.slf4j.Logger) PatroniRoleGenerator(io.stackgres.operator.conciliation.factory.cluster.patroni.PatroniRoleGenerator) StackGresClusterContext(io.stackgres.operator.conciliation.cluster.StackGresClusterContext) LabelFactoryForCluster(io.stackgres.common.LabelFactoryForCluster) StackGresUtil(io.stackgres.common.StackGresUtil) EnvVarBuilder(io.fabric8.kubernetes.api.model.EnvVarBuilder) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) Collectors(java.util.stream.Collectors) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) OperatorVersionBinder(io.stackgres.operator.conciliation.OperatorVersionBinder) BackupPhase(io.stackgres.common.crd.sgbackup.BackupPhase) CronJobBuilder(io.fabric8.kubernetes.api.model.batch.v1beta1.CronJobBuilder) StackGresComponent(io.stackgres.common.StackGresComponent) List(java.util.List) Stream(java.util.stream.Stream) ClusterStatefulSetVolumeConfig(io.stackgres.operator.conciliation.factory.cluster.patroni.ClusterStatefulSetVolumeConfig) ClusterEnvironmentVariablesFactoryDiscoverer(io.stackgres.operator.conciliation.factory.cluster.patroni.ClusterEnvironmentVariablesFactoryDiscoverer) Optional(java.util.Optional) ClusterEnvironmentVariablesFactory(io.stackgres.operator.conciliation.factory.cluster.patroni.ClusterEnvironmentVariablesFactory) CustomResource(io.fabric8.kubernetes.client.CustomResource) ObjectFieldSelectorBuilder(io.fabric8.kubernetes.api.model.ObjectFieldSelectorBuilder) CronJobBuilder(io.fabric8.kubernetes.api.model.batch.v1beta1.CronJobBuilder) StackGresBackupConfig(io.stackgres.common.crd.sgbackupconfig.StackGresBackupConfig) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) EnvVarBuilder(io.fabric8.kubernetes.api.model.EnvVarBuilder) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) StackGresBackup(io.stackgres.common.crd.sgbackup.StackGresBackup) ContainerBuilder(io.fabric8.kubernetes.api.model.ContainerBuilder) EnvVarSourceBuilder(io.fabric8.kubernetes.api.model.EnvVarSourceBuilder) StackGresBackupConfigSpec(io.stackgres.common.crd.sgbackupconfig.StackGresBackupConfigSpec) JobTemplateSpecBuilder(io.fabric8.kubernetes.api.model.batch.v1beta1.JobTemplateSpecBuilder) EnvVar(io.fabric8.kubernetes.api.model.EnvVar)

Example 2 with StackGresBaseBackupConfig

use of io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupConfig in project stackgres by ongres.

the class BackupConfigTransformer method getResourceSpec.

public BackupConfigSpec getResourceSpec(StackGresBackupConfigSpec source) {
    if (source == null) {
        return null;
    }
    BackupConfigSpec transformation = new BackupConfigSpec();
    Optional.ofNullable(source.getBaseBackups()).ifPresent(sourceBaseBackup -> {
        final BaseBackupConfig baseBackup = new BaseBackupConfig();
        baseBackup.setCompressionMethod(sourceBaseBackup.getCompression());
        baseBackup.setCronSchedule(sourceBaseBackup.getCronSchedule());
        baseBackup.setRetention(sourceBaseBackup.getRetention());
        transformation.setBaseBackup(baseBackup);
    });
    Optional.ofNullable(source.getBaseBackups()).map(StackGresBaseBackupConfig::getPerformance).ifPresent(sourcePerformance -> {
        final BaseBackupPerformance performance = new BaseBackupPerformance();
        performance.setMaxDiskBandwitdh(sourcePerformance.getMaxDiskBandwitdh());
        performance.setMaxNetworkBandwitdh(sourcePerformance.getMaxNetworkBandwitdh());
        performance.setUploadDiskConcurrency(sourcePerformance.getUploadDiskConcurrency());
        transformation.getBaseBackups().setPerformance(performance);
    });
    transformation.setStorage(getResourceStorage(source.getStorage()));
    return transformation;
}
Also used : BaseBackupPerformance(io.stackgres.apiweb.dto.backupconfig.BaseBackupPerformance) StackGresBaseBackupPerformance(io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupPerformance) StackGresBackupConfigSpec(io.stackgres.common.crd.sgbackupconfig.StackGresBackupConfigSpec) BackupConfigSpec(io.stackgres.apiweb.dto.backupconfig.BackupConfigSpec) BaseBackupConfig(io.stackgres.apiweb.dto.backupconfig.BaseBackupConfig) StackGresBaseBackupConfig(io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupConfig)

Example 3 with StackGresBaseBackupConfig

use of io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupConfig in project stackgres by ongres.

the class BackupConfigTransformer method getCustomResourceSpec.

public StackGresBackupConfigSpec getCustomResourceSpec(BackupConfigSpec source) {
    if (source == null) {
        return null;
    }
    StackGresBackupConfigSpec transformation = new StackGresBackupConfigSpec();
    Optional.ofNullable(source.getBaseBackups()).ifPresent(sourceBaseBackup -> {
        final StackGresBaseBackupConfig baseBackup = new StackGresBaseBackupConfig();
        transformation.setBaseBackups(baseBackup);
        baseBackup.setCompression(source.getBaseBackups().getCompressionMethod());
        baseBackup.setCronSchedule(sourceBaseBackup.getCronSchedule());
        baseBackup.setRetention(sourceBaseBackup.getRetention());
    });
    Optional.ofNullable(source.getBaseBackups()).map(BaseBackupConfig::getPerformance).ifPresent(sourcePerformance -> {
        final StackGresBaseBackupPerformance performance = new StackGresBaseBackupPerformance();
        transformation.getBaseBackups().setPerformance(performance);
        performance.setMaxDiskBandwitdh(sourcePerformance.getMaxDiskBandwitdh());
        performance.setMaxNetworkBandwitdh(sourcePerformance.getMaxNetworkBandwitdh());
        performance.setUploadDiskConcurrency(sourcePerformance.getUploadDiskConcurrency());
    });
    transformation.setStorage(getCustomResourceStorage(source.getStorage()));
    return transformation;
}
Also used : StackGresBackupConfigSpec(io.stackgres.common.crd.sgbackupconfig.StackGresBackupConfigSpec) StackGresBaseBackupPerformance(io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupPerformance) StackGresBaseBackupConfig(io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupConfig)

Example 4 with StackGresBaseBackupConfig

use of io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupConfig in project stackgres by ongres.

the class BackupJob method createBackupJob.

private HasMetadata createBackupJob(StackGresBackupContext context) {
    StackGresBackup backup = context.getSource();
    StackGresBackupConfig backupConfig = context.getBackupConfig();
    String namespace = backup.getMetadata().getNamespace();
    String name = backup.getMetadata().getName();
    String cluster = backup.getSpec().getSgCluster();
    Map<String, String> labels = labelFactory.backupPodLabels(context.getSource());
    final VolumeMount utilsVolumeMount = ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(ClusterStatefulSetPath.LOCAL_BIN_SHELL_UTILS_PATH.filename()).withMountPath(ClusterStatefulSetPath.LOCAL_BIN_SHELL_UTILS_PATH.path()).withReadOnly(true));
    final VolumeMount backupVolumeMount = ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(ClusterStatefulSetPath.LOCAL_BIN_CREATE_BACKUP_SH_PATH.filename()).withMountPath(ClusterStatefulSetPath.LOCAL_BIN_CREATE_BACKUP_SH_PATH.path()).withReadOnly(true));
    return new JobBuilder().withNewMetadata().withNamespace(namespace).withName(backupJobName(backup)).withLabels(labels).endMetadata().withNewSpec().withBackoffLimit(3).withCompletions(1).withParallelism(1).withNewTemplate().withNewMetadata().withNamespace(namespace).withName(backupJobName(backup)).withLabels(labels).endMetadata().withNewSpec().withSecurityContext(podSecurityFactory.createResource(context)).withRestartPolicy("OnFailure").withServiceAccountName(PatroniRoleGenerator.roleName(context)).withContainers(new ContainerBuilder().withName("create-backup").withImage(StackGresComponent.KUBECTL.findLatestImageName()).withImagePullPolicy("IfNotPresent").withEnv(ImmutableList.<EnvVar>builder().addAll(getClusterEnvVars(context)).add(new EnvVarBuilder().withName("CLUSTER_NAMESPACE").withValue(namespace).build(), new EnvVarBuilder().withName("BACKUP_NAME").withValue(name).build(), new EnvVarBuilder().withName("CLUSTER_NAME").withValue(cluster).build(), new EnvVarBuilder().withName("CRONJOB_NAME").withValue(cluster + StackGresUtil.BACKUP_SUFFIX).build(), new EnvVarBuilder().withName("BACKUP_IS_PERMANENT").withValue(Optional.ofNullable(backup.getSpec().getManagedLifecycle()).map(managedLifecycle -> !managedLifecycle).map(String::valueOf).orElse("true")).build(), new EnvVarBuilder().withName("BACKUP_CONFIG_CRD_NAME").withValue(CustomResource.getCRDName(StackGresBackupConfig.class)).build(), new EnvVarBuilder().withName("BACKUP_CONFIG").withValue(backupConfig.getMetadata().getName()).build(), new EnvVarBuilder().withName("BACKUP_CRD_KIND").withValue(HasMetadata.getKind(StackGresBackup.class)).build(), new EnvVarBuilder().withName("BACKUP_CRD_NAME").withValue(CustomResource.getCRDName(StackGresBackup.class)).build(), new EnvVarBuilder().withName("BACKUP_CRD_APIVERSION").withValue(HasMetadata.getApiVersion(StackGresBackup.class)).build(), new EnvVarBuilder().withName("BACKUP_PHASE_RUNNING").withValue(BackupPhase.RUNNING.label()).build(), new EnvVarBuilder().withName("BACKUP_PHASE_COMPLETED").withValue(BackupPhase.COMPLETED.label()).build(), new EnvVarBuilder().withName("BACKUP_PHASE_FAILED").withValue(BackupPhase.FAILED.label()).build(), new EnvVarBuilder().withName("PATRONI_ROLE_KEY").withValue(StackGresContext.ROLE_KEY).build(), new EnvVarBuilder().withName("PATRONI_PRIMARY_ROLE").withValue(StackGresContext.PRIMARY_ROLE).build(), new EnvVarBuilder().withName("PATRONI_REPLICA_ROLE").withValue(StackGresContext.REPLICA_ROLE).build(), new EnvVarBuilder().withName("PATRONI_CLUSTER_LABELS").withValue(labelFactoryForCluster.patroniClusterLabels(context.getCluster()).entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.joining(","))).build(), new EnvVarBuilder().withName("PATRONI_CONTAINER_NAME").withValue(StackgresClusterContainers.PATRONI).build(), new EnvVarBuilder().withName("SERVICE_ACCOUNT").withValueFrom(new EnvVarSourceBuilder().withFieldRef(new ObjectFieldSelectorBuilder().withFieldPath("spec.serviceAccountName").build()).build()).build(), new EnvVarBuilder().withName("POD_NAME").withValueFrom(new EnvVarSourceBuilder().withFieldRef(new ObjectFieldSelectorBuilder().withFieldPath("metadata.name").build()).build()).build(), new EnvVarBuilder().withName("RETAIN").withValue(Optional.of(backupConfig.getSpec()).map(StackGresBackupConfigSpec::getBaseBackups).map(StackGresBaseBackupConfig::getRetention).map(String::valueOf).orElse("5")).build(), new EnvVarBuilder().withName("WINDOW").withValue("3600").build()).build()).withCommand("/bin/bash", "-e" + (LOGGER.isTraceEnabled() ? "x" : ""), ClusterStatefulSetPath.LOCAL_BIN_CREATE_BACKUP_SH_PATH.path()).withVolumeMounts(backupVolumeMount, utilsVolumeMount).build()).withVolumes(new VolumeBuilder(ClusterStatefulSetVolumeConfig.TEMPLATES.volume(context)).editConfigMap().withDefaultMode(// NOPMD
    0555).endConfigMap().build()).endSpec().endTemplate().endSpec().build();
}
Also used : VolumeMount(io.fabric8.kubernetes.api.model.VolumeMount) StackGresContext(io.stackgres.common.StackGresContext) PodSecurityContext(io.fabric8.kubernetes.api.model.PodSecurityContext) LoggerFactory(org.slf4j.LoggerFactory) StackgresClusterContainers(io.stackgres.common.StackgresClusterContainers) Map(java.util.Map) ContainerBuilder(io.fabric8.kubernetes.api.model.ContainerBuilder) StackGresBaseBackupConfig(io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupConfig) ClusterContext(io.stackgres.common.ClusterContext) StackGresBackupConfig(io.stackgres.common.crd.sgbackupconfig.StackGresBackupConfig) PatroniRoleGenerator(io.stackgres.operator.conciliation.factory.cluster.patroni.PatroniRoleGenerator) StackGresUtil(io.stackgres.common.StackGresUtil) EnvVarBuilder(io.fabric8.kubernetes.api.model.EnvVarBuilder) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) ResourceUtil(io.stackgres.operatorframework.resource.ResourceUtil) Collectors(java.util.stream.Collectors) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) BackupPhase(io.stackgres.common.crd.sgbackup.BackupPhase) List(java.util.List) Stream(java.util.stream.Stream) Tuple(org.jooq.lambda.tuple.Tuple) ClusterEnvironmentVariablesFactoryDiscoverer(io.stackgres.operator.conciliation.factory.cluster.patroni.ClusterEnvironmentVariablesFactoryDiscoverer) Optional(java.util.Optional) ClusterEnvironmentVariablesFactory(io.stackgres.operator.conciliation.factory.cluster.patroni.ClusterEnvironmentVariablesFactory) CustomResource(io.fabric8.kubernetes.client.CustomResource) EnvVar(io.fabric8.kubernetes.api.model.EnvVar) LabelFactoryForBackup(io.stackgres.common.LabelFactoryForBackup) StackGresBackupConfigSpec(io.stackgres.common.crd.sgbackupconfig.StackGresBackupConfigSpec) StackGresBackup(io.stackgres.common.crd.sgbackup.StackGresBackup) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) StackGresVersion(io.stackgres.operator.common.StackGresVersion) Singleton(javax.inject.Singleton) Seq(org.jooq.lambda.Seq) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ImmutableList(com.google.common.collect.ImmutableList) ClusterStatefulSetPath(io.stackgres.common.ClusterStatefulSetPath) ResourceGenerator(io.stackgres.operator.conciliation.ResourceGenerator) EnvVarSourceBuilder(io.fabric8.kubernetes.api.model.EnvVarSourceBuilder) ObjectFieldSelectorBuilder(io.fabric8.kubernetes.api.model.ObjectFieldSelectorBuilder) StackGresBackupStatus(io.stackgres.common.crd.sgbackup.StackGresBackupStatus) ResourceFactory(io.stackgres.operator.conciliation.factory.ResourceFactory) StackGresBackupContext(io.stackgres.operator.conciliation.backup.StackGresBackupContext) JobBuilder(io.fabric8.kubernetes.api.model.batch.v1.JobBuilder) Logger(org.slf4j.Logger) LabelFactoryForCluster(io.stackgres.common.LabelFactoryForCluster) OperatorVersionBinder(io.stackgres.operator.conciliation.OperatorVersionBinder) StackGresComponent(io.stackgres.common.StackGresComponent) ClusterStatefulSetVolumeConfig(io.stackgres.operator.conciliation.factory.cluster.patroni.ClusterStatefulSetVolumeConfig) StackGresBackupProcess(io.stackgres.common.crd.sgbackup.StackGresBackupProcess) JobBuilder(io.fabric8.kubernetes.api.model.batch.v1.JobBuilder) ObjectFieldSelectorBuilder(io.fabric8.kubernetes.api.model.ObjectFieldSelectorBuilder) StackGresBaseBackupConfig(io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupConfig) StackGresBackupConfig(io.stackgres.common.crd.sgbackupconfig.StackGresBackupConfig) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) EnvVarBuilder(io.fabric8.kubernetes.api.model.EnvVarBuilder) StackGresBackup(io.stackgres.common.crd.sgbackup.StackGresBackup) ContainerBuilder(io.fabric8.kubernetes.api.model.ContainerBuilder) EnvVarSourceBuilder(io.fabric8.kubernetes.api.model.EnvVarSourceBuilder) VolumeMount(io.fabric8.kubernetes.api.model.VolumeMount)

Aggregations

StackGresBackupConfigSpec (io.stackgres.common.crd.sgbackupconfig.StackGresBackupConfigSpec)4 StackGresBaseBackupConfig (io.stackgres.common.crd.sgbackupconfig.StackGresBaseBackupConfig)4 ImmutableList (com.google.common.collect.ImmutableList)2 ContainerBuilder (io.fabric8.kubernetes.api.model.ContainerBuilder)2 EnvVar (io.fabric8.kubernetes.api.model.EnvVar)2 EnvVarBuilder (io.fabric8.kubernetes.api.model.EnvVarBuilder)2 EnvVarSourceBuilder (io.fabric8.kubernetes.api.model.EnvVarSourceBuilder)2 HasMetadata (io.fabric8.kubernetes.api.model.HasMetadata)2 ObjectFieldSelectorBuilder (io.fabric8.kubernetes.api.model.ObjectFieldSelectorBuilder)2 PodSecurityContext (io.fabric8.kubernetes.api.model.PodSecurityContext)2 VolumeBuilder (io.fabric8.kubernetes.api.model.VolumeBuilder)2 CustomResource (io.fabric8.kubernetes.client.CustomResource)2 ClusterContext (io.stackgres.common.ClusterContext)2 ClusterStatefulSetPath (io.stackgres.common.ClusterStatefulSetPath)2 LabelFactoryForCluster (io.stackgres.common.LabelFactoryForCluster)2 StackGresComponent (io.stackgres.common.StackGresComponent)2 StackGresContext (io.stackgres.common.StackGresContext)2 StackGresUtil (io.stackgres.common.StackGresUtil)2 StackgresClusterContainers (io.stackgres.common.StackgresClusterContainers)2 BackupPhase (io.stackgres.common.crd.sgbackup.BackupPhase)2