Search in sources :

Example 21 with StackGresClusterScriptEntry

use of io.stackgres.common.crd.sgcluster.StackGresClusterScriptEntry in project stackgres by ongres.

the class ClusterRequiredResourcesGenerator method getPostgresExporterInitScript.

private StackGresClusterScriptEntry getPostgresExporterInitScript() {
    final StackGresClusterScriptEntry script = new StackGresClusterScriptEntry();
    script.setName("prometheus-postgres-exporter-init");
    script.setDatabase("postgres");
    script.setScript(Unchecked.supplier(() -> Resources.asCharSource(ClusterRequiredResourcesGenerator.class.getResource("/prometheus-postgres-exporter/init.sql"), StandardCharsets.UTF_8).read()).get());
    return script;
}
Also used : StackGresClusterScriptEntry(io.stackgres.common.crd.sgcluster.StackGresClusterScriptEntry)

Aggregations

StackGresClusterScriptEntry (io.stackgres.common.crd.sgcluster.StackGresClusterScriptEntry)21 StackGresClusterReview (io.stackgres.operator.common.StackGresClusterReview)15 Test (org.junit.jupiter.api.Test)15 StackGresClusterInitData (io.stackgres.common.crd.sgcluster.StackGresClusterInitData)14 StackGresClusterScriptFrom (io.stackgres.common.crd.sgcluster.StackGresClusterScriptFrom)12 ConstraintValidationTest (io.stackgres.operator.validation.ConstraintValidationTest)12 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)12 ConfigMapKeySelector (io.stackgres.common.crd.ConfigMapKeySelector)6 SecretKeySelector (io.stackgres.common.crd.SecretKeySelector)5 StackGresCluster (io.stackgres.common.crd.sgcluster.StackGresCluster)5 StackGresClusterSpec (io.stackgres.common.crd.sgcluster.StackGresClusterSpec)3 ConfigMapBuilder (io.fabric8.kubernetes.api.model.ConfigMapBuilder)2 StackGresClusterPod (io.stackgres.common.crd.sgcluster.StackGresClusterPod)2 StackGresClusterPodScheduling (io.stackgres.common.crd.sgcluster.StackGresClusterPodScheduling)2 StackGresClusterSpecMetadata (io.stackgres.common.crd.sgcluster.StackGresClusterSpecMetadata)2 StackGresPodPersistentVolume (io.stackgres.common.crd.sgcluster.StackGresPodPersistentVolume)2 ConfigMap (io.fabric8.kubernetes.api.model.ConfigMap)1 ConfigMapKeySelector (io.fabric8.kubernetes.api.model.ConfigMapKeySelector)1 ObjectMeta (io.fabric8.kubernetes.api.model.ObjectMeta)1 Secret (io.fabric8.kubernetes.api.model.Secret)1