You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -466,7 +466,7 @@ spec:
466
466
# ...
467
467
```
468
468
469
-
### Example Defaults ConfigMap for Postgres HA
469
+
### Example Defaults ConfigMap for HA instances
470
470
The `defaultsConfigMapRef` field on the Database CR points to a ConfigMap that pre-fills profiles and time machine settings, reducing repetition across CRs. Keys are prefixed with the database `type` value (`postgres.`, `mysql.`) so a single ConfigMap can hold defaults for multiple engines.
Copy file name to clipboardExpand all lines: deploy/helm/README.md
+76-36Lines changed: 76 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -432,64 +432,104 @@ spec:
432
432
```
433
433
434
434
435
-
#### Creating Postgres HA instance resource
436
-
```yaml
435
+
### Creating HA instance resource (Postgres, MySQL)
436
+
The `haConfig` block is engine-specific. Use `type: postgres` with a `haConfig.postgres` sub-block, or `type: mysql` with a `haConfig.mysql` sub-block. The `nodes` array, `timeMachine`, and `profiles` fields are shared across both engines.
437
+
438
+
**Postgres HA** — HAProxy VMs provide load balancing. Applications connect to **HAProxy VM IPs** on port 5000 (read-write) and 5001 (read-only).
439
+
440
+
**MySQL HA (router disabled)** — Applications connect directly to the **Master VM** on port 3306 (read-write). The read-only service targets all **Replica VM** IPs.
441
+
442
+
**MySQL HA (router enabled)** — MySQL Router VMs handle load balancing. Applications connect to **Router VM IPs** on port 6446 (read-write) and 6447 (read-only).
443
+
444
+
NOTE: the ports mentioned are default ports and can be overridden.
445
+
446
+
```
437
447
apiVersion: ndb.nutanix.com/v1alpha1
438
448
kind: Database
439
449
metadata:
440
-
name: Postgres-HA-K8s-resource
450
+
name: ha-k8s-resource
441
451
namespace: default
442
452
spec:
443
453
ndbRef: ndbserver
454
+
# defaultsConfigMapRef: <ha-defaults-cm> # injects timezone, profiles, timeMachine from ConfigMap
444
455
databaseInstance:
445
-
name: "PGHA_instance_DB"
446
-
description: "Postgres HA instance"
447
-
# defaultsConfigMapRef: pgha-defaults # injects timezone, profiles, timeMachine from ConfigMap
448
-
type: postgres
449
-
credentialSecret: pgha-db-secret
456
+
name: "HA_instance_DB"
457
+
description: "HA instance"
458
+
type: postgres # ── or: mysql
459
+
credentialSecret: db-secret
450
460
size: 200
451
-
clusterName: "<PE cluster name (as shown in NDB UI)>"# This is often the Primary PE cluster
452
-
#ClusterID: "UUID of the PE cluster"
461
+
clusterName: "<PE cluster name (as shown in NDB UI)>" # primary PE cluster
462
+
# clusterId: "<UUID of the PE cluster>"
453
463
databaseNames:
454
-
- PGHA_instance
455
-
timeMachine:
456
-
name: "PGHA_TM"
457
-
description: "TM for Postgres HA"
464
+
- ha_db
465
+
# timeMachine: # use timemachine section here to explicitly define and override defaults configmap
466
+
# ...
467
+
# profiles: # use profiles section here to explicitly define and override defaults configmap
468
+
# ....
458
469
haConfig:
459
-
patroniClusterName: "pgha-patroni"# any desired name
460
-
clusterName: "PGHA_cluster"# any desired name
461
-
enableSynchronousMode: true # default is false, This is for data replication across DB nodes
462
-
# provisionVirtualIP: true # default is false, keep this true if having stretched VLAN and need to provision VirtualIP
The `defaultsConfigMapRef` field on the Database CR points to a ConfigMap that pre-fills profiles and time machine settings, reducing repetition across CRs. Keys are prefixed with the database `type` value (`postgres.`, `mysql.`) so a single ConfigMap can hold defaults for multiple engines.
532
+
```
493
533
apiVersion: v1
494
534
kind: ConfigMap
495
535
metadata:
@@ -498,7 +538,7 @@ metadata:
498
538
data:
499
539
timezone: "UTC"
500
540
# postgres-prefixed keys take priority over unprefixed keys for postgres databases
0 commit comments