Skip to content

Commit 118eec3

Browse files
committed
helm release changes
1 parent d62a026 commit 118eec3

5 files changed

Lines changed: 126 additions & 45 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ spec:
466466
# ...
467467
```
468468

469-
### Example Defaults ConfigMap for Postgres HA
469+
### Example Defaults ConfigMap for HA instances
470470
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.
471471
```
472472
apiVersion: v1

deploy/helm/Chart.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: ndb-operator
33
description: A Helm chart for Nutanix Database Kubernetes Operator
44
type: application
5-
version: 0.5.8
6-
appVersion: v0.5.5
5+
version: 0.5.9
6+
appVersion: v0.5.6
77
maintainers:
88
- name: mazin-s
99
email: mazin.shaaeldin@nutanix.com
@@ -23,13 +23,13 @@ icon: https://www.nutanix.com/content/dam/nutanix/global/icons/products/svg/Nuta
2323
annotations:
2424
artifacthub.io/changes: |
2525
- kind: added
26-
description: "Chart 0.5.8: Add support for Postgres HA and Oracle SI."
26+
description: "Add MySQL HA"
2727
- kind: changed
28-
description: "Chart 0.5.8: controller image v0.5.5."
28+
description: "Chart 0.5.9: controller image v0.5.6."
2929
- kind: security
30-
description: "kube-rbac-proxy v0.22.0 (quay.io/brancz/kube-rbac-proxy)."
30+
description: "upgraded go verion to 1.26.3, kube-rbac-proxy v0.22.0 docker.io/bitnami/kube-rbac-proxy"
3131
- kind: changed
32-
description: "Release details: https://github.com/nutanix-cloud-native/ndb-operator/releases/tag/v0.5.5"
32+
description: "Release details: https://github.com/nutanix-cloud-native/ndb-operator/releases/tag/v0.5.6"
3333
artifacthub.io/containsSecurityUpdates: "true"
3434
artifacthub.io/license: Apache-2.0
3535
artifacthub.io/maintainers: |

deploy/helm/README.md

Lines changed: 76 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -432,64 +432,104 @@ spec:
432432
```
433433

434434

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+
```
437447
apiVersion: ndb.nutanix.com/v1alpha1
438448
kind: Database
439449
metadata:
440-
name: Postgres-HA-K8s-resource
450+
name: ha-k8s-resource
441451
namespace: default
442452
spec:
443453
ndbRef: ndbserver
454+
# defaultsConfigMapRef: <ha-defaults-cm> # injects timezone, profiles, timeMachine from ConfigMap
444455
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
450460
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>"
453463
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+
# ....
458469
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
463-
# writePort: 5000 # defaults to 5000 if omitted
464-
# readPort: 5001 # defaults to 5001 if omitted
470+
clusterName: "HA_cluster" # any desired name
471+
enableSynchronousMode: true # default: false; enables synchronous replication (Postgres only)
472+
473+
# ── Postgres-specific ──────────────────────────────────────────────────
474+
postgres:
475+
patroniClusterName: "ha-patroni" # any desired name
476+
# provisionVirtualIP: true # default: false; set true for stretched VLANs
477+
# writePort: 5000 # HAProxy write port; defaults to 5000
478+
# readPort: 5001 # HAProxy read port; defaults to 5001
479+
480+
# ── MySQL-specific ─────────────────────────────────────────────────────
481+
# mysql:
482+
# innoDBClusterName: "ha-innodb" # any desired name
483+
# deployMySQLRouter: false # set true to add MySQL Router nodes (see nodes below)
484+
# # mysqlClusterUsername: mysqladmin # default: mysqladmin
485+
# # replicationUser: repl # default: repl
486+
# # routerRWPort: 6446 # only used when deployMySQLRouter: true; default: 6446
487+
# # routerROPort: 6447 # only used when deployMySQLRouter: true; default: 6447
488+
465489
nodes:
466-
- vmName: "PGHA_haproxy1" # any desired name
490+
# ── Postgres: HAProxy nodes (required) ──
491+
- vmName: "HA_haproxy1"
467492
nodeType: "haproxy"
468493
clusterName: "<PE cluster name (as shown in NDB UI)>"
469-
# clusterId: "UUID of the PE cluster"
470-
- vmName: "PGHA_haproxy2" # any desired name
494+
- vmName: "HA_haproxy2"
471495
nodeType: "haproxy"
472496
clusterName: "<PE cluster name (as shown in NDB UI)>"
473-
# clusterId: "UUID of the PE cluster"
474-
- vmName: "PGHA_DB-1" # any desired name
497+
498+
# ── Postgres: database nodes ──
499+
- vmName: "HA_DB-1"
475500
nodeType: "database"
476-
role: "Primary"
501+
role: "Primary" # Postgres: Primary | MySQL: Master
477502
clusterName: "<PE cluster name (as shown in NDB UI)>"
478-
# clusterId: "UUID of the PE cluster"
479-
- vmName: "PGHA_DB-2" # any desired name
503+
- vmName: "HA_DB-2"
480504
nodeType: "database"
481-
role: "Secondary"
505+
role: "Secondary" # Postgres: Secondary | MySQL: Replica
482506
clusterName: "<PE cluster name (as shown in NDB UI)>"
483-
# clusterId: "UUID of the PE cluster"
484-
- vmName: "PGHA_DB-3" # any desired name
507+
- vmName: "HA_DB-3"
485508
nodeType: "database"
486509
role: "Secondary"
487-
clusterName: "<PE cluster name (as shown in NDB UI)>"
488-
# clusterId: "UUID of the PE cluster"
510+
clusterName: "<PE cluster name (as shown in NDB UI)>" # can be a different PE cluster
511+
512+
# ── MySQL router-enabled only: add mysqlrouter nodes ──
513+
# - vmName: "HA_mysqlrouter1"
514+
# nodeType: "mysqlrouter"
515+
# clusterName: "<PE cluster name (as shown in NDB UI)>"
516+
# - vmName: "HA_mysqlrouter2"
517+
# nodeType: "mysqlrouter"
518+
# clusterName: "<PE cluster name (as shown in NDB UI)>"
519+
520+
# ── additionalArguments ────────────────────────────────────────────────
521+
# Postgres supports: listener_port only
522+
# MySQL supports: listener_port, allocate_mysql_hugepage, ensure_vm_host_distribution,
523+
# replication_user, replication_password, mysql_cluster_username,
524+
# mysql_cluster_password, innodb_cluster_name, cluster_name,
525+
# deploy_mysqlrouter, router_rw_port, router_ro_port
526+
# additionalArguments:
527+
# ...
489528
```
490529

491-
### Example Defaults configmap for HA instance
492-
```yaml
530+
### Example Defaults ConfigMap for HA instances
531+
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+
```
493533
apiVersion: v1
494534
kind: ConfigMap
495535
metadata:
@@ -498,7 +538,7 @@ metadata:
498538
data:
499539
timezone: "UTC"
500540
# postgres-prefixed keys take priority over unprefixed keys for postgres databases
501-
postgres.profiles.software.name: "POSTGRES_15.6_HA_ENABLED_ROCKY_LINUX_8_OOB"
541+
postgres.profiles.software.name: "POSTGRES_15.6_HA_ENABLED_ROCKY_LINUX_8_OOB" # or use mysql.profiles....
502542
postgres.profiles.compute.name: "DEFAULT_HA_COMPUTE"
503543
postgres.profiles.network.name: "PGHA_VLAN"
504544
postgres.profiles.dbParam.name: "DEFAULT_POSTGRES_HA_PARAMS"

deploy/helm/crds/customresourcedefinition-databases.ndb.nutanix.com.yaml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,46 @@ spec:
201201
enableSynchronousMode:
202202
description: Enable synchronous replication mode
203203
type: boolean
204+
mysql:
205+
description: |-
206+
MySQL contains InnoDB Cluster and MySQL Router settings specific to MySQL HA.
207+
Required when the database type is "mysql".
208+
properties:
209+
deployMySQLRouter:
210+
description: |-
211+
DeployMySQLRouter controls whether MySQL Router VMs are provisioned for load balancing.
212+
When true, Router VMs must be included in nodes[] with nodeType "mysqlrouter",
213+
When false, applications connect directly to the Master VM on port 3306.
214+
type: boolean
215+
innoDBClusterName:
216+
description: Name used by MySQL InnoDB Cluster for internal
217+
cluster coordination
218+
type: string
219+
mysqlClusterUsername:
220+
description: MySQLClusterUsername is the admin user for
221+
InnoDB Cluster management. Defaults to "mysqladmin".
222+
type: string
223+
replicationUser:
224+
description: ReplicationUser is the user for group replication.
225+
Defaults to "repl".
226+
type: string
227+
routerROPort:
228+
default: 6447
229+
description: |-
230+
RouterROPort is the MySQL Router read-only port. Defaults to 6447.
231+
Only meaningful when DeployMySQLRouter is true.
232+
format: int32
233+
type: integer
234+
routerRWPort:
235+
default: 6446
236+
description: |-
237+
RouterRWPort is the MySQL Router read-write port. Defaults to 6446.
238+
Only meaningful when DeployMySQLRouter is true.
239+
format: int32
240+
type: integer
241+
required:
242+
- innoDBClusterName
243+
type: object
204244
nodes:
205245
description: Node placement and role definitions for all VMs
206246
in the HA cluster
@@ -223,7 +263,8 @@ spec:
223263
"Automatic")
224264
type: string
225265
nodeType:
226-
description: 'Type of this node: "haproxy" or "database"'
266+
description: 'Type of this node: "database", "haproxy"
267+
(Postgres HA), or "mysqlrouter" (MySQL HA)'
227268
enum:
228269
- haproxy
229270
- database

deploy/helm/templates/deployment-ndb-operator-controller-manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ spec:
5959
- --upstream=http://127.0.0.1:8080/
6060
- --logtostderr=true
6161
- --v=0
62-
image: quay.io/brancz/kube-rbac-proxy:v0.22.0
62+
image: docker.io/bitnami/kube-rbac-proxy@sha256:4bfaad756b23b5f4c11c66716b72b45a369baad988fbe3c3cf3f0446e3c86fea
6363
name: kube-rbac-proxy
6464
ports:
6565
- containerPort: 8443

0 commit comments

Comments
 (0)