InstanceConfigMap populates the shared ConfigMap with fields needed to run Patroni.
(ctx context.Context, inCluster *v1beta1.PostgresCluster, inInstanceSpec *v1beta1.PostgresInstanceSetSpec, outInstanceConfigMap *corev1.ConfigMap, )
| 46 | |
| 47 | // InstanceConfigMap populates the shared ConfigMap with fields needed to run Patroni. |
| 48 | func InstanceConfigMap(ctx context.Context, |
| 49 | inCluster *v1beta1.PostgresCluster, |
| 50 | inInstanceSpec *v1beta1.PostgresInstanceSetSpec, |
| 51 | outInstanceConfigMap *corev1.ConfigMap, |
| 52 | ) error { |
| 53 | var err error |
| 54 | |
| 55 | initialize.Map(&outInstanceConfigMap.Data) |
| 56 | |
| 57 | command := pgbackrest.ReplicaCreateCommand(inCluster, inInstanceSpec) |
| 58 | |
| 59 | outInstanceConfigMap.Data[configMapFileKey], err = instanceYAML( |
| 60 | inCluster, inInstanceSpec, command) |
| 61 | |
| 62 | return err |
| 63 | } |
| 64 | |
| 65 | // InstanceCertificates populates the shared Secret with certificates needed to run Patroni. |
| 66 | func InstanceCertificates(ctx context.Context, |