Skip to content

Purge wrong-database leftovers from copied editor charts - #1138

Merged
ArnobKumarSaha merged 5 commits into
masterfrom
arnob-neo4j-ui
Aug 13, 2026
Merged

Purge wrong-database leftovers from copied editor charts#1138
ArnobKumarSaha merged 5 commits into
masterfrom
arnob-neo4j-ui

Conversation

@ArnobKumarSaha

@ArnobKumarSaha ArnobKumarSaha commented Aug 13, 2026

Copy link
Copy Markdown
Member

Charts copied from another database's editor kept the source's identifiers. Four commits, worst first.

1. kubedbcom-documentdb-editor create form was bound to a model key that does not exist

ui/create-ui.yaml referenced schema#/properties/resources/properties/**kubedbComMySQL**/... in all 38 of its $refs and if: conditions, but the chart defines kubedbComDocumentDB (values.yaml:18, values.openapiv3_schema.yaml:187). Its own functions.js (25 refs) and edit-ui.yaml (15 refs) use the correct key — only the create form was wrong.

Same file also fetched getMySqlVersions|catalog.kubedb.com|v1alpha1|**mysqlversions** → now documentdbversions (catalogkubedbcom-documentdbversion-editor/crds/…:10).

2. Autoscaler "Select Db" dropdown listed Redis in seven editors

getDbs() copied out of kubedbcom-redis-editor without renaming the resource, so the autoscaler databaseRef offered Redis instances:

chart ui/functions.js was now
kafka :469 redises kafkas
memcached :170 redises memcacheds
mssqlserver :790 redises mssqlservers
perconaxtradb :193 redises perconaxtradbs
pgbouncer :175 redises pgbouncers
pgpool :112 redises pgpools
proxysql :120 redises proxysqls

All seven are live — getDbs is the loader: on the select bound to .../<Db>Autoscaler/.../databaseRef/name (e.g. kubedbcom-kafka-editor/ui/edit-ui.yaml:19, :472).

3. kubedbcom-neo4j-editor / opskubedbcom-neo4jopsrequest-editor

  • kubedbcom-neo4j-editor/ui/functions.js:702getNeo4jDbs fetched .../namespaces/{ns}/**Neo4js**; CRD plural is neo4js.
  • kubedbcom-neo4j-editor/ui/functions.js:1118getOpsRequestUrl built .../v1alpha1/**Neo4jopsrequests**/create; CRD plural is neo4jopsrequests.
  • opskubedbcom-neo4jopsrequest-editor/ui/create-ui.yaml:192 — machine watcher wrote to spec.verticalScaling.**neo4j**; the CRD field is server (crds/…:313).

4. Cosmetic: wrong database name shown to users

  • 13 charts' language.yaml: "Pre-populate your MySQL…", "Configure MongoDB with configuration files.", "Prevent deletion of the PgBouncer CRD." → the chart's own name. Only the deletion-policy string is currently rendered; the rest are dormant keys fixed for when they are wired up.
  • documentdb / qdrant edit-ui.yaml: autoscaling section labelled Mysql.
  • Local functions renamed to their own kind: getMysqlDbsgetDocumentDBDbs / getQdrantDbs, deleteKubeDbComMySqlDbAnnotationdeleteKubeDbComDocumentDBDbAnnotation.
  • 12 opsrequest editors' language.yaml carried the copy source's database vocabulary slot (redis: Redis, or mysql: MySQL in neo4j).

Verification

  • Model keys: every kubedbCom* key used under ui/ cross-checked against the chart's values.yaml, across all <db>-editor, -editor-options, opsrequest-editor and autoscaler-editor charts. documentdb was the only mismatch; it is fixed.
  • Ops scaling fields: verticalScaling / horizontalScaling / configuration / tls sub-keys used in every opsrequest editor's UI parsed out of each chart's own CRD schema — all resolve after the neo4j server fix.
  • Resource plurals: every kubedb.com/catalog.kubedb.com URL matched against the chart's CRD plural; no capitalized path segments remain anywhere in charts/*/ui/*.js; all 27 console …/<x>opsrequests/create links match their ops CRD.
  • Changed YAML re-parsed with yaml.safe_load; changed JS passes node --check.

Deliberately left alone (real cross-database references, not copy-paste): ProxySQL→MySQL (mysqlQueryRules), pgbouncer/pgpool→Postgres, druid→MySQL/Postgres/ZooKeeper metadata store, solr→ZooKeeper, mongodb→Mongos. Also the ~104 dead mongos boilerplate keys (customize_mongos_pod_template, mongosNodes, same_as_mongos) present in every chart's language.yaml, and the generic get<X>Versions fetch names, which are not defined in any chart and appear to be resolved by the console from the pipe arguments — renaming them is risk without benefit.

Out of scope: non-KubeDB groups (cert-manager, OCM, Cluster API, KubeStash, KubeVault).

make fmt was not run: it shells out to Docker and the daemon was not available locally.

- kubedbcom-neo4j-editor: getNeo4jDbs used /Neo4js and getOpsRequestUrl
  used /Neo4jopsrequests; both plurals are lowercase in the CRDs
- opskubedbcom-neo4jopsrequest-editor: machine watcher wrote resources to
  spec.verticalScaling.neo4j instead of spec.verticalScaling.server

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
getDbs() was copied from kubedbcom-redis-editor into the kafka,
memcached, mssqlserver, perconaxtradb, pgbouncer, pgpool and proxysql
editors without renaming the resource, so the autoscaler databaseRef
dropdown listed Redis instances instead of the chart's own kind.

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
@ArnobKumarSaha ArnobKumarSaha changed the title Fix neo4j editor resource plurals and vertical scaling path Fix neo4j editor plurals, vertical scaling path, and redis-copied Select Db loaders Aug 13, 2026
- documentdb: create-ui.yaml was bound to the kubedbComMySQL model key,
  which the chart does not define (values.yaml has kubedbComDocumentDB),
  and fetched mysqlversions instead of documentdbversions
- documentdb, qdrant: autoscaling section labelled "Mysql"; local
  getMysqlDbs/deleteKubeDbComMySqlDbAnnotation renamed to their own kind
- 13 charts: language.yaml sentences named the database the chart was
  copied from (MySQL, MongoDB, PgBouncer) instead of their own

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
Each opsrequest editor's language.yaml carries one labels entry for its
own database. Twelve charts still carried the copy source's (redis, or
mysql in neo4j) instead of their own kind.

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
@ArnobKumarSaha ArnobKumarSaha changed the title Fix neo4j editor plurals, vertical scaling path, and redis-copied Select Db loaders Purge wrong-database leftovers from copied editor charts Aug 13, 2026
options.database.mode described MongoDB Replicaset/Sharded topologies in
the mssqlserver, perconaxtradb, singlestore and zookeeper editors. No
create-ui or edit-ui in those charts references the key.

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
@ArnobKumarSaha
ArnobKumarSaha merged commit 0e41e75 into master Aug 13, 2026
4 checks passed
@ArnobKumarSaha
ArnobKumarSaha deleted the arnob-neo4j-ui branch August 13, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant