Purge wrong-database leftovers from copied editor charts - #1138
Merged
Conversation
- 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>
- 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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Charts copied from another database's editor kept the source's identifiers. Four commits, worst first.
1.
kubedbcom-documentdb-editorcreate form was bound to a model key that does not existui/create-ui.yamlreferencedschema#/properties/resources/properties/**kubedbComMySQL**/...in all 38 of its$refs andif:conditions, but the chart defineskubedbComDocumentDB(values.yaml:18,values.openapiv3_schema.yaml:187). Its ownfunctions.js(25 refs) andedit-ui.yaml(15 refs) use the correct key — only the create form was wrong.Same file also fetched
getMySqlVersions|catalog.kubedb.com|v1alpha1|**mysqlversions**→ nowdocumentdbversions(catalogkubedbcom-documentdbversion-editor/crds/…:10).2. Autoscaler "Select Db" dropdown listed Redis in seven editors
getDbs()copied out ofkubedbcom-redis-editorwithout renaming the resource, so the autoscalerdatabaseRefoffered Redis instances:ui/functions.jsrediseskafkasredisesmemcachedsredisesmssqlserversredisesperconaxtradbsredisespgbouncersredisespgpoolsredisesproxysqlsAll seven are live —
getDbsis theloader: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-editorkubedbcom-neo4j-editor/ui/functions.js:702—getNeo4jDbsfetched.../namespaces/{ns}/**Neo4js**; CRD plural isneo4js.kubedbcom-neo4j-editor/ui/functions.js:1118—getOpsRequestUrlbuilt.../v1alpha1/**Neo4jopsrequests**/create; CRD plural isneo4jopsrequests.opskubedbcom-neo4jopsrequest-editor/ui/create-ui.yaml:192— machine watcher wrote tospec.verticalScaling.**neo4j**; the CRD field isserver(crds/…:313).4. Cosmetic: wrong database name shown to users
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/qdrantedit-ui.yaml: autoscaling section labelledMysql.getMysqlDbs→getDocumentDBDbs/getQdrantDbs,deleteKubeDbComMySqlDbAnnotation→deleteKubeDbComDocumentDBDbAnnotation.language.yamlcarried the copy source's database vocabulary slot (redis: Redis, ormysql: MySQLin neo4j).Verification
kubedbCom*key used underui/cross-checked against the chart'svalues.yaml, across all<db>-editor,-editor-options,opsrequest-editorandautoscaler-editorcharts. documentdb was the only mismatch; it is fixed.verticalScaling/horizontalScaling/configuration/tlssub-keys used in every opsrequest editor's UI parsed out of each chart's own CRD schema — all resolve after the neo4jserverfix.kubedb.com/catalog.kubedb.comURL matched against the chart's CRD plural; no capitalized path segments remain anywhere incharts/*/ui/*.js; all 27 console…/<x>opsrequests/createlinks match their ops CRD.yaml.safe_load; changed JS passesnode --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 deadmongosboilerplate keys (customize_mongos_pod_template,mongosNodes,same_as_mongos) present in every chart'slanguage.yaml, and the genericget<X>Versionsfetch 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 fmtwas not run: it shells out to Docker and the daemon was not available locally.