MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / NewConfigForPostgresPod

Function NewConfigForPostgresPod

internal/collector/postgres.go:77–92  ·  view source on GitHub ↗
(ctx context.Context,
	inCluster *v1beta1.PostgresCluster,
	inParameters *postgres.ParameterSet,
)

Source from the content-addressed store, hash-verified

75}
76
77func NewConfigForPostgresPod(ctx context.Context,
78 inCluster *v1beta1.PostgresCluster,
79 inParameters *postgres.ParameterSet,
80) *Config {
81 config := NewConfig(inCluster.Spec.Instrumentation)
82
83 // Metrics
84 EnablePostgresMetrics(ctx, inCluster, config)
85 EnablePatroniMetrics(ctx, inCluster, config)
86
87 // Logging
88 EnablePostgresLogging(ctx, inCluster, inParameters, config)
89 EnablePatroniLogging(ctx, inCluster, config)
90
91 return config
92}
93
94// The contents of "postgres_logs_transforms.yaml" as JSON.
95// See: https://pkg.go.dev/embed

Callers 2

ReconcileMethod · 0.92

Calls 5

EnablePostgresMetricsFunction · 0.85
EnablePatroniMetricsFunction · 0.85
EnablePostgresLoggingFunction · 0.85
EnablePatroniLoggingFunction · 0.85
NewConfigFunction · 0.70

Tested by 1