Skip to content

Call AKP through the AKP v2 API in chart functions - #1220

Merged
ArnobKumarSaha merged 24 commits into
masterfrom
akp-v2-iam
Nov 24, 2026
Merged

ArnobKumarSaha merged 24 commits into
masterfrom
akp-v2-iam

Conversation

@tamalsaha

@tamalsaha tamalsaha commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Supersedes #1209 (closed: one AKP v2 PR per repo). All 21 commits of #1209 are here, rebased onto current master, plus two more (below).

Moves chart functions.js from AKP v1 API calls (axios) to the AKP v2 API, using the akp client that form-builder hands to useFunc (form-builder#423).

  • 123 useFunc charts take (model, { akp } = {}): database and ops request editors, their options charts, KubeStash, KubeVault, feature sets and the cluster chart preset.
  • 13 charts in the older format (autoscaler editors, Stash repository and restore session editors, VaultServer and VaultOpsRequest editors, the monitoring feature set) are rewritten for form-builder.
  • The 23 uibytebuildersdev-component-* charts are removed, as are the old-format create-ui.yaml files of 20 kubedbcom-*-editor charts.
  • Cluster proxy calls go through akp.resources; other calls use typed services (ClusterService.getDatabaseBundle, listAvailableTypes, PackageService.getPackageValues, hub info, telemetry).
  • Errors: '404' checks read e.code === akp.Code.NotFound, messages come from e.rawMessage.

Changes from #1209 made for the rebase:

  • The 23 uibytebuildersdev-component-* Chart.yaml files were version-bumped on master and deleted here. The deletion wins.

  • Last commit: the BackupStorage selection from Allow selecting BackupStorage for backup and archiver #1208 (BackupStorages, namespace, default Archiver, Kubestash repository and snapshot, in 16 options charts) and the telemetry stack storage classes still used axios and the v1 /clusters/{owner}/{cluster}/proxy/... route, and axios is not available to useFunc. They now use akp.resources.

  • Rebased onto master 1bdccce (update point-in-time-recovery fields #1219, point-in-time recovery fields). It added a namespace and database picker to seven kubedbcom-*-editor-options charts (clickhouse, documentdb, mariadb, mongodb, mssqlserver, mysql, postgres). The conflicts were in setPointInTimeRecovery: master pieces kept (refDBNameError, empty-window check, clickhouse/mongodb repository name without -full), reads through akp.resources, errors from e.rawMessage.

  • New last commit: getNamespaces (clickhouse) and getRefDbNames (all seven) from update point-in-time-recovery fields #1219 used axios and the v1 proxy; they now use akp.resources.create / list.

Trial merges (scratch branch, not pushed): #1218 (patch-console-agent, trivy-operator, kube-bench) is clean. #1221 (RotateAuth) has one conflict in opskubedbcom-proxysqlopsrequest-editor/ui/functions.js (the window.vueHelpers destructuring line), and its new axios.get/axios.post calls on /clusters/{owner}/{cluster}/proxy/... and /clusters/{owner}/{cluster}/resources in the ops request editors need to move to akp.resources when it is rebased on this PR.

Remaining plain HTTP: fetchJsons reads of ${packageviewUrlPrefix}/... still use the axios form-builder passes in.

Checks: make ci (license check, golangci-lint, build, Go unit tests) passes on this branch and on master; all 137 functions.js files parse with node --check; no /api/v1/... or /clusters/{owner}/{cluster}/... calls remain in any functions.js. make capi-tests fails the same way on master and here with stock helm (values.openapiv3_schema.yaml over the 5 MiB chart file limit; CI uses the x-helm fork). Nothing was rendered in form-builder.

Merge order: appscode-cloud/form-builder#423 first, then this PR. Both need appscode-cloud/b3#1497 (AKP v2 API) deployed.

tamalsaha and others added 24 commits November 24, 2026 11:30
Read Kubernetes objects through akp.resources and the database bundle
through akp.cluster.v2.ClusterService instead of the AKP v1 API.

Signed-off-by: Tamal Saha <tamal@appscode.com>
Read objects and database configurations through akp.resources, create
config secrets with akp.resources.create and read NotFound and error
messages from ConnectError.

Signed-off-by: Tamal Saha <tamal@appscode.com>
Signed-off-by: Tamal Saha <tamal@appscode.com>
Read chart values through akp.editor.v2.PackageService.GetPackageValues.

Signed-off-by: Tamal Saha <tamal@appscode.com>
Read and write Kubernetes objects with akp.resources, database
configurations with getDatabaseConfiguration, and the database bundle
with ClusterService.GetDatabaseBundle instead of the AKP v1 API.

Signed-off-by: Tamal Saha <tamal@appscode.com>
Read and create Kubernetes objects with akp.resources and database
configurations with getDatabaseConfiguration; errors are ConnectErrors.

Signed-off-by: Tamal Saha <tamal@appscode.com>
… v2 API

Signed-off-by: Tamal Saha <tamal@appscode.com>
Chart values through PackageService.GetPackageValues, database feature
gates through ClusterService, hubs through HubService, monitoring
clusters and stack values through TelemetryService.

Signed-off-by: Tamal Saha <tamal@appscode.com>
Signed-off-by: Tamal Saha <tamal@appscode.com>
Signed-off-by: Tamal Saha <tamal@appscode.com>
…v2 API

Signed-off-by: Tamal Saha <tamal@appscode.com>
Signed-off-by: Tamal Saha <tamal@appscode.com>
… the AKP v2 API

Signed-off-by: Tamal Saha <tamal@appscode.com>
…tors to form-builder and the AKP v2 API

Signed-off-by: Tamal Saha <tamal@appscode.com>
… v2 API

Signed-off-by: Tamal Saha <tamal@appscode.com>
Signed-off-by: Tamal Saha <tamal@appscode.com>
form-builder cannot load a chart as a sub-form, and no app registers the
older renderer that could, so these charts are never rendered.

Signed-off-by: Tamal Saha <tamal@appscode.com>
…P v2 API

Signed-off-by: Tamal Saha <tamal@appscode.com>
…AKP v2 API

Signed-off-by: Tamal Saha <tamal@appscode.com>
They use the older renderer format, which no app loads, and name the
removed uibytebuildersdev-component charts.

Signed-off-by: Tamal Saha <tamal@appscode.com>
… API

The BackupStorage selection added on master (#1208) reads BackupStorages,
the namespace, the default Archiver and the Kubestash repository and snapshot
through axios and the v1 cluster proxy. Those charts now get their client from
form-builder, which does not hand them axios, so the calls fail.

Read them through akp.resources, the same way the rest of the chart functions
do. The telemetry stack options chart gets the same treatment for its storage
classes.

Signed-off-by: Tamal Saha <tamal@appscode.com>
The recovery namespace and database pickers added on master (#1219) still used the v1 cluster proxy through axios. Namespaces and KubeStash repositories now come from akp.resources.

Signed-off-by: Tamal Saha <tamal@appscode.com>
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
@ArnobKumarSaha
ArnobKumarSaha merged commit 7712fbf into master Nov 24, 2026
8 checks passed
@ArnobKumarSaha
ArnobKumarSaha deleted the akp-v2-iam branch November 24, 2026 11:37
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.

2 participants