Search in sources :

Example 21 with StackGresDistributedLogs

use of io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs in project stackgres by ongres.

the class DistributedLogsConciliatorTest method shouldIgnoreChangesMarkedPauseUntilRestartAnnotationIfClusterIsPendingToRestart.

@Test
@DisplayName("Conciliation Should Ignore Changes On Resources Marked With Reconciliation " + "Pause Until Restart Annotation If The Cluster Is Pending To Restart")
void shouldIgnoreChangesMarkedPauseUntilRestartAnnotationIfClusterIsPendingToRestart() {
    final List<HasMetadata> requiredResources = KubernetessMockResourceGenerationUtil.buildResources("test", "test");
    final List<HasMetadata> deployedResources = deepCopy(requiredResources);
    deployedResources.stream().findAny().orElseThrow().getMetadata().setAnnotations(Map.of(StackGresContext.RECONCILIATION_PAUSE_UNTIL_RESTART_KEY, Boolean.TRUE.toString()));
    Conciliator<StackGresDistributedLogs> conciliator = buildConciliator(requiredResources, deployedResources);
    reset(statusManager);
    when(statusManager.isPendingRestart(distributedLogs)).thenReturn(true);
    ReconciliationResult result = conciliator.evalReconciliationState(getConciliationResource());
    assertEquals(0, result.getPatches().size());
    assertTrue(result.isUpToDate());
}
Also used : HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) StackGresDistributedLogs(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs) ReconciliationResult(io.stackgres.operator.conciliation.ReconciliationResult) ConciliatorTest(io.stackgres.operator.conciliation.ConciliatorTest) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Example 22 with StackGresDistributedLogs

use of io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs in project stackgres by ongres.

the class DistributedLogsStatusManager method isPendingRestart.

/**
 * Check pending restart status condition.
 */
public boolean isPendingRestart(StackGresDistributedLogs distributedLogs) {
    List<StackGresClusterPodStatus> clusterPodStatuses = Optional.ofNullable(distributedLogs.getStatus()).map(StackGresDistributedLogsStatus::getPodStatuses).orElse(ImmutableList.of());
    Optional<StatefulSet> clusterStatefulSet = getClusterStatefulSet(distributedLogs);
    List<Pod> clusterPods = clusterStatefulSet.map(sts -> getStsPods(sts, distributedLogs)).orElse(ImmutableList.of());
    RestartReasons reasons = ClusterPendingRestartUtil.getRestartReasons(clusterPodStatuses, clusterStatefulSet, clusterPods);
    for (RestartReason reason : reasons.getReasons()) {
        switch(reason) {
            case OPERATOR_VERSION:
                LOGGER.debug("Distributed Logs {} requires restart due to operator version change", getDistributedLogsId(distributedLogs));
                break;
            case PATRONI:
                LOGGER.debug("Distributed Logs {} requires restart due to patroni's indication", getDistributedLogsId(distributedLogs));
                break;
            case POD_STATUS:
                LOGGER.debug("Distributed Logs {} requires restart due to pod status indication", getDistributedLogsId(distributedLogs));
                break;
            case STATEFULSET:
                LOGGER.debug("Distributed Logs {} requires restart due to pod template changes", getDistributedLogsId(distributedLogs));
                break;
            default:
                break;
        }
    }
    return reasons.requiresRestart();
}
Also used : StatusManager(io.stackgres.operator.conciliation.StatusManager) LoggerFactory(org.slf4j.LoggerFactory) ConditionUpdater(io.stackgres.operatorframework.resource.ConditionUpdater) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ImmutableList(com.google.common.collect.ImmutableList) StackGresDistributedLogsStatus(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsStatus) Map(java.util.Map) KubernetesClientFactory(io.stackgres.common.KubernetesClientFactory) StackGresDistributedLogs(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs) StackGresClusterPodStatus(io.stackgres.common.crd.sgcluster.StackGresClusterPodStatus) StackGresDistributedLogsCondition(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsCondition) RestartReasons(io.stackgres.common.ClusterPendingRestartUtil.RestartReasons) DistributedLogsStatusCondition(io.stackgres.common.crd.sgdistributedlogs.DistributedLogsStatusCondition) Logger(org.slf4j.Logger) LabelFactoryForCluster(io.stackgres.common.LabelFactoryForCluster) Pod(io.fabric8.kubernetes.api.model.Pod) Collectors(java.util.stream.Collectors) StatefulSet(io.fabric8.kubernetes.api.model.apps.StatefulSet) RestartReason(io.stackgres.common.ClusterPendingRestartUtil.RestartReason) List(java.util.List) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) Optional(java.util.Optional) ApplicationScoped(javax.enterprise.context.ApplicationScoped) ClusterPendingRestartUtil(io.stackgres.common.ClusterPendingRestartUtil) RestartReason(io.stackgres.common.ClusterPendingRestartUtil.RestartReason) Pod(io.fabric8.kubernetes.api.model.Pod) RestartReasons(io.stackgres.common.ClusterPendingRestartUtil.RestartReasons) StackGresClusterPodStatus(io.stackgres.common.crd.sgcluster.StackGresClusterPodStatus) StatefulSet(io.fabric8.kubernetes.api.model.apps.StatefulSet)

Example 23 with StackGresDistributedLogs

use of io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs in project stackgres by ongres.

the class DistributedLogsClusterReconciliator method updateStatus.

private boolean updateStatus(StackGresDistributedLogs distributedLogs, String database, String retention) {
    Optional<StackGresDistributedLogsStatusDatabase> foundDistributedLogsDatabase = distributedLogs.getStatus().getDatabases().stream().filter(databaseStatus -> databaseStatus.getName().equals(database)).findAny();
    final StackGresDistributedLogsStatusDatabase distributedLogsDatabase = foundDistributedLogsDatabase.orElseGet(() -> new StackGresDistributedLogsStatusDatabase());
    if (!foundDistributedLogsDatabase.isPresent()) {
        distributedLogs.getStatus().getDatabases().add(distributedLogsDatabase);
    }
    if (Objects.isNull(distributedLogsDatabase.getName()) || !Objects.equals(retention, distributedLogsDatabase.getRetention())) {
        distributedLogsDatabase.setName(database);
        distributedLogsDatabase.setRetention(retention);
        return true;
    }
    return false;
}
Also used : LoggerFactory(org.slf4j.LoggerFactory) Seq(org.jooq.lambda.Seq) StackgresClusterContainers(io.stackgres.common.StackgresClusterContainers) Tables(io.stackgres.common.distributedlogs.Tables) DistributedLogsControllerEventReason(io.stackgres.distributedlogs.common.DistributedLogsControllerEventReason) Inject(javax.inject.Inject) StackGresDistributedLogsContext(io.stackgres.distributedlogs.common.StackGresDistributedLogsContext) Tuple2(org.jooq.lambda.tuple.Tuple2) ImmutableList(com.google.common.collect.ImmutableList) StackGresDistributedLogs(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs) MessageFormatter(org.slf4j.helpers.MessageFormatter) PodStatus(io.fabric8.kubernetes.api.model.PodStatus) Logger(org.slf4j.Logger) StackGresDistributedLogsStatusCluster(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsStatusCluster) ReconciliationResult(io.stackgres.operatorframework.reconciliation.ReconciliationResult) Pod(io.fabric8.kubernetes.api.model.Pod) FluentdUtil(io.stackgres.common.FluentdUtil) DistributedLogsControllerProperty(io.stackgres.common.DistributedLogsControllerProperty) Objects(java.util.Objects) Consumer(java.util.function.Consumer) CdiUtil(io.stackgres.common.CdiUtil) Stream(java.util.stream.Stream) DistributedLogsControllerPropertyContext(io.stackgres.distributedlogs.configuration.DistributedLogsControllerPropertyContext) Dependent(javax.enterprise.context.Dependent) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) Optional(java.util.Optional) StackGresDistributedLogsStatusDatabase(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsStatusDatabase) ApplicationScoped(javax.enterprise.context.ApplicationScoped) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings) StackGresDistributedLogsStatusDatabase(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsStatusDatabase)

Example 24 with StackGresDistributedLogs

use of io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs in project stackgres by ongres.

the class DistributedLogsPodTemplateSpecFactory method getPodTemplateSpec.

@Override
public PodTemplateResult getPodTemplateSpec(DistributedLogsContainerContext context) {
    StackGresDistributedLogs cluster = context.getDistributedLogsContext().getSource();
    final Map<String, String> podLabels = labelFactory.statefulSetPodLabels(cluster);
    List<ContainerFactory<DistributedLogsContainerContext>> containerFactories = containerFactoryDiscoverer.discoverContainers(context);
    List<Container> containers = containerFactories.stream().map(f -> f.getContainer(context)).collect(Collectors.toUnmodifiableList());
    final List<ContainerFactory<DistributedLogsContainerContext>> initContainerFactories = initContainerFactoryDiscoverer.discoverContainers(context);
    List<Container> initContainers = initContainerFactories.stream().map(f -> f.getContainer(context)).collect(Collectors.toUnmodifiableList());
    final List<String> claimedVolumes = Stream.concat(containers.stream(), initContainers.stream()).flatMap(container -> container.getVolumeMounts().stream()).map(VolumeMount::getName).distinct().collect(Collectors.toUnmodifiableList());
    claimedVolumes.forEach(rv -> {
        if (!context.availableVolumes().containsKey(rv) && !context.getDataVolumeName().equals(rv)) {
            throw new IllegalStateException("Volume " + rv + " is required but not available");
        }
    });
    List<Volume> volumes = claimedVolumes.stream().map(volumeName -> context.availableVolumes().get(volumeName)).filter(Objects::nonNull).collect(Collectors.toUnmodifiableList());
    var podTemplateSpec = new PodTemplateSpecBuilder().withMetadata(new ObjectMetaBuilder().addToLabels(podLabels).addToAnnotations(StackGresContext.VERSION_KEY, cluster.getMetadata().getAnnotations().getOrDefault(StackGresContext.VERSION_KEY, StackGresProperty.OPERATOR_VERSION.getString())).build()).withNewSpec().withAffinity(Optional.of(new AffinityBuilder().withPodAntiAffinity(new PodAntiAffinityBuilder().addAllToRequiredDuringSchedulingIgnoredDuringExecution(ImmutableList.of(new PodAffinityTermBuilder().withLabelSelector(new LabelSelectorBuilder().withMatchExpressions(new LabelSelectorRequirementBuilder().withKey(StackGresContext.APP_KEY).withOperator("In").withValues(labelFactory.labelMapper().appName()).build(), new LabelSelectorRequirementBuilder().withKey("cluster").withOperator("In").withValues("true").build()).build()).withTopologyKey("kubernetes.io/hostname").build())).build()).build()).filter(affinity -> Optional.ofNullable(cluster.getSpec().getNonProduction()).map(StackGresDistributedLogsNonProduction::getDisableClusterPodAntiAffinity).map(disableClusterPodAntiAffinity -> !disableClusterPodAntiAffinity).orElse(true)).orElse(null)).withNodeSelector(Optional.ofNullable(cluster.getSpec()).map(StackGresDistributedLogsSpec::getScheduling).map(StackGresDistributedLogsPodScheduling::getNodeSelector).orElse(null)).withTolerations(Optional.ofNullable(cluster.getSpec()).map(StackGresDistributedLogsSpec::getScheduling).map(StackGresDistributedLogsPodScheduling::getTolerations).map(tolerations -> Seq.seq(tolerations).map(TolerationBuilder::new).map(TolerationBuilder::build).toList()).orElse(null)).withShareProcessNamespace(Boolean.TRUE).withServiceAccountName(PatroniRole.roleName(context.getDistributedLogsContext())).withSecurityContext(podSecurityContext.createResource(context.getDistributedLogsContext())).withVolumes(volumes).withContainers(containers).withInitContainers(initContainers).withTerminationGracePeriodSeconds(60L).endSpec().build();
    return ImmutablePodTemplateResult.builder().spec(podTemplateSpec).claimedVolumes(claimedVolumes).build();
}
Also used : VolumeMount(io.fabric8.kubernetes.api.model.VolumeMount) StackGresContext(io.stackgres.common.StackGresContext) ContainerFactoryDiscoverer(io.stackgres.operator.conciliation.ContainerFactoryDiscoverer) PodSecurityContext(io.fabric8.kubernetes.api.model.PodSecurityContext) Container(io.fabric8.kubernetes.api.model.Container) StackGresProperty(io.stackgres.common.StackGresProperty) StackGresDistributedLogsSpec(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsSpec) PatroniRole(io.stackgres.operator.conciliation.factory.distributedlogs.patroni.PatroniRole) Singleton(javax.inject.Singleton) Seq(org.jooq.lambda.Seq) Inject(javax.inject.Inject) ImmutableList(com.google.common.collect.ImmutableList) ImmutablePodTemplateResult(io.stackgres.operator.conciliation.factory.ImmutablePodTemplateResult) StackGresDistributedLogsPodScheduling(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsPodScheduling) Map(java.util.Map) PodAntiAffinityBuilder(io.fabric8.kubernetes.api.model.PodAntiAffinityBuilder) ContainerFactory(io.stackgres.operator.conciliation.factory.ContainerFactory) StackGresDistributedLogs(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs) ResourceFactory(io.stackgres.operator.conciliation.factory.ResourceFactory) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) Volume(io.fabric8.kubernetes.api.model.Volume) StackGresDistributedLogsNonProduction(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsNonProduction) PodTemplateSpecBuilder(io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder) StackGresDistributedLogsContext(io.stackgres.operator.conciliation.distributedlogs.StackGresDistributedLogsContext) LabelSelectorBuilder(io.fabric8.kubernetes.api.model.LabelSelectorBuilder) LabelFactoryForCluster(io.stackgres.common.LabelFactoryForCluster) PodTemplateFactory(io.stackgres.operator.conciliation.factory.PodTemplateFactory) Collectors(java.util.stream.Collectors) LabelSelectorRequirementBuilder(io.fabric8.kubernetes.api.model.LabelSelectorRequirementBuilder) TolerationBuilder(io.fabric8.kubernetes.api.model.TolerationBuilder) Objects(java.util.Objects) AffinityBuilder(io.fabric8.kubernetes.api.model.AffinityBuilder) List(java.util.List) PodAffinityTermBuilder(io.fabric8.kubernetes.api.model.PodAffinityTermBuilder) PodTemplateResult(io.stackgres.operator.conciliation.factory.PodTemplateResult) Stream(java.util.stream.Stream) Optional(java.util.Optional) InitContainerFactoryDiscover(io.stackgres.operator.conciliation.InitContainerFactoryDiscover) LabelSelectorBuilder(io.fabric8.kubernetes.api.model.LabelSelectorBuilder) StackGresDistributedLogsPodScheduling(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsPodScheduling) LabelSelectorRequirementBuilder(io.fabric8.kubernetes.api.model.LabelSelectorRequirementBuilder) TolerationBuilder(io.fabric8.kubernetes.api.model.TolerationBuilder) StackGresDistributedLogs(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs) PodAntiAffinityBuilder(io.fabric8.kubernetes.api.model.PodAntiAffinityBuilder) AffinityBuilder(io.fabric8.kubernetes.api.model.AffinityBuilder) PodAntiAffinityBuilder(io.fabric8.kubernetes.api.model.PodAntiAffinityBuilder) PodAffinityTermBuilder(io.fabric8.kubernetes.api.model.PodAffinityTermBuilder) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) StackGresDistributedLogsNonProduction(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsNonProduction) Container(io.fabric8.kubernetes.api.model.Container) Volume(io.fabric8.kubernetes.api.model.Volume) PodTemplateSpecBuilder(io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder) ContainerFactory(io.stackgres.operator.conciliation.factory.ContainerFactory) VolumeMount(io.fabric8.kubernetes.api.model.VolumeMount)

Example 25 with StackGresDistributedLogs

use of io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs in project stackgres by ongres.

the class DistributedLogsStatefulSet method generateResource.

@Override
public Stream<HasMetadata> generateResource(StackGresDistributedLogsContext context) {
    final StackGresDistributedLogs cluster = context.getSource();
    final ObjectMeta metadata = cluster.getMetadata();
    final String name = metadata.getName();
    final String namespace = metadata.getNamespace();
    final StackGresDistributedLogsPersistentVolume persistentVolume = cluster.getSpec().getPersistentVolume();
    StorageConfig dataStorageConfig = ImmutableStorageConfig.builder().size(persistentVolume.getSize()).storageClass(Optional.ofNullable(persistentVolume.getStorageClass()).orElse(null)).build();
    final PersistentVolumeClaimSpecBuilder volumeClaimSpec = new PersistentVolumeClaimSpecBuilder().withAccessModes("ReadWriteOnce").withResources(dataStorageConfig.getResourceRequirements()).withStorageClassName(dataStorageConfig.getStorageClass());
    final Map<String, String> labels = labelFactory.clusterLabels(cluster);
    final Map<String, String> podLabels = labelFactory.statefulSetPodLabels(cluster);
    Map<String, VolumePair> availableVolumesPairs = volumeDiscoverer.discoverVolumes(context);
    Map<String, Volume> availableVolumes = availableVolumesPairs.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, vp -> vp.getValue().getVolume()));
    final PodTemplateResult buildPodTemplate = podTemplateSpecFactory.getPodTemplateSpec(ImmutableDistributedLogsContainerContext.builder().distributedLogsContext(context).availableVolumes(availableVolumes).dataVolumeName(dataName(cluster)).build());
    StatefulSet clusterStatefulSet = new StatefulSetBuilder().withNewMetadata().withNamespace(namespace).withName(name).withLabels(labels).endMetadata().withNewSpec().withReplicas(1).withSelector(new LabelSelectorBuilder().addToMatchLabels(podLabels).build()).withUpdateStrategy(new StatefulSetUpdateStrategyBuilder().withType("OnDelete").build()).withServiceName(name).withTemplate(buildPodTemplate.getSpec()).withVolumeClaimTemplates(Stream.of(Stream.of(new PersistentVolumeClaimBuilder().withNewMetadata().withNamespace(namespace).withName(dataName(cluster)).withLabels(labels).endMetadata().withSpec(volumeClaimSpec.build()).build())).flatMap(s -> s).toArray(PersistentVolumeClaim[]::new)).endSpec().build();
    var volumeDependencies = buildPodTemplate.claimedVolumes().stream().map(availableVolumesPairs::get).filter(Objects::nonNull).map(VolumePair::getSource).filter(Optional::isPresent).map(Optional::get);
    return Stream.concat(Stream.of(clusterStatefulSet), volumeDependencies);
}
Also used : StatefulSetBuilder(io.fabric8.kubernetes.api.model.apps.StatefulSetBuilder) ImmutableStorageConfig(io.stackgres.common.ImmutableStorageConfig) StackGresVersion(io.stackgres.operator.common.StackGresVersion) Singleton(javax.inject.Singleton) Inject(javax.inject.Inject) PersistentVolumeClaimSpecBuilder(io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpecBuilder) VolumePair(io.stackgres.operator.conciliation.factory.VolumePair) ResourceGenerator(io.stackgres.operator.conciliation.ResourceGenerator) VolumeDiscoverer(io.stackgres.operator.conciliation.factory.VolumeDiscoverer) Map(java.util.Map) StackGresDistributedLogs(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs) Volume(io.fabric8.kubernetes.api.model.Volume) StackGresDistributedLogsContext(io.stackgres.operator.conciliation.distributedlogs.StackGresDistributedLogsContext) LabelSelectorBuilder(io.fabric8.kubernetes.api.model.LabelSelectorBuilder) StatefulSetUpdateStrategyBuilder(io.fabric8.kubernetes.api.model.apps.StatefulSetUpdateStrategyBuilder) LabelFactoryForCluster(io.stackgres.common.LabelFactoryForCluster) PodTemplateFactory(io.stackgres.operator.conciliation.factory.PodTemplateFactory) StackGresUtil(io.stackgres.common.StackGresUtil) StorageConfig(io.stackgres.common.StorageConfig) Collectors(java.util.stream.Collectors) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) StatefulSet(io.fabric8.kubernetes.api.model.apps.StatefulSet) OperatorVersionBinder(io.stackgres.operator.conciliation.OperatorVersionBinder) Objects(java.util.Objects) PodTemplateResult(io.stackgres.operator.conciliation.factory.PodTemplateResult) Stream(java.util.stream.Stream) ObjectMeta(io.fabric8.kubernetes.api.model.ObjectMeta) Optional(java.util.Optional) PersistentVolumeClaim(io.fabric8.kubernetes.api.model.PersistentVolumeClaim) StackGresDistributedLogsPersistentVolume(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsPersistentVolume) PersistentVolumeClaimBuilder(io.fabric8.kubernetes.api.model.PersistentVolumeClaimBuilder) ObjectMeta(io.fabric8.kubernetes.api.model.ObjectMeta) LabelSelectorBuilder(io.fabric8.kubernetes.api.model.LabelSelectorBuilder) Optional(java.util.Optional) StackGresDistributedLogs(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs) ImmutableStorageConfig(io.stackgres.common.ImmutableStorageConfig) StorageConfig(io.stackgres.common.StorageConfig) StatefulSetUpdateStrategyBuilder(io.fabric8.kubernetes.api.model.apps.StatefulSetUpdateStrategyBuilder) PersistentVolumeClaimBuilder(io.fabric8.kubernetes.api.model.PersistentVolumeClaimBuilder) StatefulSetBuilder(io.fabric8.kubernetes.api.model.apps.StatefulSetBuilder) VolumePair(io.stackgres.operator.conciliation.factory.VolumePair) PodTemplateResult(io.stackgres.operator.conciliation.factory.PodTemplateResult) StackGresDistributedLogsPersistentVolume(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsPersistentVolume) Volume(io.fabric8.kubernetes.api.model.Volume) StackGresDistributedLogsPersistentVolume(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsPersistentVolume) PersistentVolumeClaimSpecBuilder(io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpecBuilder) PersistentVolumeClaim(io.fabric8.kubernetes.api.model.PersistentVolumeClaim) StatefulSet(io.fabric8.kubernetes.api.model.apps.StatefulSet) Map(java.util.Map)

Aggregations

StackGresDistributedLogs (io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogs)48 NotNull (org.jetbrains.annotations.NotNull)14 HasMetadata (io.fabric8.kubernetes.api.model.HasMetadata)13 IntOrString (io.fabric8.kubernetes.api.model.IntOrString)12 Inject (javax.inject.Inject)11 Test (org.junit.jupiter.api.Test)11 Optional (java.util.Optional)10 Collectors (java.util.stream.Collectors)10 List (java.util.List)9 Map (java.util.Map)9 Volume (io.fabric8.kubernetes.api.model.Volume)8 StatefulSet (io.fabric8.kubernetes.api.model.apps.StatefulSet)8 ConfigMap (io.fabric8.kubernetes.api.model.ConfigMap)7 Container (io.fabric8.kubernetes.api.model.Container)7 ObjectMeta (io.fabric8.kubernetes.api.model.ObjectMeta)7 VolumeMount (io.fabric8.kubernetes.api.model.VolumeMount)7 StackGresUtil (io.stackgres.common.StackGresUtil)7 StackGresCluster (io.stackgres.common.crd.sgcluster.StackGresCluster)7 JsonNode (com.fasterxml.jackson.databind.JsonNode)6 ImmutableMap (com.google.common.collect.ImmutableMap)6