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

Function ClusterConfigMap

internal/patroni/reconcile.go:30–45  ·  view source on GitHub ↗

ClusterConfigMap populates the shared ConfigMap with fields needed to run Patroni.

(ctx context.Context,
	inCluster *v1beta1.PostgresCluster,
	inHBAs *postgres.OrderedHBAs,
	inParameters *postgres.ParameterSet,
	outClusterConfigMap *corev1.ConfigMap,
	patroniLogStorageLimit int64,
)

Source from the content-addressed store, hash-verified

28
29// ClusterConfigMap populates the shared ConfigMap with fields needed to run Patroni.
30func ClusterConfigMap(ctx context.Context,
31 inCluster *v1beta1.PostgresCluster,
32 inHBAs *postgres.OrderedHBAs,
33 inParameters *postgres.ParameterSet,
34 outClusterConfigMap *corev1.ConfigMap,
35 patroniLogStorageLimit int64,
36) error {
37 var err error
38
39 initialize.Map(&outClusterConfigMap.Data)
40
41 outClusterConfigMap.Data[configMapFileKey], err = clusterYAML(inCluster, inHBAs,
42 inParameters, patroniLogStorageLimit)
43
44 return err
45}
46
47// InstanceConfigMap populates the shared ConfigMap with fields needed to run Patroni.
48func InstanceConfigMap(ctx context.Context,

Callers 2

TestClusterConfigMapFunction · 0.70

Calls 2

MapFunction · 0.92
clusterYAMLFunction · 0.85

Tested by 1

TestClusterConfigMapFunction · 0.56