Search in sources :

Example 1 with StackGresClusterContext

use of io.stackgres.operator.conciliation.cluster.StackGresClusterContext in project stackgres by ongres.

the class AbstractEnvoy method buildSource.

@NotNull
public HasMetadata buildSource(StackGresClusterContext context) {
    final StackGresCluster stackGresCluster = context.getSource();
    boolean disablePgBouncer = Optional.ofNullable(stackGresCluster.getSpec()).map(StackGresClusterSpec::getPod).map(StackGresClusterPod::getDisableConnectionPooling).orElse(false);
    final String envoyConfPath = getEnvoyConfigPath(stackGresCluster, disablePgBouncer);
    YAMLMapper yamlMapper = yamlMapperProvider.yamlMapper();
    final ObjectNode envoyConfig;
    try {
        envoyConfig = (ObjectNode) yamlMapper.readTree(Envoy.class.getResource(envoyConfPath));
    } catch (Exception ex) {
        throw new IllegalStateException("couldn't read envoy config file", ex);
    }
    Seq.seq(envoyConfig.get("static_resources").get("listeners")).map(listener -> listener.get("address").get("socket_address")).cast(ObjectNode.class).forEach(socketAddress -> socketAddress.put("port_value", LISTEN_SOCKET_ADDRESS_PORT_MAPPING.get(socketAddress.get("port_value").asText())));
    Seq.seq(envoyConfig.get("static_resources").get("clusters")).flatMap(cluster -> Seq.seq(cluster.get("load_assignment").get("endpoints").elements())).flatMap(endpoint -> Seq.seq(endpoint.get("lb_endpoints").elements())).map(endpoint -> endpoint.get("endpoint").get("address").get("socket_address")).cast(ObjectNode.class).forEach(socketAddress -> socketAddress.put("port_value", CLUSTER_SOCKET_ADDRESS_PORT_MAPPING.get(socketAddress.get("port_value").asText())));
    final Map<String, String> data;
    try {
        data = ImmutableMap.of("default_envoy.yaml", yamlMapper.writeValueAsString(envoyConfig));
    } catch (Exception ex) {
        throw new IllegalStateException("couldn't parse envoy config file", ex);
    }
    String namespace = stackGresCluster.getMetadata().getNamespace();
    String configMapName = AbstractEnvoy.configName(context);
    return new ConfigMapBuilder().withNewMetadata().withNamespace(namespace).withName(configMapName).withLabels(labelFactory.clusterLabels(stackGresCluster)).endMetadata().withData(data).build();
}
Also used : VolumeMount(io.fabric8.kubernetes.api.model.VolumeMount) StackGresContext(io.stackgres.common.StackGresContext) VolumeFactory(io.stackgres.operator.conciliation.factory.VolumeFactory) ConfigMapVolumeSourceBuilder(io.fabric8.kubernetes.api.model.ConfigMapVolumeSourceBuilder) Container(io.fabric8.kubernetes.api.model.Container) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) LoggerFactory(org.slf4j.LoggerFactory) Seq(org.jooq.lambda.Seq) StackgresClusterContainers(io.stackgres.common.StackgresClusterContainers) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) Inject(javax.inject.Inject) StatefulSetDynamicVolumes(io.stackgres.operator.conciliation.factory.cluster.StatefulSetDynamicVolumes) EnvoyUtil(io.stackgres.common.EnvoyUtil) ImmutableVolumePair(io.stackgres.operator.conciliation.factory.ImmutableVolumePair) VolumeMountBuilder(io.fabric8.kubernetes.api.model.VolumeMountBuilder) StackGresClusterPod(io.stackgres.common.crd.sgcluster.StackGresClusterPod) VolumePair(io.stackgres.operator.conciliation.factory.VolumePair) YAMLMapper(com.fasterxml.jackson.dataformat.yaml.YAMLMapper) ImmutableList(com.google.common.collect.ImmutableList) Map(java.util.Map) ContainerBuilder(io.fabric8.kubernetes.api.model.ContainerBuilder) ContainerFactory(io.stackgres.operator.conciliation.factory.ContainerFactory) Volume(io.fabric8.kubernetes.api.model.Volume) StackGresClusterContainerContext(io.stackgres.operator.conciliation.factory.cluster.StackGresClusterContainerContext) Logger(org.slf4j.Logger) ImmutableMap(com.google.common.collect.ImmutableMap) StackGresClusterContext(io.stackgres.operator.conciliation.cluster.StackGresClusterContext) LabelFactoryForCluster(io.stackgres.common.LabelFactoryForCluster) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) YamlMapperProvider(io.stackgres.common.YamlMapperProvider) ResourceUtil(io.stackgres.operatorframework.resource.ResourceUtil) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) ConfigMapBuilder(io.fabric8.kubernetes.api.model.ConfigMapBuilder) StackGresComponent(io.stackgres.common.StackGresComponent) StackGresClusterSpec(io.stackgres.common.crd.sgcluster.StackGresClusterSpec) List(java.util.List) Stream(java.util.stream.Stream) Optional(java.util.Optional) NotNull(org.jetbrains.annotations.NotNull) ContainerPortBuilder(io.fabric8.kubernetes.api.model.ContainerPortBuilder) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) StackGresClusterSpec(io.stackgres.common.crd.sgcluster.StackGresClusterSpec) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) YAMLMapper(com.fasterxml.jackson.dataformat.yaml.YAMLMapper) ConfigMapBuilder(io.fabric8.kubernetes.api.model.ConfigMapBuilder) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with StackGresClusterContext

use of io.stackgres.operator.conciliation.cluster.StackGresClusterContext in project stackgres by ongres.

the class PrometheusIntegration method generateResource.

@Override
public Stream<HasMetadata> generateResource(StackGresClusterContext context) {
    final StackGresCluster stackGresCluster = context.getSource();
    final Map<String, String> defaultLabels = labelFactory.clusterLabels(stackGresCluster);
    Map<String, String> crossNamespaceLabels = labelFactory.clusterCrossNamespaceLabels(stackGresCluster);
    Seq<HasMetadata> resources = Seq.of(new ServiceBuilder().withNewMetadata().withNamespace(stackGresCluster.getMetadata().getNamespace()).withName(AbstractEnvoy.serviceName(context)).withLabels(ImmutableMap.<String, String>builder().putAll(crossNamespaceLabels).put("container", AbstractEnvoy.NAME).build()).endMetadata().withSpec(new ServiceSpecBuilder().withSelector(defaultLabels).withPorts(new ServicePortBuilder().withProtocol("TCP").withName(AbstractEnvoy.NAME).withPort(8001).build()).build()).build());
    Optional<Stream<HasMetadata>> serviceMonitors = context.getPrometheus().filter(c -> Optional.ofNullable(c.getCreateServiceMonitor()).orElse(false)).map(c -> getServiceMonitors(context, crossNamespaceLabels, c));
    return serviceMonitors.map(hasMetadataStream -> Stream.concat(resources, hasMetadataStream)).orElse(resources);
}
Also used : LabelSelector(io.fabric8.kubernetes.api.model.LabelSelector) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) StackGresVersion(io.stackgres.operator.common.StackGresVersion) ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortBuilder) Singleton(javax.inject.Singleton) Seq(org.jooq.lambda.Seq) ServiceMonitor(io.stackgres.operator.customresource.prometheus.ServiceMonitor) Inject(javax.inject.Inject) NamespaceSelector(io.stackgres.operator.customresource.prometheus.NamespaceSelector) ResourceGenerator(io.stackgres.operator.conciliation.ResourceGenerator) Map(java.util.Map) Prometheus(io.stackgres.operator.common.Prometheus) ServiceSpecBuilder(io.fabric8.kubernetes.api.model.ServiceSpecBuilder) ServiceBuilder(io.fabric8.kubernetes.api.model.ServiceBuilder) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) ServiceMonitorSpec(io.stackgres.operator.customresource.prometheus.ServiceMonitorSpec) ImmutableMap(com.google.common.collect.ImmutableMap) StackGresClusterContext(io.stackgres.operator.conciliation.cluster.StackGresClusterContext) Endpoint(io.stackgres.operator.customresource.prometheus.Endpoint) LabelFactoryForCluster(io.stackgres.common.LabelFactoryForCluster) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) OperatorVersionBinder(io.stackgres.operator.conciliation.OperatorVersionBinder) Stream(java.util.stream.Stream) Optional(java.util.Optional) NotNull(org.jetbrains.annotations.NotNull) Collections(java.util.Collections) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) ServiceSpecBuilder(io.fabric8.kubernetes.api.model.ServiceSpecBuilder) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortBuilder) Stream(java.util.stream.Stream) ServiceBuilder(io.fabric8.kubernetes.api.model.ServiceBuilder)

Example 3 with StackGresClusterContext

use of io.stackgres.operator.conciliation.cluster.StackGresClusterContext in project stackgres by ongres.

the class PrometheusIntegration method generateResource.

@Override
public Stream<HasMetadata> generateResource(StackGresClusterContext context) {
    final StackGresCluster cluster = context.getSource();
    final Map<String, String> defaultLabels = labelFactory.clusterLabels(cluster);
    Map<String, String> labels = new ImmutableMap.Builder<String, String>().putAll(labelFactory.clusterCrossNamespaceLabels(cluster)).build();
    final String clusterNamespace = cluster.getMetadata().getNamespace();
    final Stream<HasMetadata> resources = Stream.of(new ServiceBuilder().withNewMetadata().withNamespace(clusterNamespace).withName(serviceName(context)).withLabels(ImmutableMap.<String, String>builder().putAll(labels).put("container", POSTGRES_EXPORTER_CONTAINER_NAME).build()).endMetadata().withSpec(new ServiceSpecBuilder().withSelector(defaultLabels).withPorts(new ServicePortBuilder().withName(POSTGRES_EXPORTER_CONTAINER_NAME).withProtocol("TCP").withPort(9187).build()).build()).build());
    Optional<Stream<HasMetadata>> serviceMonitors = context.getPrometheus().filter(c -> Optional.ofNullable(c.getCreateServiceMonitor()).orElse(false)).map(c -> c.getPrometheusInstallations().stream().map(pi -> {
        ServiceMonitor serviceMonitor = new ServiceMonitor();
        serviceMonitor.setMetadata(new ObjectMetaBuilder().withNamespace(pi.getNamespace()).withName(serviceMonitorName(context)).withLabels(ImmutableMap.<String, String>builder().putAll(pi.getMatchLabels()).putAll(labels).build()).build());
        ServiceMonitorSpec spec = new ServiceMonitorSpec();
        serviceMonitor.setSpec(spec);
        LabelSelector selector = new LabelSelector();
        spec.setSelector(selector);
        NamespaceSelector namespaceSelector = new NamespaceSelector();
        namespaceSelector.setMatchNames(ImmutableList.of(clusterNamespace));
        spec.setNamespaceSelector(namespaceSelector);
        selector.setMatchLabels(labels);
        Endpoint endpoint = new Endpoint();
        endpoint.setPort(POSTGRES_EXPORTER_CONTAINER_NAME);
        spec.setEndpoints(Collections.singletonList(endpoint));
        return serviceMonitor;
    }));
    return serviceMonitors.map(hasMetadataStream -> Stream.concat(resources, hasMetadataStream)).orElse(resources);
}
Also used : LabelSelector(io.fabric8.kubernetes.api.model.LabelSelector) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) StackGresVersion(io.stackgres.operator.common.StackGresVersion) ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortBuilder) Singleton(javax.inject.Singleton) StackgresClusterContainers(io.stackgres.common.StackgresClusterContainers) ServiceMonitor(io.stackgres.operator.customresource.prometheus.ServiceMonitor) Inject(javax.inject.Inject) NamespaceSelector(io.stackgres.operator.customresource.prometheus.NamespaceSelector) ImmutableList(com.google.common.collect.ImmutableList) ResourceGenerator(io.stackgres.operator.conciliation.ResourceGenerator) Map(java.util.Map) ServiceSpecBuilder(io.fabric8.kubernetes.api.model.ServiceSpecBuilder) ServiceBuilder(io.fabric8.kubernetes.api.model.ServiceBuilder) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) ServiceMonitorSpec(io.stackgres.operator.customresource.prometheus.ServiceMonitorSpec) ImmutableMap(com.google.common.collect.ImmutableMap) StackGresClusterContext(io.stackgres.operator.conciliation.cluster.StackGresClusterContext) Endpoint(io.stackgres.operator.customresource.prometheus.Endpoint) LabelFactoryForCluster(io.stackgres.common.LabelFactoryForCluster) ResourceUtil(io.stackgres.operatorframework.resource.ResourceUtil) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) OperatorVersionBinder(io.stackgres.operator.conciliation.OperatorVersionBinder) Stream(java.util.stream.Stream) Optional(java.util.Optional) Collections(java.util.Collections) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortBuilder) ServiceSpecBuilder(io.fabric8.kubernetes.api.model.ServiceSpecBuilder) ServiceBuilder(io.fabric8.kubernetes.api.model.ServiceBuilder) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) LabelSelector(io.fabric8.kubernetes.api.model.LabelSelector) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) NamespaceSelector(io.stackgres.operator.customresource.prometheus.NamespaceSelector) ServiceBuilder(io.fabric8.kubernetes.api.model.ServiceBuilder) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) ServiceSpecBuilder(io.fabric8.kubernetes.api.model.ServiceSpecBuilder) ServiceMonitorSpec(io.stackgres.operator.customresource.prometheus.ServiceMonitorSpec) ServiceMonitor(io.stackgres.operator.customresource.prometheus.ServiceMonitor) Endpoint(io.stackgres.operator.customresource.prometheus.Endpoint) ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortBuilder) Stream(java.util.stream.Stream)

Example 4 with StackGresClusterContext

use of io.stackgres.operator.conciliation.cluster.StackGresClusterContext in project stackgres by ongres.

the class Patroni method getContainer.

@Override
public Container getContainer(StackGresClusterContainerContext context) {
    final StackGresClusterContext clusterContext = context.getClusterContext();
    final StackGresCluster cluster = clusterContext.getSource();
    final String patroniImageName = String.format(IMAGE_NAME, cluster.getSpec().getPostgres().getVersion());
    ResourceRequirements podResources = requirementsFactory.createResource(clusterContext);
    final String startScript = clusterContext.getRestoreBackup().isPresent() ? "/start-patroni-with-restore.sh" : "/start-patroni.sh";
    final PostgresContainerContext postgresContext = ContextUtil.toPostgresContext(context);
    ImmutableList.Builder<VolumeMount> volumeMounts = ImmutableList.<VolumeMount>builder().addAll(postgresSocket.getVolumeMounts(context)).add(new VolumeMountBuilder().withName(PatroniStaticVolume.DSHM.getVolumeName()).withMountPath(ClusterStatefulSetPath.SHARED_MEMORY_PATH.path()).build()).add(new VolumeMountBuilder().withName(PatroniStaticVolume.LOG.getVolumeName()).withMountPath(ClusterStatefulSetPath.PG_LOG_PATH.path()).build()).addAll(localBinMounts.getVolumeMounts(context)).add(new VolumeMountBuilder().withName(StatefulSetDynamicVolumes.PATRONI_ENV.getVolumeName()).withMountPath("/etc/env/patroni").build(), new VolumeMountBuilder().withName(PatroniStaticVolume.PATRONI_CONFIG.getVolumeName()).withMountPath("/etc/patroni").build()).addAll(backupMounts.getVolumeMounts(context)).addAll(postgresExtensions.getVolumeMounts(postgresContext));
    clusterContext.getRestoreBackup().ifPresent(ignore -> volumeMounts.addAll(restoreMounts.getVolumeMounts(context)));
    return new ContainerBuilder().withName(StackgresClusterContainers.PATRONI).withImage(patroniImageName).withCommand("/bin/sh", "-ex", ClusterStatefulSetPath.LOCAL_BIN_PATH.path() + startScript).withImagePullPolicy("IfNotPresent").withPorts(new ContainerPortBuilder().withProtocol("TCP").withName(PatroniConfigMap.POSTGRES_PORT_NAME).withContainerPort(EnvoyUtil.PG_ENTRY_PORT).build(), new ContainerPortBuilder().withProtocol("TCP").withName(PatroniConfigMap.POSTGRES_REPLICATION_PORT_NAME).withContainerPort(EnvoyUtil.PG_REPL_ENTRY_PORT).build(), new ContainerPortBuilder().withProtocol("TCP").withName(PATRONI_RESTAPI_PORT_NAME).withProtocol("TCP").withContainerPort(EnvoyUtil.PATRONI_ENTRY_PORT).build()).withVolumeMounts(volumeMounts.build()).addToVolumeMounts(clusterContext.getIndexedScripts().stream().map(t -> new VolumeMountBuilder().withName(PatroniScriptsConfigMap.name(clusterContext, t)).withMountPath("/etc/patroni/init-script.d/" + PatroniScriptsConfigMap.scriptName(t)).withSubPath(t.v1.getScript() != null ? PatroniScriptsConfigMap.scriptName(t) : t.v1.getScriptFrom().getConfigMapKeyRef() != null ? t.v1.getScriptFrom().getConfigMapKeyRef().getKey() : t.v1.getScriptFrom().getSecretKeyRef().getKey()).withReadOnly(true).build()).toArray(VolumeMount[]::new)).withEnvFrom(new EnvFromSourceBuilder().withConfigMapRef(new ConfigMapEnvSourceBuilder().withName(PatroniConfigMap.name(clusterContext)).build()).build()).withEnv(getEnvVars(context)).withLivenessProbe(new ProbeBuilder().withHttpGet(new HTTPGetActionBuilder().withPath("/cluster").withPort(new IntOrString(EnvoyUtil.PATRONI_ENTRY_PORT)).withScheme("HTTP").build()).withInitialDelaySeconds(15).withPeriodSeconds(20).withFailureThreshold(6).build()).withReadinessProbe(new ProbeBuilder().withHttpGet(new HTTPGetActionBuilder().withPath("/read-only").withPort(new IntOrString(EnvoyUtil.PATRONI_ENTRY_PORT)).withScheme("HTTP").build()).withInitialDelaySeconds(5).withPeriodSeconds(10).build()).withResources(podResources).build();
}
Also used : ImmutableList(com.google.common.collect.ImmutableList) IntOrString(io.fabric8.kubernetes.api.model.IntOrString) IntOrString(io.fabric8.kubernetes.api.model.IntOrString) VolumeMountBuilder(io.fabric8.kubernetes.api.model.VolumeMountBuilder) ResourceRequirements(io.fabric8.kubernetes.api.model.ResourceRequirements) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) PostgresContainerContext(io.stackgres.operator.conciliation.factory.PostgresContainerContext) HTTPGetActionBuilder(io.fabric8.kubernetes.api.model.HTTPGetActionBuilder) ProbeBuilder(io.fabric8.kubernetes.api.model.ProbeBuilder) ContainerBuilder(io.fabric8.kubernetes.api.model.ContainerBuilder) StackGresClusterContext(io.stackgres.operator.conciliation.cluster.StackGresClusterContext) ContainerPortBuilder(io.fabric8.kubernetes.api.model.ContainerPortBuilder) VolumeMount(io.fabric8.kubernetes.api.model.VolumeMount) EnvFromSourceBuilder(io.fabric8.kubernetes.api.model.EnvFromSourceBuilder) ConfigMapEnvSourceBuilder(io.fabric8.kubernetes.api.model.ConfigMapEnvSourceBuilder)

Example 5 with StackGresClusterContext

use of io.stackgres.operator.conciliation.cluster.StackGresClusterContext in project stackgres by ongres.

the class PatroniScriptsConfigMap method buildVolumes.

@Override
@NotNull
public Stream<VolumePair> buildVolumes(StackGresClusterContext context) {
    StackGresCluster cluster = context.getSource();
    var indexedScripts = context.getIndexedScripts();
    List<VolumePair> inlineScripts = indexedScripts.stream().filter(t -> t.v1.getScript() != null).map(t -> ImmutableVolumePair.builder().volume(new VolumeBuilder().withName(name(context, t)).withConfigMap(new ConfigMapVolumeSourceBuilder().withName(name(context, t)).withOptional(false).build()).build()).source(new ConfigMapBuilder().withNewMetadata().withNamespace(cluster.getMetadata().getNamespace()).withName(name(context, t)).withLabels(labelFactory.patroniClusterLabels(cluster)).endMetadata().withData(ImmutableMap.of(scriptName(t), t.v1.getScript())).build()).build()).collect(Collectors.toUnmodifiableList());
    List<VolumePair> configMapScripts = indexedScripts.stream().filter(t -> t.v1.getScriptFrom() != null).filter(t -> t.v1.getScriptFrom().getConfigMapKeyRef() != null).map(t -> ImmutableVolumePair.builder().volume(new VolumeBuilder().withName(name(context, t)).withConfigMap(new ConfigMapVolumeSourceBuilder().withName(t.v1.getScriptFrom().getConfigMapKeyRef().getName()).withOptional(false).build()).build()).build()).collect(Collectors.toUnmodifiableList());
    List<VolumePair> secretScripts = indexedScripts.stream().filter(t -> t.v1.getScriptFrom() != null).filter(t -> t.v1.getScriptFrom().getSecretKeyRef() != null).map(t -> ImmutableVolumePair.builder().volume(new VolumeBuilder().withName(name(context, t)).withSecret(new SecretVolumeSourceBuilder().withSecretName(t.v1.getScriptFrom().getSecretKeyRef().getName()).withOptional(false).build()).build()).build()).collect(Collectors.toUnmodifiableList());
    return ImmutableList.<VolumePair>builder().addAll(inlineScripts).addAll(configMapScripts).addAll(secretScripts).build().stream();
}
Also used : VolumeFactory(io.stackgres.operator.conciliation.factory.VolumeFactory) ConfigMapVolumeSourceBuilder(io.fabric8.kubernetes.api.model.ConfigMapVolumeSourceBuilder) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) StackGresVersion(io.stackgres.operator.common.StackGresVersion) Singleton(javax.inject.Singleton) Inject(javax.inject.Inject) ImmutableVolumePair(io.stackgres.operator.conciliation.factory.ImmutableVolumePair) VolumePair(io.stackgres.operator.conciliation.factory.VolumePair) ImmutableList(com.google.common.collect.ImmutableList) Tuple4(org.jooq.lambda.tuple.Tuple4) Locale(java.util.Locale) Volume(io.fabric8.kubernetes.api.model.Volume) SecretVolumeSourceBuilder(io.fabric8.kubernetes.api.model.SecretVolumeSourceBuilder) ImmutableMap(com.google.common.collect.ImmutableMap) StackGresClusterContext(io.stackgres.operator.conciliation.cluster.StackGresClusterContext) LabelFactoryForCluster(io.stackgres.common.LabelFactoryForCluster) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) ResourceUtil(io.stackgres.operatorframework.resource.ResourceUtil) Collectors(java.util.stream.Collectors) OperatorVersionBinder(io.stackgres.operator.conciliation.OperatorVersionBinder) ConfigMapBuilder(io.fabric8.kubernetes.api.model.ConfigMapBuilder) List(java.util.List) Stream(java.util.stream.Stream) StackGresClusterScriptEntry(io.stackgres.common.crd.sgcluster.StackGresClusterScriptEntry) NotNull(org.jetbrains.annotations.NotNull) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) ImmutableVolumePair(io.stackgres.operator.conciliation.factory.ImmutableVolumePair) VolumePair(io.stackgres.operator.conciliation.factory.VolumePair) SecretVolumeSourceBuilder(io.fabric8.kubernetes.api.model.SecretVolumeSourceBuilder) ConfigMapBuilder(io.fabric8.kubernetes.api.model.ConfigMapBuilder) ConfigMapVolumeSourceBuilder(io.fabric8.kubernetes.api.model.ConfigMapVolumeSourceBuilder) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

StackGresClusterContext (io.stackgres.operator.conciliation.cluster.StackGresClusterContext)16 StackGresCluster (io.stackgres.common.crd.sgcluster.StackGresCluster)13 ContainerBuilder (io.fabric8.kubernetes.api.model.ContainerBuilder)8 StackGresVersion (io.stackgres.operator.common.StackGresVersion)8 OperatorVersionBinder (io.stackgres.operator.conciliation.OperatorVersionBinder)8 Singleton (javax.inject.Singleton)8 ImmutableList (com.google.common.collect.ImmutableList)7 HasMetadata (io.fabric8.kubernetes.api.model.HasMetadata)7 LabelFactoryForCluster (io.stackgres.common.LabelFactoryForCluster)7 List (java.util.List)7 Stream (java.util.stream.Stream)7 Inject (javax.inject.Inject)7 Optional (java.util.Optional)6 ImmutableMap (com.google.common.collect.ImmutableMap)5 VolumeMountBuilder (io.fabric8.kubernetes.api.model.VolumeMountBuilder)5 Map (java.util.Map)5 Collectors (java.util.stream.Collectors)5 ContainerPortBuilder (io.fabric8.kubernetes.api.model.ContainerPortBuilder)4 Volume (io.fabric8.kubernetes.api.model.Volume)4 VolumeBuilder (io.fabric8.kubernetes.api.model.VolumeBuilder)4