(ctx context.Context)
| 14 | ) |
| 15 | |
| 16 | func GetQueriesConfigDir(ctx context.Context) string { |
| 17 | log := logging.FromContext(ctx) |
| 18 | // The QUERIES_CONFIG_DIR environment variable can be used to tell postgres-operator where to |
| 19 | // find the setup.sql and queries.yml files when running the postgres-operator binary locally |
| 20 | if queriesConfigDir := os.Getenv("QUERIES_CONFIG_DIR"); queriesConfigDir != "" { |
| 21 | log.Info("Directory for setup.sql and queries files set by QUERIES_CONFIG_DIR env var. " + |
| 22 | "This should only be used when running the postgres-operator binary locally.") |
| 23 | return queriesConfigDir |
| 24 | } |
| 25 | |
| 26 | return "/opt/crunchy/conf" |
| 27 | } |
| 28 | |
| 29 | // ExporterEnabled returns true if the monitoring exporter is enabled |
| 30 | func ExporterEnabled(ctx context.Context, cluster *v1beta1.PostgresCluster) bool { |
no test coverage detected